-#define COMPILE_DATE_STRING "2009-10-20 21:52"
+#define COMPILE_DATE_STRING "2009-10-22 22:59"
if (KillMurphyFlag == 1 || MurphyMoveCounter == 0)
{
#if 1
- if (LeadOutCounter == 0 && !game_sp_info.LevelSolved)
+ if (LeadOutCounter == 0 &&
+ !game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver)
#else
if (LeadOutCounter == 0)
#endif
{
-#if 1
+#if 0
printf("::: DoGameStuff.c: killing murphy [%d] ...\n", KillMurphyFlag);
#endif
KillMurphyFlag = 0; // no more "kill Murphy"
ExplodeFieldSP(MurphyExplodePos); // Explode
LeadOutCounter = 0x40; // quit: start lead-out
+
+#if 1
+#if 1
+ printf("::: DoGameStuff.c: !!!!!!!!!! GAME OVER !!!!!!!!!!\n");
+#endif
+
+ game_sp_info.GameOver = TRUE;
+#endif
}
#if 1
+#if 0
+ printf("::: *** %d, %d, %d\n", KillMurphyFlag,
+ game_sp_info.LevelSolved, game_sp_info.GameOver);
+#endif
+
+#if 0
if (KillMurphyFlag == 1 &&
!game_sp_info.LevelSolved &&
!game_sp_info.GameOver)
game_sp_info.GameOver = TRUE;
}
#endif
-
+#endif
} // loc_g_22FB:
if (ax == fiMurphy)
{
#if 1
- printf("::: Explosions.c: ExplodeFieldSP(): kill murphy\n");
+ printf("::: Explosions.c: ExplodeFieldSP(): killing murphy\n");
#endif
KillMurphyFlag = 1;
case fiMurphy:
#if 1
- printf("::: Explosions.c: LetExplodeFieldSP(): kill murphy\n");
+ printf("::: Explosions.c: LetExplodeFieldSP(): killing murphy\n");
#endif
KillMurphyFlag = 1;
return subCheckRightMouseButton;
}
-int subProcessKeyboardInput()
+int subProcessKeyboardInput(byte action)
{
int subProcessKeyboardInput;
static int LastKey = 0;
+#if 1
+
+ if (action & KEY_BUTTON)
+ {
+ DemoKeyCode = (action & MV_UP ? keySpaceUp :
+ action & MV_LEFT ? keySpaceLeft :
+ action & MV_DOWN ? keySpaceDown :
+ action & MV_RIGHT ? keySpaceRight : keySpace);
+ }
+ else
+ {
+ DemoKeyCode = (action & MV_UP ? keyUp :
+ action & MV_LEFT ? keyLeft :
+ action & MV_DOWN ? keyDown :
+ action & MV_RIGHT ? keyRight : keyNone);
+ }
+
+ return subProcessKeyboardInput;
+
+#else
+
// On Error GoTo NoKeyboardAccessEH
// Call DKeyboard.Acquire
// On Error GoTo 0
if (DemoFlag != 0)
{
subGetNextDemoKey();
+
if (ExitToMenuFlag != 0)
return subProcessKeyboardInput;
-
}
else
{
}
}
+#endif
+
// demo recording
if (RecordDemoFlag == 1)
DemoBuffer.AddDemoKey(DemoKeyCode);
extern void subCheckJoystick();
extern int subCheckRightMouseButton();
-extern int subProcessKeyboardInput();
+extern int subProcessKeyboardInput(byte);
extern DemoBufferObject DemoBuffer;
extern boolean KeyState[255 + 1];
return subMainGameLoop;
}
-int subMainGameLoop_Main()
+int subMainGameLoop_Main(byte action, boolean warp_mode)
{
int subMainGameLoop;
int bx;
// loc_g_186F:
- subProcessKeyboardInput(); // Check keyboard, act on keys
+ subProcessKeyboardInput(action); // Check keyboard, act on keys
// 'HACK:
// TimerVar = TimerVar + 1
return subMainGameLoop;
} // subMainGameLoop
+#if 0
+
int subMainGameLoop()
{
int subMainGameLoop;
return subMainGameLoop;
} // subMainGameLoop
+#endif
+
void subUpdatePlayingTime()
{
}
extern int subCalculateScreenScrollPos();
extern int subMainGameLoop();
extern int subMainGameLoop_Init();
-extern int subMainGameLoop_Main();
+extern int subMainGameLoop_Main(byte, boolean);
extern void subUpdatePlayingTime();
extern boolean AutoScrollFlag;
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
{
- subMainGameLoop_Main();
+ byte single_player_action = action[0];
+
+ subMainGameLoop_Main(single_player_action, warp_mode);
}