-#define COMPILE_DATE_STRING "2009-10-11 22:17"
+#define COMPILE_DATE_STRING "2009-10-12 00:32"
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 won */
+ {
+ PlayerWins(local_player);
+
+ AllPlayersGone = TRUE;
+ }
+
+ if (game_sp_info.GameOver) /* game lost */
+ AllPlayersGone = TRUE;
+ }
if (TimeFrames >= FRAMES_PER_SECOND)
{
ExplodeFieldSP(MurphyExplodePos); // Explode
LeadOutCounter = 0x40; // quit: start lead-out
}
+
+#if 1
+ if (KillMurphyFlag == 1 &&
+ !game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver)
+ {
+#if 1
+ printf("::: DoGameStuff.c: !!!!!!!!!! GAME OVER !!!!!!!!!!\n");
+#endif
+
+ game_sp_info.GameOver = TRUE;
+ }
+#endif
+
+
} // loc_g_22FB:
}
-#if 0
+#if 1
// static void menPlayDemo_Click()
void menPlayDemo_Click()
menPlay_Click();
#if 1
- return;
+ return; /* return after initialization phase */
#endif
#if 0
// .Refresh
// End With
// End If
+
if (ExitToMenuFlag == 1)
goto locExitMainGameLoop;
+#if 1
+ if (LeadOutCounter == 0) // no lead-out: game busy
+ return subMainGameLoop;
+#else
if (LeadOutCounter == 0) // no lead-out: game busy
goto locRepeatMainGameLoop;
+#endif
// ----------------------------------------------------------------------------
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
return subAnimateMurphy;
#if 1
- printf("::: Murphy.c: !!!!!!!!!! LEVEL %d SOLVED !!!!!!!!!!\n", LevelNumber);
+ if (!game_sp_info.LevelSolved)
+ printf("::: Murphy.c: !!!!!!!!!! LEVEL %d SOLVED !!!!!!!!!!\n",LevelNumber);
#endif
+ game_sp_info.LevelSolved = TRUE;
+
subSoundFXExit();
data_h_DemoDone = 1; // EP set level success bytes
LevelStatus = 1; // set Level Status DONE
struct GameInfo_SP
{
+ boolean LevelSolved;
+ boolean GameOver;
};
struct LevelInfo_SP
/* ------------------------------------------------------------------------- */
extern struct GlobalInfo_SP global_sp_info;
+extern struct GameInfo_SP game_sp_info;
extern struct LevelInfo_SP native_sp_level;
extern struct GraphicInfo_SP graphic_info_sp_object[TILE_MAX][8];
extern struct GraphicInfo_SP graphic_info_sp_player[MAX_PLAYERS][SPR_MAX][8];
#include "global.h"
+struct GameInfo_SP game_sp_info;
struct LevelInfo_SP native_sp_level;
void InitGameEngine_SP()
{
+ game_sp_info.LevelSolved = FALSE;
+ game_sp_info.GameOver = FALSE;
+
#if 0
menPlay_Click();
#else
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
{
+ subMainGameLoop_Main();
}
extern struct LevelInfo_SP native_sp_level;
-extern struct GameInfo_SP game_sp;
-
extern Bitmap *screenBitmap;
extern Bitmap *sp_objects;
// Call subFetchAndInitLevelB
EndFlag = False;
-#if 0
+#if 1
subMainGameLoop_Init();
#else
subMainGameLoop();