projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20040927-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 7d0c60eb83580239c4ea956f11e205189bbc1409..62c70419496359931596b6111216080ebed8c4db 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-2061,15
+2061,9
@@
void InitGame()
CloseDoor(DOOR_CLOSE_1);
/* !!! FIX THIS (START) !!! */
CloseDoor(DOOR_CLOSE_1);
/* !!! FIX THIS (START) !!! */
- if (level.
file_info.type == LEVEL_FIL
E_TYPE_EM)
+ if (level.
game_engine_type == GAME_ENGIN
E_TYPE_EM)
{
{
- if (em_main_init_game(level_nr, level.file_info.filename) != 0)
- {
- game_status = GAME_MODE_MAIN;
- DrawMainMenu();
-
- return;
- }
+ InitGameEngine_EM();
}
else
{
}
else
{
@@
-8535,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;
@@
-8548,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)
{
@@
-8595,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
@@
-12399,6
+12394,11
@@
static void PlayLevelMusic()
PlayMusic(MAP_NOCONF_MUSIC(level_nr)); /* from music dir */
}
PlayMusic(MAP_NOCONF_MUSIC(level_nr)); /* from music dir */
}
+void PlayLevelSound_EM(int x, int y, int element, int action)
+{
+ PlayLevelSoundElementAction(x, y, element, action);
+}
+
void RaiseScore(int value)
{
local_player->score += value;
void RaiseScore(int value)
{
local_player->score += value;