From 7efb5fe320faf4801e52a6b36e91dc9b3a6f73f4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 6 Mar 2017 18:29:25 +0100 Subject: [PATCH] added function to map editor elements to game elements for MM wall elements --- src/tools.c | 15 +++++++++++++++ src/tools.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/tools.c b/src/tools.c index 3dd167c7..a51f2f69 100644 --- a/src/tools.c +++ b/src/tools.c @@ -7365,6 +7365,21 @@ int map_mm_wall_element(int element) element); } +int map_mm_wall_element_editor(int element) +{ + switch (element) + { + case EL_MM_STEEL_WALL: return EL_MM_STEEL_WALL_START; + case EL_MM_WOODEN_WALL: return EL_MM_WOODEN_WALL_START; + case EL_MM_ICE_WALL: return EL_MM_ICE_WALL_START; + case EL_MM_AMOEBA_WALL: return EL_MM_AMOEBA_WALL_START; + case EL_DF_STEEL_WALL: return EL_DF_STEEL_WALL_START; + case EL_DF_WOODEN_WALL: return EL_DF_WOODEN_WALL_START; + + default: return element; + } +} + int get_next_element(int element) { switch (element) diff --git a/src/tools.h b/src/tools.h index 7af465eb..6deb4057 100644 --- a/src/tools.h +++ b/src/tools.h @@ -222,6 +222,7 @@ int map_action_SP_to_RND(int); int map_element_RND_to_MM(int); int map_element_MM_to_RND(int); int map_mm_wall_element(int); +int map_mm_wall_element_editor(int); int get_next_element(int); int el_act_dir2img(int, int, int); -- 2.34.1