projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
148d0ad
)
rnd-20091012-1-src
author
Holger Schemel
<info@artsoft.org>
Sun, 11 Oct 2009 22:35:20 +0000
(
00:35
+0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Aug 2014 08:57:41 +0000
(10:57 +0200)
src/conftime.h
patch
|
blob
|
history
src/game.c
patch
|
blob
|
history
src/game_sp/DoGameStuff.c
patch
|
blob
|
history
src/game_sp/MainForm.c
patch
|
blob
|
history
src/game_sp/MainGameLoop.c
patch
|
blob
|
history
src/game_sp/Murphy.c
patch
|
blob
|
history
src/game_sp/export.h
patch
|
blob
|
history
src/game_sp/main.c
patch
|
blob
|
history
src/game_sp/main_sp.h
patch
|
blob
|
history
src/game_sp/modAnimations.c
patch
|
blob
|
history
diff --git
a/src/conftime.h
b/src/conftime.h
index a00952ee912e77828976725748000c2645d5a8e7..b228a4cccf0ed8ebe24c4550ac81de9acfbb97c9 100644
(file)
--- a/
src/conftime.h
+++ b/
src/conftime.h
@@
-1
+1
@@
-#define COMPILE_DATE_STRING "2009-10-1
1 22:17
"
+#define COMPILE_DATE_STRING "2009-10-1
2 00:32
"
diff --git
a/src/game.c
b/src/game.c
index daf96fe52f7da0c1e22d0cfc4b6fa5539d17bd27..eb115cb3978c1e6e27da7a57d7a196f9b683b1b2 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-12037,6
+12037,18
@@
static void CheckLevelTime()
level.native_em_level->ply[3]->alive == 0) /* all dead */
AllPlayersGone = TRUE;
}
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)
{
if (TimeFrames >= FRAMES_PER_SECOND)
{
diff --git
a/src/game_sp/DoGameStuff.c
b/src/game_sp/DoGameStuff.c
index 458f8aa653075e9f05c2d0aa4c929ba4201a0ec0..3d856d542da029eb0cd8adcce9c509b85644dcd5 100644
(file)
--- a/
src/game_sp/DoGameStuff.c
+++ b/
src/game_sp/DoGameStuff.c
@@
-85,6
+85,21
@@
int subDoGameStuff()
ExplodeFieldSP(MurphyExplodePos); // Explode
LeadOutCounter = 0x40; // quit: start lead-out
}
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:
} // loc_g_22FB:
diff --git
a/src/game_sp/MainForm.c
b/src/game_sp/MainForm.c
index 1358ab0278fe819540ac5c5d8593c1b25f54b691..4f7bee91c9cf26c209f0b9e9f882bdb04dfce4ed 100644
(file)
--- a/
src/game_sp/MainForm.c
+++ b/
src/game_sp/MainForm.c
@@
-2523,7
+2523,7
@@
void menPlay_Click()
}
}
-#if
0
+#if
1
// static void menPlayDemo_Click()
void menPlayDemo_Click()
// static void menPlayDemo_Click()
void menPlayDemo_Click()
@@
-2538,7
+2538,7
@@
void menPlayDemo_Click()
menPlay_Click();
#if 1
menPlay_Click();
#if 1
- return;
+ return;
/* return after initialization phase */
#endif
#if 0
#endif
#if 0
diff --git
a/src/game_sp/MainGameLoop.c
b/src/game_sp/MainGameLoop.c
index 99c5dbe4496203bdde12c10eac4b96a40707ecaf..fd3fa85999f92441c50eeb10ffec323e3a5ac608 100644
(file)
--- a/
src/game_sp/MainGameLoop.c
+++ b/
src/game_sp/MainGameLoop.c
@@
-206,11
+206,17
@@
locRepeatMainGameLoop: // start repeating game loop
// .Refresh
// End With
// End If
// .Refresh
// End With
// End If
+
if (ExitToMenuFlag == 1)
goto locExitMainGameLoop;
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;
if (LeadOutCounter == 0) // no lead-out: game busy
goto locRepeatMainGameLoop;
+#endif
// ----------------------------------------------------------------------------
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
// ----------------------------------------------------------------------------
// ---------------------- END OF GAME-BUSY LOOP -------------------------------
diff --git
a/src/game_sp/Murphy.c
b/src/game_sp/Murphy.c
index bcd61200f89d6973bab19df1fdf29d10ea7d16fa..bab25f71e2d202a7649bd4ccadcf8efe8cf77bc0 100644
(file)
--- a/
src/game_sp/Murphy.c
+++ b/
src/game_sp/Murphy.c
@@
-932,9
+932,12
@@
loc_g_6756:
return subAnimateMurphy;
#if 1
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
#endif
+ game_sp_info.LevelSolved = TRUE;
+
subSoundFXExit();
data_h_DemoDone = 1; // EP set level success bytes
LevelStatus = 1; // set Level Status DONE
subSoundFXExit();
data_h_DemoDone = 1; // EP set level success bytes
LevelStatus = 1; // set Level Status DONE
diff --git
a/src/game_sp/export.h
b/src/game_sp/export.h
index ffd787839b2e2b0be04ccd905108ae39e1852dad..552e2ecb14a303618088f650666be38f6ec4eb14 100644
(file)
--- a/
src/game_sp/export.h
+++ b/
src/game_sp/export.h
@@
-80,6
+80,8
@@
struct GlobalInfo_SP
struct GameInfo_SP
{
struct GameInfo_SP
{
+ boolean LevelSolved;
+ boolean GameOver;
};
struct LevelInfo_SP
};
struct LevelInfo_SP
@@
-125,6
+127,7
@@
struct EngineSnapshotInfo_SP
/* ------------------------------------------------------------------------- */
extern struct GlobalInfo_SP global_sp_info;
/* ------------------------------------------------------------------------- */
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];
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];
diff --git
a/src/game_sp/main.c
b/src/game_sp/main.c
index 702cb7d36e0367a7752df1e4b56cf5b4b3c304c7..3139a0206ef16793b1cc9ee1b048e131a0ee488c 100644
(file)
--- a/
src/game_sp/main.c
+++ b/
src/game_sp/main.c
@@
-3,10
+3,14
@@
#include "global.h"
#include "global.h"
+struct GameInfo_SP game_sp_info;
struct LevelInfo_SP native_sp_level;
void InitGameEngine_SP()
{
struct LevelInfo_SP native_sp_level;
void InitGameEngine_SP()
{
+ game_sp_info.LevelSolved = FALSE;
+ game_sp_info.GameOver = FALSE;
+
#if 0
menPlay_Click();
#else
#if 0
menPlay_Click();
#else
@@
-22,4
+26,5
@@
void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
{
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
{
+ subMainGameLoop_Main();
}
}
diff --git
a/src/game_sp/main_sp.h
b/src/game_sp/main_sp.h
index 0c0db95bbb9283a2f853c2b6717586418606f31c..d9294194132c2bf45cafe567410fcba0ef5b0de1 100644
(file)
--- a/
src/game_sp/main_sp.h
+++ b/
src/game_sp/main_sp.h
@@
-60,8
+60,6
@@
extern struct LevelInfo_SP native_sp_level;
extern struct LevelInfo_SP native_sp_level;
-extern struct GameInfo_SP game_sp;
-
extern Bitmap *screenBitmap;
extern Bitmap *sp_objects;
extern Bitmap *screenBitmap;
extern Bitmap *sp_objects;
diff --git
a/src/game_sp/modAnimations.c
b/src/game_sp/modAnimations.c
index 3f9a1e882e865a3a9a779addc92b52986b37aac8..7cd0123a10930fc68e1ae6ed0d29e6816fe8ee48 100644
(file)
--- a/
src/game_sp/modAnimations.c
+++ b/
src/game_sp/modAnimations.c
@@
-70,7
+70,7
@@
void GoPlay()
// Call subFetchAndInitLevelB
EndFlag = False;
// Call subFetchAndInitLevelB
EndFlag = False;
-#if
0
+#if
1
subMainGameLoop_Init();
#else
subMainGameLoop();
subMainGameLoop_Init();
#else
subMainGameLoop();