From: Holger Schemel Date: Sun, 22 Jan 2023 10:40:28 +0000 (+0100) Subject: fixed playing older tapes for MM engine X-Git-Tag: 4.3.5.0~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8b514628;p=rocksndiamonds.git fixed playing older tapes for MM engine --- diff --git a/src/game_mm/export.h b/src/game_mm/export.h index b628a8d0..2af2b0ea 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -143,6 +143,8 @@ struct GameInfo_MM int ball_choice_pos; // current content element choice position boolean laser_red, laser_green, laser_blue; + boolean lightball_rnd; + boolean level_solved; boolean game_over; int game_over_cause; diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 326880f1..8583a9a7 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -644,6 +644,8 @@ void InitGameEngine_MM(void) game_mm.laser_green = FALSE; game_mm.laser_blue = TRUE; + game_mm.lightball_rnd = TRUE; + game_mm.level_solved = FALSE; game_mm.game_over = FALSE; game_mm.game_over_cause = 0; @@ -714,6 +716,8 @@ void InitGameActions_MM(void) InitLaser(); + game_mm.lightball_rnd = FALSE; + for (i = 0; i <= num_init_game_frames; i++) { if (i == num_init_game_frames) @@ -749,6 +753,8 @@ void InitGameActions_MM(void) #endif } + game_mm.lightball_rnd = TRUE; + ScanLaser(); if (game_mm.kettles_still_needed == 0) diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index d8dbe8be..44fb257c 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -398,6 +398,11 @@ void DrawField_MM(int x, int y) int element = Tile[x][y]; DrawElement_MM(x, y, element); + + // old game versions randomly changed colors of bonus light balls + if (game.engine_version < VERSION_IDENT(4,3,3,0) && + element == EL_LIGHTBALL && game_mm.lightball_rnd) + RND(3); } void DrawLevel_MM(void)