From: Holger Schemel Date: Thu, 23 Feb 2023 15:47:35 +0000 (+0100) Subject: renamed functions X-Git-Tag: 4.3.5.2~35 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=dcfdc42ed1d7bc931b62ee9639af893858889219;p=rocksndiamonds.git renamed functions --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 4b221d0a..486395cd 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -3474,12 +3474,12 @@ static void GameActions_MM_Ext(void) game_mm.ball_choice_pos++; int new_element = native_mm_level.ball_content[element_pos]; - int new_element_unmapped = unmap_element(new_element); + int new_element_base = map_wall_to_base_element(new_element); - if (IS_WALL(new_element_unmapped)) + if (IS_WALL(new_element_base)) { // always use completely filled wall element - new_element = new_element_unmapped | 0x000f; + new_element = new_element_base | 0x000f; } else if (native_mm_level.rotate_ball_content && get_num_elements(new_element) > 1) diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 95e8e21a..dd7edbdf 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -1195,7 +1195,7 @@ int get_rotated_element(int element, int step) return base_element + (element_phase + step + num_elements) % num_elements; } -static int map_element(int element) +int map_wall_from_base_element(int element) { switch (element) { @@ -1210,7 +1210,7 @@ static int map_element(int element) } } -int unmap_element(int element) +int map_wall_to_base_element(int element) { switch (element) { @@ -1227,12 +1227,12 @@ int unmap_element(int element) int el2gfx(int element) { - return el2img_mm(map_element(element)); + return el2img_mm(map_wall_from_base_element(element)); } int el_act2gfx(int element, int action) { - return el_act2img_mm(map_element(element), action); + return el_act2img_mm(map_wall_from_base_element(element), action); } void RedrawPlayfield_MM(void) diff --git a/src/game_mm/mm_tools.h b/src/game_mm/mm_tools.h index c8b1d8b8..f226f420 100644 --- a/src/game_mm/mm_tools.h +++ b/src/game_mm/mm_tools.h @@ -105,7 +105,8 @@ int get_element_phase(int); int get_num_elements(int); int get_rotated_element(int, int); -int unmap_element(int); +int map_wall_from_base_element(int); +int map_wall_to_base_element(int); int el2gfx(int); int el_act2gfx(int, int);