+2009-10-31
+ * fixed SP engine to set "game over" not before lead out counter done
+
2009-10-30
* fixed (potential) compile error when using GCC option "-std=gnu99"
(thanks to Tom "spot" Callaway)
if (LeadOutCounter == 0)
#endif
{
-#if 0
+#if 1
printf("::: DoGameStuff.c: killing murphy [%d] ...\n", KillMurphyFlag);
#endif
LeadOutCounter = 0x40; // quit: start lead-out
#if 1
+
#if 1
printf("::: DoGameStuff.c: !!!!!!!!!! GAME OVER !!!!!!!!!!\n");
+ printf("::: [KillMurphyFlag == %d]\n", KillMurphyFlag);
#endif
+#if 1
+ /* give Murphy some more time (LeadOutCounter) to reach the exit */
+#else
game_sp_info.GameOver = TRUE;
+#endif
+
#endif
}
locExitMainGameLoop:
-#if 0
+#if 1
printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter);
+ printf("::: [KillMurphyFlag == %d]\n", KillMurphyFlag);
#endif
-
+#if 1
+ /* if the game is not won when reaching this point, then it is lost */
+ if (!game_sp_info.LevelSolved)
+ game_sp_info.GameOver = TRUE;
+#endif
#if 1
return subMainGameLoop;
#if 1
+#if 0
+ /* fill preceding playfield buffer zone with (indestructible) "hardware" */
+ for (i = -FieldWidth; i < 0; i++)
+ PlayField16[i] = 0x20;
+#endif
+
count = 0;
for (y = 0; y < native_sp_level.height; y++)
for (x = 0; x < native_sp_level.width; x++)
((name_first == '?' || name_first == '1') &&
(name_last == '?' || name_last == '1'));
- /* correct leading multipart level meta information in level name */
- for (i = 0; i < SP_LEVEL_NAME_LEN && header->LevelTitle[i] == name_first; i++)
- header->LevelTitle[i] = '-';
-
- /* correct trailing multipart level meta information in level name */
- for (i = SP_LEVEL_NAME_LEN - 1; i >= 0 && header->LevelTitle[i] == name_last; i--)
- header->LevelTitle[i] = '-';
+ if (is_multipart_level)
+ {
+ /* correct leading multipart level meta information in level name */
+ for (i = 0;
+ i < SP_LEVEL_NAME_LEN && header->LevelTitle[i] == name_first;
+ i++)
+ header->LevelTitle[i] = '-';
+
+ /* correct trailing multipart level meta information in level name */
+ for (i = SP_LEVEL_NAME_LEN - 1;
+ i >= 0 && header->LevelTitle[i] == name_last;
+ i--)
+ header->LevelTitle[i] = '-';
+ }
/* ---------- check for normal single level ---------- */