rnd-19990129-1
authorHolger Schemel <info@artsoft.org>
Fri, 29 Jan 1999 01:21:01 +0000 (02:21 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:33:21 +0000 (10:33 +0200)
src/buttons.c
src/editor.c
src/main.c
src/main.h

index e63a2b2dc4bf2842fe0a038f5b0ac0f5269cac84..5fba665c84fc70e87d9ae1fc865540f6ffbc81f9 100644 (file)
@@ -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';
index 99997f269aa444611a4671f2aaa0acd98ad426be..d4f68daa3eb0ae819ba586a9d5d139df3df580a6 100644 (file)
@@ -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; y<lev_fieldy; y++) 
@@ -3506,11 +3506,12 @@ static void HandleControlButtons(struct GadgetInfo *gi)
       {
        int gadget_id = GADGET_ID_ELEMENTLIST_FIRST + i;
        struct GadgetInfo *gi = level_editor_gadget[gadget_id];
-       struct GadgetDesign *design = &gi->deco.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;
index 106fda2288e57bc8069a86796d5b2cfd35943d63..565394fc72dc071c39105f94bd52c318c146c9d1 100644 (file)
@@ -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]);
index 11455441440e683378f06b0767313ecf64c1e287..900c5ed43100d5f8e7f7862deb1b3f0fc13aae72 100644 (file)
@@ -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 */