From: Holger Schemel Date: Sat, 25 Jan 2003 02:26:43 +0000 (+0100) Subject: rnd-20030125-1-src X-Git-Tag: 3.0.0^2~162 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c5ee7e4524f10322894b2547337e4c973a80a552;p=rocksndiamonds.git rnd-20030125-1-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index f5b03877..9c608bbc 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -37,6 +37,7 @@ struct ConfigInfo image_config_suffix[] = { ".mode_random", "false", TYPE_BOOLEAN }, { ".mode_reverse", "false", TYPE_BOOLEAN }, { ".global_sync", "false", TYPE_BOOLEAN }, + { ".name", ARG_UNDEFINED, TYPE_STRING }, { NULL, NULL, 0 } }; diff --git a/src/conftime.h b/src/conftime.h index a93eb58f..93641032 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-01-21 03:57]" +#define COMPILE_DATE_STRING "[2003-01-25 03:22]" diff --git a/src/editor.c b/src/editor.c index 688a63b7..a1fa7ba1 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1563,13 +1563,22 @@ static void ReinitializeElementListButtons() static char *getElementInfoText(int element) { - char *info_text = "unknown"; + char *info_text = NULL; + + if (element < NUM_FILE_ELEMENTS) + { + if (element_info[element].custom_description != NULL) + info_text = element_info[element].custom_description; + else if (element_info[element].editor_description != NULL) + info_text = element_info[element].editor_description; + } + + if (info_text == NULL) + { + info_text = "unknown"; - if (element < NUM_FILE_ELEMENTS && - element_info[element].editor_description != NULL) - info_text = element_info[element].editor_description; - else Error(ERR_WARN, "no element description for element %d", element); + } return info_text; } @@ -4334,6 +4343,7 @@ void HandleLevelEditorIdle() { static unsigned long action_delay = 0; unsigned long action_delay_value = GameFrameDelay; + int graphic = el2img(properties_element); int xpos = 1, ypos = 2; if (edit_mode != ED_MODE_PROPERTIES) @@ -4343,11 +4353,10 @@ void HandleLevelEditorIdle() return; #if 1 - DrawGraphicAnimationExt(drawto, SX + xpos * TILEX, SY + ypos * TILEY + MINI_TILEY / 2, - el2img(properties_element), -1, NO_MASKING); + graphic, -1, NO_MASKING); #else DrawGraphicAnimationExt(drawto, diff --git a/src/files.c b/src/files.c index 0e263663..ff594971 100644 --- a/src/files.c +++ b/src/files.c @@ -1593,3 +1593,35 @@ void SaveSetup() SetFilePermissions(filename, PERMS_PRIVATE); } + +void LoadCustomElementDescriptions() +{ + char *filename = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS); + struct SetupFileList *setup_file_list; + int i; + + for (i=0; i