if (DemoFlag != 0)
{
-#if 1
+#if 0
printf("::: playing demo ...\n");
#endif
}
else // loc_g_1836:
{
-#if 1
+#if 0
printf("::: playing game ...\n");
#endif
return subMainGameLoop;
}
-int subMainGameLoop_Main()
+int subMainGameLoop_Main(byte action, boolean warp_mode)
{
int subMainGameLoop;
int bx;
LastFrame = Clock.TickNow(); // store the frame time
#endif
// never any additional code between here!
+
+
+
+#if 0
if (! NoDisplayFlag) // copy the BackBuffer(=Stage) to visible screen
Stage.Blt();
+#endif
+
+
// FS end of synchronization
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// loc_g_186F:
- subProcessKeyboardInput(); // Check keyboard, act on keys
+ subProcessKeyboardInput(action); // Check keyboard, act on keys
// 'HACK:
// TimerVar = TimerVar + 1
{
// happens when demo ends or when Murphy enters exit (to be checked)
+#if 0
printf("::: ExitToMenuFlag == True\n");
+#endif
+#if 0
goto locExitMainGameLoop;
+#endif
}
#else
if (ExitToMenuFlag == 1)
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
// ----------------------------------------------------------------------------
LeadOutCounter = LeadOutCounter - 1; // do more lead-out after quit
+
+#if 0
+ printf("::: LeadOutCounter == %d\n", LeadOutCounter);
+#endif
+
#if 1
if (LeadOutCounter != 0) // lead-out not ready: more
return subMainGameLoop;
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;
#endif
+
+
do
{
DoEvents(); // user may klick on menus or move the window here ...
if (UpdatedFlag == 0) // update playing time
subUpdatePlayingTime();
-
return subMainGameLoop;
} // subMainGameLoop
+#if 0
+
int subMainGameLoop()
{
int subMainGameLoop;
return subMainGameLoop;
} // subMainGameLoop
+#endif
+
void subUpdatePlayingTime()
{
}