9bd4b0193a
Changes since 0.0.4 include: * Better framerate. * Improved sprite collision detection. * New display format to make the game more "shooter-like". And misc unspecified bugfixes.
35 lines
882 B
Text
35 lines
882 B
Text
$NetBSD: patch-ab,v 1.2 2002/10/15 23:23:05 kristerw Exp $
|
|
--- thegame.c.orig Wed Oct 16 00:59:22 2002
|
|
+++ thegame.c Wed Oct 16 01:01:00 2002
|
|
@@ -15,6 +15,7 @@
|
|
int gameover_delay;
|
|
Uint32 level_start_time;
|
|
Uint32 game_start_time;
|
|
+Uint32 level_pause_start;
|
|
|
|
void thegame_init()
|
|
{
|
|
@@ -26,6 +27,7 @@
|
|
player_init();
|
|
game_start_time=SDL_GetTicks();
|
|
level_start_time=SDL_GetTicks();
|
|
+ level_pause_start=0;
|
|
|
|
level=((PLAYER_DATA *)player->data)->level;
|
|
|
|
@@ -44,10 +46,15 @@
|
|
if(state.mainstate!=ST_GAME_PLAY || state.newstate==1) return;
|
|
|
|
/* gt=Zeit seit Spielbeginn in 1/10 sec. */
|
|
+ if(level_pause_start>0) {
|
|
+ level_start_time+=SDL_GetTicks()-level_pause_start;
|
|
+ level_pause_start=0;
|
|
+ }
|
|
gt=(SDL_GetTicks()-level_start_time)/100;
|
|
|
|
if(d->lives>0) {
|
|
if(keyboard[keyconfig.e]) {
|
|
+ level_pause_start=SDL_GetTicks();
|
|
newstate(ST_MENU,MEN_PAUSE,1);
|
|
}
|
|
|