projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20040921-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index eaf9ee12e8bb92dae1e76654a6dbbc120132c40b..8bf4818494aafa34495fd81a1036fb7b778b3037 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1124,6
+1124,14
@@
void DrawGameDoorValues()
DrawGameValue_Time(TimeLeft);
}
DrawGameValue_Time(TimeLeft);
}
+void DrawGameDoorValues_EM(int emeralds, int dynamite, int score, int time)
+{
+ DrawGameValue_Emeralds(emeralds);
+ DrawGameValue_Dynamite(dynamite);
+ DrawGameValue_Score(score);
+ DrawGameValue_Time(time);
+}
+
static void resolve_group_element(int group_element, int recursion_depth)
{
static int group_nr;
static void resolve_group_element(int group_element, int recursion_depth)
{
static int group_nr;
@@
-2052,18
+2060,27
@@
void InitGame()
CloseDoor(DOOR_CLOSE_1);
CloseDoor(DOOR_CLOSE_1);
- DrawLevel();
- DrawAllPlayers();
+ /* !!! FIX THIS (START) !!! */
+ if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
+ {
+ InitGameEngine_EM();
+ }
+ else
+ {
+ DrawLevel();
+ DrawAllPlayers();
- /* after drawing the level, correct some elements */
- if (game.timegate_time_left == 0)
- CloseAllOpenTimegates();
+
/* after drawing the level, correct some elements */
+
if (game.timegate_time_left == 0)
+
CloseAllOpenTimegates();
- if (setup.soft_scrolling)
- BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
+
if (setup.soft_scrolling)
+
BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
- redraw_mask |= REDRAW_FROM_BACKBUFFER;
- FadeToFront();
+ redraw_mask |= REDRAW_FROM_BACKBUFFER;
+ FadeToFront();
+ }
+ /* !!! FIX THIS (END) !!! */
/* copy default game door content to main double buffer */
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
/* copy default game door content to main double buffer */
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
@@
-8512,8
+8529,8
@@
void AdvanceFrameAndPlayerCounters(int player_nr)
void GameActions()
{
void GameActions()
{
- static unsigned long
action
_delay = 0;
- unsigned long
action
_delay_value;
+ static unsigned long
game_frame
_delay = 0;
+ unsigned long
game_frame
_delay_value;
int magic_wall_x = 0, magic_wall_y = 0;
int i, x, y, element, graphic;
byte *recorded_player_action;
int magic_wall_x = 0, magic_wall_y = 0;
int i, x, y, element, graphic;
byte *recorded_player_action;
@@
-8525,15
+8542,15
@@
void GameActions()
if (game_status != GAME_MODE_PLAYING)
return;
if (game_status != GAME_MODE_PLAYING)
return;
-
action
_delay_value =
+
game_frame
_delay_value =
(tape.playing && tape.fast_forward ? FfwdFrameDelay : GameFrameDelay);
if (tape.playing && tape.warp_forward && !tape.pausing)
(tape.playing && tape.fast_forward ? FfwdFrameDelay : GameFrameDelay);
if (tape.playing && tape.warp_forward && !tape.pausing)
-
action
_delay_value = 0;
+
game_frame
_delay_value = 0;
/* ---------- main game synchronization point ---------- */
/* ---------- main game synchronization point ---------- */
- WaitUntilDelayReached(&
action_delay, action
_delay_value);
+ WaitUntilDelayReached(&
game_frame_delay, game_frame
_delay_value);
if (network_playing && !network_player_action_received)
{
if (network_playing && !network_player_action_received)
{
@@
-8572,6
+8589,7
@@
void GameActions()
recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
#if 1
recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
#if 1
+ /* !!! CHECK THIS (tape.pausing is always FALSE here!) !!! */
if (recorded_player_action == NULL && tape.pausing)
return;
#endif
if (recorded_player_action == NULL && tape.pausing)
return;
#endif