projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20091101-2-src
[rocksndiamonds.git]
/
src
/
game_sp
/
MainGameLoop.c
diff --git
a/src/game_sp/MainGameLoop.c
b/src/game_sp/MainGameLoop.c
index 79f1ec9c6fbbffbe633f119e9ee2b52b946f2dd4..bae1d6d95d4aa886acbca1a8586bacae1bd36874 100644
(file)
--- a/
src/game_sp/MainGameLoop.c
+++ b/
src/game_sp/MainGameLoop.c
@@
-35,7
+35,7
@@
int subMainGameLoop_Init()
if (DemoFlag != 0)
{
if (DemoFlag != 0)
{
-#if
1
+#if
0
printf("::: playing demo ...\n");
#endif
printf("::: playing demo ...\n");
#endif
@@
-45,7
+45,7
@@
int subMainGameLoop_Init()
}
else // loc_g_1836:
{
}
else // loc_g_1836:
{
-#if
1
+#if
0
printf("::: playing game ...\n");
#endif
printf("::: playing game ...\n");
#endif
@@
-82,7
+82,7
@@
int subMainGameLoop_Init()
return subMainGameLoop;
}
return subMainGameLoop;
}
-int subMainGameLoop_Main()
+int subMainGameLoop_Main(
byte action, boolean warp_mode
)
{
int subMainGameLoop;
int bx;
{
int subMainGameLoop;
int bx;
@@
-155,7
+155,7
@@
locRepeatMainGameLoop: // start repeating game loop
// loc_g_186F:
// loc_g_186F:
- subProcessKeyboardInput(
);
// Check keyboard, act on keys
+ subProcessKeyboardInput(
action);
// Check keyboard, act on keys
// 'HACK:
// TimerVar = TimerVar + 1
// 'HACK:
// TimerVar = TimerVar + 1
@@
-236,9
+236,13
@@
locRepeatMainGameLoop: // start repeating game loop
{
// happens when demo ends or when Murphy enters exit (to be checked)
{
// happens when demo ends or when Murphy enters exit (to be checked)
+#if 0
printf("::: ExitToMenuFlag == True\n");
printf("::: ExitToMenuFlag == True\n");
+#endif
+#if 0
goto locExitMainGameLoop;
goto locExitMainGameLoop;
+#endif
}
#else
if (ExitToMenuFlag == 1)
}
#else
if (ExitToMenuFlag == 1)
@@
-257,6
+261,11
@@
locRepeatMainGameLoop: // start repeating game loop
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
// ----------------------------------------------------------------------------
LeadOutCounter = LeadOutCounter - 1; // do more lead-out after quit
// ---------------------- 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;
#if 1
if (LeadOutCounter != 0) // lead-out not ready: more
return subMainGameLoop;
@@
-270,10
+279,23
@@
locRepeatMainGameLoop: // start repeating game loop
locExitMainGameLoop:
locExitMainGameLoop:
-#if
0
+#if
1
printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter);
printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter);
+ printf("::: [KillMurphyFlag == %d]\n", KillMurphyFlag);
#endif
#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 ...
do
{
DoEvents(); // user may klick on menus or move the window here ...
@@
-306,10
+328,11
@@
locExitMainGameLoop:
if (UpdatedFlag == 0) // update playing time
subUpdatePlayingTime();
if (UpdatedFlag == 0) // update playing time
subUpdatePlayingTime();
-
return subMainGameLoop;
} // subMainGameLoop
return subMainGameLoop;
} // subMainGameLoop
+#if 0
+
int subMainGameLoop()
{
int subMainGameLoop;
int subMainGameLoop()
{
int subMainGameLoop;
@@
-539,6
+562,8
@@
locExitMainGameLoop:
return subMainGameLoop;
} // subMainGameLoop
return subMainGameLoop;
} // subMainGameLoop
+#endif
+
void subUpdatePlayingTime()
{
}
void subUpdatePlayingTime()
{
}