From c5ee7e4524f10322894b2547337e4c973a80a552 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 25 Jan 2003 03:26:43 +0100 Subject: [PATCH] rnd-20030125-1-src --- src/conf_gfx.c | 1 + src/conftime.h | 2 +- src/editor.c | 23 +- src/files.c | 32 +++ src/files.h | 2 + src/game.c | 549 ++++--------------------------------------- src/init.c | 7 + src/libgame/misc.c | 4 +- src/libgame/misc.h | 1 + src/libgame/system.c | 1 + src/libgame/system.h | 6 + src/libgame/toons.c | 2 +- src/main.c | 3 +- src/main.h | 4 +- src/tools.c | 25 ++ src/tools.h | 3 + 16 files changed, 149 insertions(+), 516 deletions(-) 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