-#define COMPILE_DATE_STRING "2009-10-12 00:32"
+#define COMPILE_DATE_STRING "2009-10-19 00:25"
{
int i;
+ /* !!! SAME CODE AS IN "GameActions()" -- FIX THIS !!! */
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
if (level.native_em_level->lev->home == 0) /* all players at home */
}
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
- if (game_sp_info.LevelSolved) /* game won */
+ if (game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver) /* game won */
{
PlayerWins(local_player);
+ game_sp_info.GameOver = TRUE;
+
AllPlayersGone = TRUE;
}
if (game.restart_level)
StartGameActions(options.network, setup.autorecord, level.random_seed);
+ /* !!! SAME CODE AS IN "CheckLevelTime()" -- FIX THIS !!! */
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
if (level.native_em_level->lev->home == 0) /* all players at home */
level.native_em_level->ply[3]->alive == 0) /* all dead */
AllPlayersGone = TRUE;
}
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
+ {
+ if (game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver) /* game won */
+ {
+ PlayerWins(local_player);
+
+ game_sp_info.GameOver = TRUE;
+
+ AllPlayersGone = TRUE;
+ }
+
+ if (game_sp_info.GameOver) /* game lost */
+ AllPlayersGone = TRUE;
+ }
if (local_player->LevelSolved && !local_player->LevelSolved_GameEnd)
GameWon();
// --------------------- START OF GAME-BUSY LOOP ------------------------------
// ----------------------------------------------------------------------------
+#if 0
locRepeatMainGameLoop: // start repeating game loop
+#endif
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// FS synchronization
// FS end of synchronization
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#if 1
+ if (EndFlag)
+ {
+ // (should never happen)
+
+ // printf("::: EndFlag == True\n");
+
+ goto locExitMainGameLoop;
+ }
+#else
if (EndFlag)
goto locExitMainGameLoop;
+#endif
// If DemoFlag = 0 Then Call subCheckJoystick ' check joystick
// bx = subCheckRightMouseButton() ' check (right) mouse button
ScrollTowards(ScreenScrollXPos, ScreenScrollYPos);
}
+#if 1
+ if (ForcedExitFlag != 0) // Forced Exit?' yes--exit!
+ {
+ // (should never happen)
+
+ // printf("::: ForcedExitFlag == True\n");
+
+ goto locExitMainGameLoop;
+ }
+#else
if (ForcedExitFlag != 0) // Forced Exit?' yes--exit!
goto locExitMainGameLoop;
+#endif
TimerVar = TimerVar + 1;
// End With
// End If
+#if 1
+ if (ExitToMenuFlag == 1)
+ {
+ // happens when demo ends or when Murphy enters exit (to be checked)
+
+ printf("::: ExitToMenuFlag == True\n");
+
+ goto locExitMainGameLoop;
+ }
+#else
if (ExitToMenuFlag == 1)
goto locExitMainGameLoop;
+#endif
#if 1
if (LeadOutCounter == 0) // no lead-out: game busy
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
// ----------------------------------------------------------------------------
LeadOutCounter = LeadOutCounter - 1; // do more lead-out after quit
+#if 1
+ if (LeadOutCounter != 0) // lead-out not ready: more
+ return subMainGameLoop;
+#else
if (LeadOutCounter != 0) // lead-out not ready: more
goto locRepeatMainGameLoop;
+#endif
// lead-out done: exit now
// ---------------------- END OF GAME-BUSY LOOP (including lead-out) ----------
locExitMainGameLoop:
+
+#if 0
+ printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter);
+#endif
+
do
{
DoEvents(); // user may klick on menus or move the window here ...
# =============================================================================
-# Rocks'n'Diamonds Makefile (game_sp)
+# Makefile for Rocks'n'Diamonds native Supaplex engine (game_sp)
# -----------------------------------------------------------------------------
# (c) 1995-2009 Holger Schemel <info@artsoft.org>
# -----------------------------------------------------------------------------
# MegaPlex version 0.5 beta release xmas 2001 by Frank Schindler,
# based on the Speed Fix 6.3+ by Herman Perk,
-# based on original Supaplex by Michael Stopp & Philip Jespersen.
+# based on original Supaplex by Michael Stopp & Philip Jespersen
+# (code automatically converted from VisualBasic to C by vb2c.pl).
# =============================================================================
# -----------------------------------------------------------------------------
printf("::: Murphy.c: !!!!!!!!!! LEVEL %d SOLVED !!!!!!!!!!\n",LevelNumber);
#endif
+#if 0
game_sp_info.LevelSolved = TRUE;
+#endif
subSoundFXExit();
data_h_DemoDone = 1; // EP set level success bytes