1 /* 2 swtitle - SW perform animation on the title screen 3 4 Copyright (C) 1984-2003 David L. Clark. 5 This program is free software; you can redistribute it and/or modify it under 6 the terms of the GNU General Public License as published by the Free Software 7 Foundation; either version 2 of the License, or (at your option) any later 8 version. This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11 more details. You should have received a copy of the GNU General Public 12 License along with this program; if not, write to the Free Software Foundation, 13 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 14 15 Author: Dave Clark 16 17 Modification History: 18 84-02-02 Development 19 87-03-10 Microsoft compiler. 20 87-03-11 Title reformatting. 21 87-04-01 Version 7.F15 22 96-12-27 New network version. 23 99-01-24 1999 copyright. 24 2000-10-29 Copyright update. 25 2003-01-27 GNU General Public License 26 */ 27 #include "sw.h" 28 29 30 extern int savemode; /* Saved PC video mode */ 31 extern BOOL hires; /* High res debug flag */ 32 extern BOOL titleflg; /* Title flag */ 33 extern int tickmode; /* Tick action to be done */ 34 extern int counttick, countmove; /* Performance counters */ 35 extern int movetick; /* Move synchronization */ 36 extern int displx, disprx; /* Display left and right bounds */ 37 extern BOOL dispinit; /* Initalized display flag. */ 38 extern GRNDTYPE ground[]; /* Ground height by pixel */ 39 40 41 42 43 swtitln() 44 { 45 OBJECTS ob; 46 extern char swplnsym[][ANGLES][SYMBYTES]; 47 extern char swtrgsym[][TARGBYTES]; 48 extern char swoxsym[][OXBYTES]; 49 extern char swhitsym[][SYMBYTES]; 50 extern char swwinsym[][WINBYTES]; 51 register int i, h; 52 53 savemode = get_type(); 54 set_type ( ( hires ) ? 6 : 4 ); 55 56 if ( titleflg ) 57 return; 58 59 tickmode = 1; 60 61 sound( S_TITLE, 0, NULL ); 62 swsound(); 63 64 /*---------------- Original BMB Version--------------- 65 66 swcolour( 3 ); 67 swposcur( 13, 6 ); 68 puts( "S O P W I T H" ); 69 70 swcolour( 1 ); 71 swposcur( 12, 8 ); 72 puts( "(Version 7.F15)" ); 73 74 swcolour( 3 ); 75 swposcur( 5, 11 ); 76 puts( "(c) Copyright 1984, 1985, 1987" ); 77 78 swcolour( 1 ); 79 swposcur( 6, 12 ); 80 puts( "BMB " ); 81 swcolour( 3 ); 82 puts( "Compuscience Canada Ltd." ); 83 84 ------------------ Original BMB Version---------------*/ 85 86 /*---------------- New Network Version ---------------*/ 87 88 swcolour( 3 ); 89 swposcur( 13, 4 ); 90 puts( "S O P W I T H" ); 91 92 swcolour( 1 ); 93 swposcur( 9, 6 ); 94 puts( "(The Author's Edition)" ); 95 96 swcolour( 3 ); 97 swposcur( 5, 9 ); 98 puts( "(c) Copyright 1984, 1985, 1987" ); 99 100 swcolour( 1 ); 101 swposcur( 6, 10 ); 102 puts( "BMB " ); 103 swcolour( 3 ); 104 puts( "Compuscience Canada Ltd." ); 105 106 swcolour( 3 ); 107 swposcur( 1, 12 ); 108 puts( "Copyright (C) 1984-2003 David L. Clark" ); 109 110 /*---------------- New Network Version-----------------*/ 111 112 setvdisp(); 113 114 displx = 700; 115 dispinit = TRUE; 116 swground(); 117 118 ob.ob_type = PLANE; 119 ob.ob_symhgt = ob.ob_symwdt = 16; 120 ob.ob_clr = 1; 121 ob.ob_newsym = swplnsym[0][0]; 122 swputsym( 260, 180, &ob ); 123 124 ob.ob_newsym = swwinsym[3]; 125 swputsym( 50, 180, &ob ); 126 127 ob.ob_type = OX; 128 ob.ob_newsym = swoxsym[0]; 129 swputsym( 100, ground[800] + 16, &ob ); 130 131 ob.ob_type = TARGET; 132 ob.ob_clr = 2; 133 ob.ob_newsym = swtrgsym[3]; 134 swputsym( 234, ground[934] + 16, &ob ); 135 136 ob.ob_type = PLANE; 137 ob.ob_newsym = swhitsym[0]; 138 swputsym( 20, 160, &ob ); 139 140 ob.ob_type = SMOKE; 141 ob.ob_symhgt = ob.ob_symwdt = 1; 142 ob.ob_newsym = (char *)0x82; 143 h = 150; 144 for ( i = 9; i; --i ) 145 swputsym( 30, h += 5, &ob ); 146 } 147 148 149 150 151 swtitlf() 152 { 153 154 if ( titleflg ) 155 return; 156 157 sound( 0, 0, NULL ); 158 swsound(); 159 tickmode = 0; 160 } 161 162 163 164 swtickc() 165 { 166 167 ++counttick; 168 /*--- DLC 96/12/27 169 ++movetick; 170 ----------------*/ 171 movetick+=10; 172 #ifdef IBMPC 173 soundadj(); 174 #endif 175 } 176 ÿ