X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=173c40aa658c7e28a3ea0808b8cc6749a6e5f618;hp=4f0206e36d8b86a21447332f2829f59295bdf67e;hb=55961e9ba1fe67292a41fdcca0056b43bf960a93;hpb=d798911a09cd2a58ccb0378f4a94e6d44b3e0039 diff --git a/src/tools.c b/src/tools.c index 4f0206e3..173c40aa 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3973,7 +3973,9 @@ static int RequestHandleEvents(unsigned int req_state) { if (level_solved) { - SetDrawtoField(DRAW_TO_FIELDBUFFER); + /* the MM game engine does not use a special (scrollable) field buffer */ + if (level.game_engine_type != GAME_ENGINE_TYPE_MM) + SetDrawtoField(DRAW_TO_FIELDBUFFER); HandleGameActions(); @@ -7394,6 +7396,27 @@ int map_element_MM_to_RND(int element_mm) EL_EMPTY); } +int map_action_MM_to_RND(int action_mm) +{ + /* all MM actions are defined to exactly match their RND counterparts */ + return action_mm; +} + +int map_sound_MM_to_RND(int sound_mm) +{ + switch (sound_mm) + { + case SND_MM_GAME_LEVELTIME_CHARGING: + return SND_GAME_LEVELTIME_CHARGING; + + case SND_MM_GAME_HEALTH_CHARGING: + return SND_GAME_HEALTH_CHARGING; + + default: + return SND_UNDEFINED; + } +} + int map_mm_wall_element(int element) { return (element >= EL_MM_STEEL_WALL_START && @@ -8914,6 +8937,8 @@ void ResetFontStatus() void ChangeViewportPropertiesIfNeeded() { + boolean use_mini_tilesize = (level.game_engine_type == GAME_ENGINE_TYPE_MM ? + FALSE : setup.small_game_graphics); int gfx_game_mode = game_status; int gfx_game_mode2 = (game_status == GAME_MODE_EDITOR ? GAME_MODE_DEFAULT : game_status); @@ -8945,9 +8970,7 @@ void ChangeViewportPropertiesIfNeeded() int new_ey = vp_door_3->y; int new_exsize = vp_door_3->width; int new_eysize = vp_door_3->height; - int new_tilesize_var = - (setup.small_game_graphics ? MINI_TILESIZE : game.tile_size); - + int new_tilesize_var = (use_mini_tilesize ? MINI_TILESIZE : game.tile_size); int tilesize = (gfx_game_mode == GAME_MODE_PLAYING ? new_tilesize_var : gfx_game_mode == GAME_MODE_EDITOR ? MINI_TILESIZE : TILESIZE); int new_scr_fieldx = new_sxsize / tilesize;