From: Holger Schemel Date: Tue, 5 Jan 1999 01:22:45 +0000 (+0100) Subject: rnd-19990105-2 X-Git-Tag: 1.3.0^2~36 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2a4878a4c2873df0426a22c357533656928748c8;p=rocksndiamonds.git rnd-19990105-2 --- diff --git a/src/game.c b/src/game.c index b9b3cd76..0bd65fdb 100644 --- a/src/game.c +++ b/src/game.c @@ -91,15 +91,6 @@ #define SC_SCHLUESSEL 9 #define SC_ZEITBONUS 10 -/* values for game_emulation */ -#define EMU_NONE 0 -#define EMU_BOULDERDASH 1 -#define EMU_SOKOBAN 2 -#define EMU_SUPAPLEX 3 - -/* to control special behaviour of certain game elements */ -int game_emulation = EMU_NONE; - @@ -1002,7 +993,9 @@ void DrawDynamite(int x, int y) phase = 7 - phase; } - if (Store[x][y]) + if (game_emulation == EMU_SUPAPLEX) + DrawGraphic(sx, sy, GFX_SP_DISK_RED); + else if (Store[x][y]) DrawGraphicThruMask(sx, sy, graphic + phase); else DrawGraphic(sx, sy, graphic + phase); @@ -4674,7 +4667,12 @@ boolean PlaceBomb(struct PlayerInfo *player) DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW); if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy))) - DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), GFX_DYNAMIT); + { + if (game_emulation == EMU_SUPAPLEX) + DrawGraphic(SCREENX(jx), SCREENY(jy), GFX_SP_DISK_RED); + else + DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), GFX_DYNAMIT); + } } else { diff --git a/src/main.c b/src/main.c index 688d0c00..142dd653 100644 --- a/src/main.c +++ b/src/main.c @@ -100,6 +100,8 @@ int MampferMax, MampferNr; boolean SiebAktiv; int SiebCount; +int game_emulation = EMU_NONE; + boolean network_player_action_received = FALSE; struct LevelDirInfo leveldir[MAX_LEVDIR_ENTRIES]; diff --git a/src/main.h b/src/main.h index cd8366f6..4da25419 100644 --- a/src/main.h +++ b/src/main.h @@ -445,6 +445,8 @@ extern int MampferMax, MampferNr; extern boolean SiebAktiv; extern int SiebCount; +extern int game_emulation; + extern boolean network_player_action_received; extern struct LevelDirInfo leveldir[]; @@ -1288,4 +1290,10 @@ extern int num_bg_loops; #define ANIM_OSCILLATE 1 #define ANIM_REVERSE 2 +/* values for game_emulation */ +#define EMU_NONE 0 +#define EMU_BOULDERDASH 1 +#define EMU_SOKOBAN 2 +#define EMU_SUPAPLEX 3 + #endif /* MAIN_H */ diff --git a/src/tape.c b/src/tape.c index 7e388fae..41b328b2 100644 --- a/src/tape.c +++ b/src/tape.c @@ -109,16 +109,20 @@ void TapeRecordDelay() void TapeTogglePause() { + unsigned long state; + if (!tape.recording && !tape.playing) return; tape.pausing = !tape.pausing; tape.fast_forward = FALSE; tape.pause_before_death = FALSE; - DrawVideoDisplay((tape.pausing ? - VIDEO_STATE_PAUSE_ON : - VIDEO_STATE_PAUSE_OFF) | VIDEO_STATE_PBEND_OFF, - 0); + + state = (tape.pausing ? VIDEO_STATE_PAUSE_ON : VIDEO_STATE_PAUSE_OFF); + if (tape.playing) + state |= VIDEO_STATE_PBEND_OFF; + + DrawVideoDisplay(state, 0); } void TapeStartPlaying() diff --git a/src/tools.c b/src/tools.c index 56b64fda..1c27d8ca 100644 --- a/src/tools.c +++ b/src/tools.c @@ -543,7 +543,10 @@ void DrawPlayer(struct PlayerInfo *player) phase = 7 - phase; } - DrawGraphicThruMask(sx, sy, graphic + phase); + if (game_emulation == EMU_SUPAPLEX) + DrawGraphic(sx, sy, GFX_SP_DISK_RED); + else + DrawGraphicThruMask(sx, sy, graphic + phase); } if ((last_jx != jx || last_jy != jy) &&