From: Holger Schemel Date: Thu, 20 Feb 2020 00:31:59 +0000 (+0100) Subject: extended maximum number of android clone elements from 16 to 32 X-Git-Tag: 4.2.0.0~88 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=93d40da6020c70d47690dabb0498648bfb46da1a;p=rocksndiamonds.git extended maximum number of android clone elements from 16 to 32 This change was needed because some native EM/EMC levels (like level 71 from level set "EMC Mine 4") filled more than 16 clone elements into the element list for the "android" game element, so it was not possible to inspect all clone elements in the level editor (or build a similar level in the editor). While the level ran just fine in the native EM engine, the maximum number of android clone elements was increased to 32 for the R'n'D level editor and level format. (Levels using the previous chunk that was limited to 16 game elements can still be loaded and played, but new levels will now be saved with the new, extended chunk.) --- diff --git a/src/editor.c b/src/editor.c index 89df2f00..3f56f42a 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3597,11 +3597,11 @@ static struct // ---------- android content ----------------------------------------------- { - ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(5), + ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(6), ED_AREA_1X1_SETTINGS_XOFF, ED_AREA_1X1_SETTINGS_YOFF, GADGET_ID_ANDROID_CONTENT, GADGET_ID_NONE, &level.android_clone_element[0], MAX_ANDROID_ELEMENTS, 1, - "elements:", NULL, NULL, NULL, "elements android can clone" + NULL, NULL, "elements:", NULL, "elements android can clone" }, // ---------- amoeba content ------------------------------------------------ diff --git a/src/files.c b/src/files.c index bc076598..14f9f175 100644 --- a/src/files.c +++ b/src/files.c @@ -768,9 +768,15 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] = &li.android_clone_time, 10 }, { - EL_EMC_ANDROID, -1, + EL_EMC_ANDROID, SAVE_CONF_NEVER, TYPE_ELEMENT_LIST, CONF_VALUE_BYTES(1), &li.android_clone_element[0], EL_EMPTY, NULL, + &li.num_android_clone_elements, 1, MAX_ANDROID_ELEMENTS_OLD + }, + { + EL_EMC_ANDROID, -1, + TYPE_ELEMENT_LIST, CONF_VALUE_BYTES(2), + &li.android_clone_element[0], EL_EMPTY, NULL, &li.num_android_clone_elements, 1, MAX_ANDROID_ELEMENTS }, diff --git a/src/main.h b/src/main.h index 0094b5a7..49a627e7 100644 --- a/src/main.h +++ b/src/main.h @@ -954,7 +954,8 @@ #define MIN_ELEMENTS_IN_GROUP 1 #define MAX_ELEMENTS_IN_GROUP 16 #define MIN_ANDROID_ELEMENTS 1 -#define MAX_ANDROID_ELEMENTS 16 +#define MAX_ANDROID_ELEMENTS 32 +#define MAX_ANDROID_ELEMENTS_OLD 16 // (extended after version 4.1.4.1) // values for elements with content #define MIN_ELEMENT_CONTENTS 1