rnd-19990105-2
authorHolger Schemel <info@artsoft.org>
Tue, 5 Jan 1999 01:22:45 +0000 (02:22 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:32:50 +0000 (10:32 +0200)
src/game.c
src/main.c
src/main.h
src/tape.c
src/tools.c

index b9b3cd76daa65a0a9c5c341e4d9d1fb5fc1fd946..0bd65fdb476fe8b3c45d4b186275e070c661c44a 100644 (file)
 #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
   {
index 688d0c00413627955296b94dd0f10c8d46a33cce..142dd6534a48aa93108af8796a539e01f68f8b66 100644 (file)
@@ -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];
index cd8366f6b60ae33bea4bcc800ad471e4fc0c2ad6..4da25419093e2a19ee03f3029b86a3cf9f0fd8c3 100644 (file)
@@ -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 */
index 7e388faeb5378bcafde9bc7d96ca917beb1db017..41b328b240d99b30d68619e1f7f534c24eb5a27a 100644 (file)
@@ -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()
index 56b64fdaba94c1cd02b7389c9286e676f847ca89..1c27d8cae76cd2c3a4f5a45ed10c6bb14ef02a85 100644 (file)
@@ -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) &&