From: Holger Schemel Date: Tue, 6 Apr 2004 23:22:20 +0000 (+0200) Subject: rnd-20040407-1-src X-Git-Tag: 3.1.0^2~25 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=305e08f99e42e56351ee1a56a7e137849c49e101;p=rocksndiamonds.git rnd-20040407-1-src * fixed bug with incorrectly initialized custom element editor graphics * corrected set "Contributions_1995-2000/rnd_kjell_kristiansson": - number of levels corrected from 18 to 17 in "levelinfo.conf" --- diff --git a/ChangeLog b/ChangeLog index 7344cfc5..46ff5538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-04-07 + * fixed bug with incorrectly initialized custom element editor graphics + +2004-04-04 + * corrected set "Contributions_1995-2000/rnd_kjell_kristiansson": + - number of levels corrected from 18 to 17 in "levelinfo.conf" + 2004-03-31 * fixed bug with destroyed robot wheel still attracting robots forever * fixed bug with time gate switch deactivating after robot wheel time diff --git a/src/conftime.h b/src/conftime.h index e7eb87cc..bbc9960a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-04-03 19:34]" +#define COMPILE_DATE_STRING "[2004-04-07 00:46]" diff --git a/src/editor.c b/src/editor.c index 98b8375c..40080479 100644 --- a/src/editor.c +++ b/src/editor.c @@ -6156,7 +6156,7 @@ void DrawLevelEd() redraw_mask |= REDRAW_ALL; - ReinitializeElementListButtons(); /* only needed after setup changes */ + ReinitializeElementListButtons(); /* custom element may look different */ #if 0 ModifyEditorElementList(); /* may be needed for custom elements */ #endif diff --git a/src/files.c b/src/files.c index c07a04c5..929d38dc 100644 --- a/src/files.c +++ b/src/files.c @@ -2095,6 +2095,11 @@ static void LoadLevel_InitVersion(struct LevelInfo *level, char *filename) pre-2.0 levels, where the game version is still taken from the file format version used to store the level -- see above). */ +#if 1 + /* player was faster than enemies in 1.0.0 and before */ + if (level->file_version == FILE_VERSION_1_0) + level->double_speed = TRUE; +#else /* do some special adjustments to support older level versions */ if (level->file_version == FILE_VERSION_1_0) { @@ -2104,8 +2109,9 @@ static void LoadLevel_InitVersion(struct LevelInfo *level, char *filename) /* player was faster than monsters in (pre-)1.0 levels */ level->double_speed = TRUE; } +#endif - /* Default behaviour for EM style gems was "slippery" only in 2.0.1 */ + /* default behaviour for EM style gems was "slippery" only in 2.0.1 */ if (level->game_version == VERSION_IDENT(2,0,1,0)) level->em_slippery_gems = TRUE; diff --git a/src/init.c b/src/init.c index 715a57fd..be534850 100644 --- a/src/init.c +++ b/src/init.c @@ -440,14 +440,15 @@ void InitElementGraphicInfo() int direction = element_to_graphic[i].direction; boolean crumbled = element_to_graphic[i].crumbled; int graphic = element_to_graphic[i].graphic; + int base_graphic = el2baseimg(element); if (graphic_info[graphic].bitmap == NULL) continue; if ((action > -1 || direction > -1 || crumbled == TRUE) && - el2img(element) != -1) + base_graphic != -1) { - boolean base_redefined = getImageListEntry(el2img(element))->redefined; + boolean base_redefined = getImageListEntry(base_graphic)->redefined; boolean act_dir_redefined = getImageListEntry(graphic)->redefined; /* if the base graphic ("emerald", for example) has been redefined, @@ -759,7 +760,8 @@ void InitElementSpecialGraphicInfo() int element = element_to_special_graphic[i].element; int special = element_to_special_graphic[i].special; int graphic = element_to_special_graphic[i].graphic; - boolean base_redefined = getImageListEntry(el2img(element))->redefined; + int base_graphic = el2baseimg(element); + boolean base_redefined = getImageListEntry(base_graphic)->redefined; boolean special_redefined = getImageListEntry(graphic)->redefined; /* if the base graphic ("emerald", for example) has been redefined, diff --git a/src/tools.c b/src/tools.c index fb1e3949..4a4539b4 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2889,6 +2889,11 @@ int el_dir2img(int element, int direction) return el_act_dir2img(element, ACTION_DEFAULT, direction); } +int el2baseimg(int element) +{ + return element_info[element].graphic[ACTION_DEFAULT]; +} + int el2img(int element) { element = GFX_ELEMENT(element); diff --git a/src/tools.h b/src/tools.h index d5170c77..022473a9 100644 --- a/src/tools.h +++ b/src/tools.h @@ -141,6 +141,7 @@ int get_next_element(int); int el_act_dir2img(int, int, int); int el_act2img(int, int); int el_dir2img(int, int); +int el2baseimg(int); int el2img(int); int el2edimg(int); int el2preimg(int);