rnd-20060818-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 18 Aug 2006 19:17:25 +0000 (21:17 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:52:54 +0000 (10:52 +0200)
* fixed bug that caused broken tapes when manually appending to tapes
  using the "pause before death" functionality, followed by recording
* added setup option to disable fading of screens for faster testing

ChangeLog
src/conftime.h
src/files.c
src/game.c
src/game_em/input.c
src/screens.c
src/tools.c

index c7fdd05a3558ed8a35e4910fb5497c08ee0f92d6..287a460e21c7f41205917110f4491ec6eba157c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-18
+       * fixed bug that caused broken tapes when manually appending to tapes
+         using the "pause before death" functionality, followed by recording
+       * added setup option to disable fading of screens for faster testing
+
 2006-08-16
        * code cleanup of new fading functions
 
index d6874f3ae233f34f7e04a233742145552778e5a1..9e0a36fa8c6cd6a9e979458ae614916e2223fa8a 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2006-08-16 22:55]"
+#define COMPILE_DATE_STRING "[2006-08-18 21:12]"
index 4a89c9b2d9870e686caa4f76a39663657870be60..16fbe2bcfc8d79e111dd8bc012bb0eb3d1ea043a 100644 (file)
@@ -7140,7 +7140,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->direct_draw = !si->double_buffering;
   si->scroll_delay = TRUE;
   si->soft_scrolling = TRUE;
-  si->fading = FALSE;
+  si->fading = TRUE;
   si->autorecord = TRUE;
   si->show_titlescreen = TRUE;
   si->quick_doors = FALSE;
index 4e4c901c990286248b043614b2716d243a3d822e..703cfa54c6a07d17cc1830cd5e4d867c385411fd 100644 (file)
@@ -9924,8 +9924,26 @@ void GameActions()
   network_player_action_received = FALSE;
 #endif
 
+  /* when playing tape, read previously recorded player input from tape data */
   recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
 
+#if 1
+  /* TapePlayAction() may return NULL when toggling to "pause before death" */
+  if (tape.pausing)
+    return;
+#endif
+
+#if 0
+  if (tape.playing)
+  {
+    if (recorded_player_action == NULL)
+      printf("!!! THIS SHOULD NOT HAPPEN !!!\n");
+    else
+      printf("::: %05d: TAPE PLAYING: %08x\n",
+            FrameCounter, recorded_player_action[0]);
+  }
+#endif
+
   if (tape.set_centered_player)
   {
     game.centered_player_nr_next = tape.centered_player_nr_next;
@@ -9972,6 +9990,12 @@ void GameActions()
   if (tape.recording)
     TapeRecordAction(tape_action);
 
+#if 0
+  if (tape.recording)
+    printf("::: %05d: TAPE RECORDING: %08x\n",
+          FrameCounter, tape_action[0]);
+#endif
+
   if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
   {
     GameActions_EM_Main();
index 2c6c1faacfb498d0ecbebba05a8f95934166f57b..8ea8c04b9cb3fd63bfca1050e687979bf25e6d88 100644 (file)
@@ -71,6 +71,22 @@ void GameActions_EM(byte action[MAX_PLAYERS], boolean warp_mode)
 {
   int i;
 
+#if 0
+  static int foo = -1;
+
+  if (action[0] == 0 && foo != 0)
+    printf("KEY RELEASED @ %05d\n", FrameCounter);
+
+  foo = action[0];
+#endif
+
+#if 0
+#if 1
+  if (FrameCounter % 10 == 0)
+#endif
+    printf("::: %05d: %lu, %d\n", FrameCounter, RandomEM, frame);
+#endif
+
   game_animscreen();
 
 #if 1
index cd38087393720868036bdad18708138f65a04ae1..8e09ecc95722b4c13bd10ae197cd089f8395c22a 100644 (file)
@@ -2804,8 +2804,8 @@ static struct TokenInfo setup_info_graphics[] =
 #if 0
   { TYPE_SWITCH,       &setup.soft_scrolling,  "Soft Scrolling:"       },
   { TYPE_SWITCH,       &setup.double_buffering,"Double-Buffering:"     },
-  { TYPE_SWITCH,       &setup.fading,          "Fading:"               },
 #endif
+  { TYPE_SWITCH,       &setup.fading,          "Fading:"               },
   { TYPE_SWITCH,       &setup.quick_switch,    "Quick Player Focus Switch:" },
   { TYPE_SWITCH,       &setup.quick_doors,     "Quick Menu Doors:"     },
   { TYPE_SWITCH,       &setup.show_titlescreen,"Show Title Screens:"   },
index 7f5d5db6ee1c651c874722443909225f37feffca..05219bf91a4003a6c88af470db545ec3cc6df62c 100644 (file)
@@ -438,7 +438,7 @@ void FadeExt(int fade_mask, int fade_mode)
 
   redraw_mask |= fade_mask;
 
-  if (fade_delay == 0)
+  if (!setup.fading || fade_delay == 0)
   {
     if (fade_mode == FADE_MODE_FADE_OUT)
       ClearRectangle(backbuffer, x, y, width, height);