From cdf554f6229e6eafe2f19519adfe90c74e3449f2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 29 Jan 1999 02:21:01 +0100 Subject: [PATCH] rnd-19990129-1 --- src/buttons.c | 2 +- src/editor.c | 13 +-- src/main.c | 260 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.h | 1 + 4 files changed, 269 insertions(+), 7 deletions(-) diff --git a/src/buttons.c b/src/buttons.c index e63a2b2d..5fba665c 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -1862,7 +1862,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap) case GDI_INFO_TEXT: { - int max_textsize = MAX_INFO_TEXTSIZE; + int max_textsize = MAX_INFO_TEXTSIZE - 1; strncpy(gi->info_text, va_arg(ap, char *), max_textsize); gi->info_text[max_textsize] = '\0'; diff --git a/src/editor.c b/src/editor.c index 99997f26..d4f68daa 100644 --- a/src/editor.c +++ b/src/editor.c @@ -95,7 +95,7 @@ ED_ELEMENTLIST_BUTTONS_VERT) /* values for the setting windows */ -#define ED_SETTINGS_XPOS (MINI_TILEX + 8 * 1) +#define ED_SETTINGS_XPOS (MINI_TILEX + 8) #define ED_SETTINGS2_XPOS MINI_TILEX #define ED_SETTINGS_YPOS MINI_TILEY #define ED_SETTINGS2_YPOS (ED_SETTINGS_YPOS + 12 * TILEY - 2) @@ -1221,7 +1221,7 @@ static void CreateControlButtons() deco_ypos = (ED_ELEMENTLIST_YSIZE - MINI_TILEY) / 2; gi = CreateGadget(GDI_CUSTOM_ID, id, - GDI_INFO_TEXT, "choose element", + GDI_INFO_TEXT, element_info[editor_element[i]], GDI_X, DX + gd_xoffset, GDI_Y, DY + gd_yoffset, GDI_WIDTH, ED_ELEMENTLIST_XSIZE, @@ -2334,7 +2334,7 @@ static void DrawPropertiesWindow() SY + ystart * MINI_TILEY - MINI_TILEY/2); DrawTextF((xstart + 3) * MINI_TILEX, (ystart + 1) * MINI_TILEY, - font_color, "Current Element"); + font_color, element_info[properties_element]); num_elements_in_level = 0; for (y=0; ydeco.design; + struct GadgetDesign *gd = &gi->deco.design; + int element = editor_element[element_shift + i]; UnmapGadget(gi); - getMiniGraphicSource(el2gfx(editor_element[element_shift + i]), - &design->pixmap, &design->x, &design->y); + getMiniGraphicSource(el2gfx(element), &gd->pixmap, &gd->x, &gd->y); + ModifyGadget(gi, GDI_INFO_TEXT, element_info[element], GDI_END); MapGadget(gi); } break; diff --git a/src/main.c b/src/main.c index 106fda22..565394fc 100644 --- a/src/main.c +++ b/src/main.c @@ -197,6 +197,266 @@ int background_loop[] = }; int num_bg_loops = sizeof(background_loop)/sizeof(int); +char *element_info[] = +{ + "empty space", + "sand", + "normal wall", + "round wall", + "rock", + "key", + "emerald", + "closed exit", + "player", + "bug", + "spaceship", + "yam yam", + "robot", + "steel wall", + "diamond", + "dead amoeba", + "empty quicksand", + "quicksand with rock", + "amoeba drop", + "bomb", + "magic wall", + "speed ball", + "acid pool", + "dropping amoeba", + "normal amoeba", + "nut with emerald", + "life wall", + "biomaze", + "burning dynamite", + "unknown", + "magic wheel", + "running wire", + "red key", + "yellow key", + "green key", + "blue key", + "red door", + "yellow door", + "green door", + "blue door", + "grey door (opened by red key)", + "grey door (opened by yellow key)", + "grey door (opened by green key)", + "grey door (opened by blue key)", + "dynamite", + "pac man", + "invisible normal wall", + "light bulb (dark)", + "ligh bulb (glowing)", + "wall with emerald", + "wall with diamond", + "amoeba with content", + "amoeba (BD style)", + "time orb (full)", + "time orb (empty)", + "growing wall", + "diamond (BD style)", + "yellow emerald", + "wall with BD style diamond", + "wall with yellow emerald", + "dark yam yam", + "magic wall (BD style)", + "invisible steel wall", + "dynabomb", + "increases number of bombs", + "increases explosion size", + "increases power of explosion", + "sokoban object", + "sokoban empty field", + "sokoban field with object", + "butterfly (starts moving right)", + "butterfly (starts moving up)", + "butterfly (starts moving left)", + "butterfly (starts moving down)", + "firefly (starts moving right)", + "firefly (starts moving up)", + "firefly (starts moving left)", + "firefly (starts moving down)", + "butterfly", + "firefly", + "yellow player", + "red player", + "green player", + "blue player", + "bug (starts moving right)", + "bug (starts moving up)", + "bug (starts moving left)", + "bug (starts moving down)", + "spaceship (starts moving right)", + "spaceship (starts moving up)", + "spaceship (starts moving left)", + "spaceship (starts moving down)", + "pac man (starts moving right)", + "pac man (starts moving up)", + "pac man (starts moving left)", + "pac man (starts moving down)", + "red emerald", + "violet emerald", + "wall with red emerald", + "wall with violet emerald", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "open exit", + "unknown", + "amoeba", + "mole", + "penguin", + "satellite", + "arrow left", + "arrow right", + "arrow up", + "arrow down", + "pig", + "fire breathing dragon", + "unknown", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "letter", + "growing wall (horizontally)", + "growing wall (vertically)", + "growing wall (all directions)", + "unused", + "unused", + "unused", + "unused", + "unused", + "unused", + "unused", + "empty space", + "zonk", + "base", + "murphy", + "infotron", + "chip (single)", + "hardware", + "exit", + "orange disk", + "port (leading right)", + "port (leading down)", + "port (leading left)", + "port (leading up)", + "port (leading right)", + "port (leading down)", + "port (leading left)", + "port (leading up)", + "snik snak", + "yellow disk", + "terminal", + "red disk", + "port (vertically)", + "port (horizontally)", + "port (all directions)", + "electron", + "buggy base", + "chip (left half)", + "chip (right half)", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "hardware", + "chip (upper half)", + "chip (lower half)", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown", + "unknown" +}; + int main(int argc, char *argv[]) { program_name = (strrchr(argv[0],'/') ? strrchr(argv[0],'/') + 1 : argv[0]); diff --git a/src/main.h b/src/main.h index 11455441..900c5ed4 100644 --- a/src/main.h +++ b/src/main.h @@ -472,6 +472,7 @@ extern struct SetupFileList *level_setup_list; extern char *sound_name[]; extern int background_loop[]; extern int num_bg_loops; +extern char *element_info[]; /* often used screen positions */ -- 2.34.1