1 2****** Release 0.1.1 ****** 3 42003-04-22 Alexander Hollinger <alexander.hollinger@gmx.net> 5 6 * globas.c: changed version from 0.0.11 to 0.1.1 7 82003-05-06 Sebastian Gutsfeld <segoh@gmx.net> 9 10 * aliens.c (aliensMissileMove): added test if there is an alien 11 ship left when starting a new missile; this was the bug which is 12 responsible for freezing the game when shooting at the last alien 13 142003-05-05 Sebastian Gutsfeld <segoh@gmx.net> 15 16 * nInvaders.c (readInput): updated readInput for reading input in 17 different states (see status var) 18 19 * nInvaders.c (handleTimer): added code for status GAME_HIGHSCORE 20 so a title screen with animation is shown; updated status 21 GAME_OVER 22 23 * nInvaders.c (main): updated status initialisation from 24 GAME_NEXTLEVEL to GAME_HIGHSCORE 25 26 * view.c: added WINDOW wTitleScreen; added titleScreenInit; added 27 titleScreenDisplay; added titleScreenClear; added battleFieldClear 28 29 * view.c (aliensRefresh): formatted some code 30 31 * view.c (ufoRefresh): fixed array length 32 33 * view.c (gameOverDisplay): simpified function 34 35 * view.c (graphicEngineInit): updated with titleScreenInit 36 37 * view.h: sorted function declarations; updated gameOverDisplay, 38 titleScreenClear, titleScreenDisplay and battleFieldClear 39 402003-04-22 Alexander Hollinger <alexander.hollinger@gmx.net> 41 42 * globals.c (doSleep): added again. still needed in 43 view.c. added "#ifdef win32" instruction again. 44 452003-04-22 Alexander Hollinger <alexander.hollinger@gmx.net> 46 47 * globals.c (doSleep): deleted method. not used any more. 48 49 * globals.c: incremented version number from 0.0.10 to 0.0.11 50 51 * globals.c: removed '#ifdef win32' instruction. 52 53 * *.c, *.h: added license notice to each file 54 55 * renamed ToDo to TODO 56 572003-04-18 Alexander Hollinger <alexander.hollinger@gmx.net> 58 59 * nInvaders.c (finish): "barely mediocre" and "show promise" 60 both "< 10000". Changed latter to "< 12500" 61 622003-04-17 Alexander Hollinger <alexander.hollinger@gmx.net> 63 64 * view.c (statusDisplay): modified so that buffer is written 65 to wBattleField. new variable WINDOW* wStatus. added method 66 (statusInit) which does initialisation of WINDOW wStatus. 67 Problem: Alien missiles go right to the bottom of screen, 68 where status is located and overwritten with missile sprite. 69 Fix: see next point 70 Changed behaviour of display of lives. Now the _remaining_ 71 lives are displayed. i.e. at the beginning you will see 72 two little spaceshuttles, because you have two lives left. 73 74 * aliens.c (aliensMissileMove): added some checking, if missile 75 reached bottom where player moves. if so, do not move further 76 and reload missile. this reduces number of missiles which have 77 to be hit-tested each round, yet made it necessary to change 78 the shot-threshold otherwise too many missiles would have been 79 coming down. Not limiting ALIENS_MAX_MISSILES from 50 to 10 is 80 possible, because missiles are reloaded when they reach the 81 bottom. 10 concurrent missiles should be quite hard to manage.. 82 Removed ALIENS_MAX_MISSILES-definition from view.h. Was defined 83 twice, now only in aliens.h. 84 optimized threshold-checking. calculation outside for- 85 instruction, and only comparison within. 86 87 882003-04-17 Alexander Hollinger <alexander.hollinger@gmx.net> 89 90 * nInvaders.c (readInput): removed (ch==27) for exit 91 sequence. as dettus pointed out there would be problems 92 on some terminals. pressing some keys too long will send 93 an KEY_ESC and quit the game. 94 952003-04-17 Alexander Hollinger <alexander.hollinger@gmx.net> 96 97 * nInvaders.c (setUpTimer): changed method to call handleTimer. 98 The call signal(SIG_ALRM, handleTimer) didn't work on irix. 99 There, the timer was only fired once and then the programm 100 exited. Now using call to sigaction() with flag SA_RESTART. 101 1022003-04-16 Alexander Hollinger <alexander.hollinger@gmx.net> 103 104 * nInvaders.c: added a real-time timer that does 50 fps. if you 105 want it slower toggle the constant FPS. the higher the slower. 106 A timer is created and does all the gaming stuff while key 107 checking is still done in (main). Gamehandling is done by 108 simulating a deterministic finite automaton by setting the 109 'status'-attribute to e.g. GAME_LOOP, GAME_PAUSED, GAME_EXIT. 110 the following methods were modified/ added: 111 (setUpTimer): creates and initializes timer 112 (handleTimer): this method is called every 1/FPS seconds and 113 contains most code from old (main) 114 (readInput): changed so that the 'status'-variable is affected. 115 pressing of 'p' now changes 'status' 116 (main): most code moved to (handleTimer), calls setUpTimer and 117 sets 'status' to GAME_NEXTLEVEL 118 (gameOver): completely moved to handleTimer 119 120 * view.c (graphicEngineInit): removed 'timeout(0);' no longer 121 needed as we now hava a timer. another advantage: call to 122 (readInput) in nInvaders.c no longer called permanently. 123 in (readInput) the getch()-call waits till a key is pressed. 124 doSleep(1) no longer needed in nInvaders.c (readInput). 125 1262003-04-08 Sebastian Gutsfeld <segoh@gmx.net> 127 128 * ufo.c:replaced 'u' with 'ufo' (see ufo.h) and 'a' with 'aliens' 129 130 * ufo.h: added typedef for Ufo and renamed 'u' into 'ufo', 131 132 * player.c: added typedef for Player and renamed 'p' into 'player', 133 replaced 'p' with 'player and 'a' with 'aliens' 134 135 * aliens.c: replaced 'a' with 'aliens' (see aliens.h) 136 137 * aliens.h: added typedef for Aliens and renamed 'a' into 'aliens' 138 139 * globals.c (RELEASE): updated release number 140 1412003-04-07 Sebastian Gutsfeld <segoh@gmx.net> 142 143 * view.c (ufoRefresh): reverted 'frame' assignement 144 145 * nInvaders.c (main): reverted to old ufo speed from revision 1.3 146 1472003-04-06 Alexander Hollinger <alexander.hollinger@gmx.net> 148 149 * nInvaders.c (resetPlayer): added a call to playerMisisleClear(); 150 151 * view.c (aliensRefresh): fully encapsulated. access to aliens-Array 152 by pointer. 153 154 * aliens.c (*HitCheck): moved hit_alien_test and hit_bunker_test to 155 aliens.c and renamed to aliensHitCheck and bunkersHitCheck. Added 156 comments and did improvement of bunkersHitCheck-Algorithm 157 (shoty < BUNKERY + BUNKERHEIGHT instead of <=). 158 159 * nInvaders.c (finish): moved short version of GPL to globals.c 160 (showGplShort) 161 162 * view.c (gameOverInit): fixed color code 163 164 * player.h: removed lives from structPlayer. This variable belongs 165 more to the gamehandling in nInvaders.c that to the model of the 166 player in player.c. This is done because of better encapsulation 167 of player.c. 168 169 * player.c (playerReset): added a playerDisplay. Removed playerDisplay 170 from nInvaders.c just before refreshScreen() and added another 171 playerDisplay in the player.c (playerMissileMove) so that the 172 playerMissileClear does not clear the middle of the player when 173 a new shot is fired. 174 175 * aliens.c (aliensHitCheck): added support for return of alienType so 176 that different scoring according to type of aliens is possible. 177 had to change values f�r alien_type constants in nInvaders.h and 178 the order of scores in the points-array in nInvaders.c (doScoring). 179 ufo gets 500pt, aliens 100pt, 150pt or 200pt. 180 181 * aliens.c (aliensReset): clears missiles of aliens, if any 182 183 * nInvaders.c (main): changed some variable names (*_counter) and 184 contracted some if-statements. 185 186 * view.c (playerExplosionDisplay): renamed from playerExplode. Added 187 player.c (playerExplode) which calls playerExplosionDisplay and 188 playerDisplay. Thus, I could remove the playerExplode(p.posX, p.posY) 189 from nInvaders.c and add a playerExplode(). All Elements of the 190 structure structPlayer now are "private". 191 192 1932003-04-05 Sebastian Gutsfeld <segoh@gmx.net> 194 195 * Makefile: Updated file for ufo 196 197 * aliens.c (aliensMissileMove): fixed comment 198 199 * aliens.h: fixed indentation 200 201 * globals.h: fixed indentation 202 203 * nInvaders.c: included ufo.h, fixed some comments and linebreaks 204 205 * nInvaders.c (initlevel): added initialisation for ufo 206 207 * nInvaders.c (main): added code for ufo 208 209 * nInvaders.c (doScoring): different score for different alien types 210 211 * nInvaders.h: added constants for alien types needed by 212 nInvaders.c (doScoring), fixed declaration of doScoring, fixed 213 Indentation 214 215 * player.c: included ufo.h (needed for playerMoveMissile) 216 217 * player.c (playerMoveMissile): added code needed for ufo, fixed 218 doScoring for alien type 219 220 * player.h: fixed indentation, fixed declaration of doScoring 221 222 * view.c: added WINDOW *wUfo, void ufoRefresh, static void ufoInit, 223 void ufoDisplay and void ufoClear 224 225 * view.c (aliensRefresh): fixed indentation and color codes 226 227 * view.c (graphicEngineInit): added ufoInit to last init section 228 229 * view.h: fixed indentation, added constans UFOWIDTH and UFOPOSY, added 230 declarations of ufoDisplay, ufoRefresh and ufoClear 231 232 * ufo.c: files for ufo handling (initial import into cvs) 233 234 * ufo.h: header file for ufo.c (initial import into cvs) 235 2362003-04-04 Sebastian Gutsfeld <segoh@gmx.net> 237 238 * nInvaders.h, player.c: updated every occurance of hit_player_test 239 to hit_alientest 240 241 * nInvaders.c (hit_alien_test): renamed from 'hit_player_test' 242 2432003-04-05 Alexander Hollinger <alexander.hollinger@gmx.net> 244 245 * [view.c] (bunkersDisplay): now fully encapsulated using pointer 246 *pBunker to get access to bunker-array. Method is called from 247 [aliens.c] (bunkersReset) instead of [aliens.c] (render) thus 248 saving some cpu-time. The bunker has to be displayed only at the 249 beginning of a new level. Then we use bunkerClearElement or 250 bunkerClear to remove bunker elements. No need why it was in 251 [aliens.c] (render). 252 2532003-04-04 Sebastian Gutsfeld <segoh@gmx.net> 254 255 * nInvaders.c (readInput): draw new number of lives in live-cheat 256 257 * aliens.c (aliensReset): put declaration of 'level' at 258 beginning of function 259 2602003-04-04 Alexander Hollinger <alexander.hollinger@gmx.net> 261 262 * [nInvaders.c] added a new cheat: "L" gives player one new life 263 for better testing 264 * [aliens.c, player.c] (*Reset) forgot to reset alien-block and 265 bunkers-block. Now there is a bunkersReset in aliens.c 266 * [view.c] added method graphicEngineInit() 267 * [view.c] (refreshScreen) fixed problem with graphic display on some 268 terminals. bunker and player are now displayed at startup. 269 * removed init.c and init.h from project 270 * [globals.c] some minor changes to names of methods. moved code for 271 displaying version from nInvaders.c to globals.c. Added code to 272 redefine usleep for WIN32-platforms, this should hopefully fix the 273 bug that the game was too fast there. 274 2752003-04-03 Alexander Hollinger <alexander.hollinger@gmx.net> 276 277 * removed deprecated multi-line-strings in globals.c and nInvaders.c 278 2792003-04-02 Alexander Hollinger <alexander.hollinger@gmx.net> 280 281 * view.c now contains all methods which do graphical display 282 (by using ncurses) 283 284 * added file aliens.c and aliens.h. Perhaps these can later melt 285 with player.c and player.h. 286 2872003-04-01 Sebastian Gutsfeld <segoh@gmx.net> 288 289 * *.c (*): formatted with 'indent -kr -i8 -l90' and fixed 290 some linebreaks 291 2922003-03-30 Alexander Hollinger <alexander.hollinger@gmx.net> 293 294 * added file "ToDo": put feature-requests and alike in here 295 296 * player.c (player*Missile*): processing of missiles moved to these 297 functions to reduce size of main(). 298 299 3002003-03-29 Sebastian Gutsfeld <segoh@gmx.net> 301 302 * init.c (initplayer): fixed comment 303 304 * player.c (playerInit): put declaration of 'playerSprite' at beginning 305 of function 306 307 * init.c (initshots): put declaration of 'a' at beginning of function 308 3092003-03-29 Alexander Hollinger <alexander.hollinger@gmx.net> 310 311 * added more comments and added player.c which is intended to hold all 312 functions concearning the player 313 314 * added method playerLaunchMissile in player.c 315 3162003-03-28 Alexander Hollinger <alexander.hollinger@gmx.net> 317 318 * added some comments and split up some functions, especially in init.c. 319 320 321