rnd-20070407-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 7 Apr 2007 01:40:23 +0000 (03:40 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:55:26 +0000 (10:55 +0200)
* fixed some general bugs with handling of ".active" elements and fonts

ChangeLog
src/Makefile
src/conf_act.c [new file with mode: 0644]
src/conftime.h
src/game.c
src/init.c
src/libgame/misc.c
src/main.c
src/main.h
src/screens.c

index 7e7139662f17cf4fa2722ba408a637b8d7022925..5fd9585209c18d2f5ce717475b9a1e0c501eee1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-04-05
+       * fixed some general bugs with handling of ".active" elements and fonts
+
 2007-04-04
        * cleanup of game panel elements (some elements were not really needed)
        * added displaying of gravity state (on/off) as new game panel control
index 83f5cdb63822f33d2ff3fb0ab3cda1836fde9888..d13e68bc6ba84e18ad78d1875428c02acfaabbd1 100644 (file)
@@ -197,7 +197,8 @@ CNFS =      conf_gfx.h      \
        conf_fnt.c      \
        conf_g2s.c      \
        conf_g2m.c      \
-       conf_var.c
+       conf_var.c      \
+       conf_act.c
 
 CNFS_CMD = ../Scripts/create_element_defs.pl
 
diff --git a/src/conf_act.c b/src/conf_act.c
new file mode 100644 (file)
index 0000000..e52851e
--- /dev/null
@@ -0,0 +1,360 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2006 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_act.c                                               *
+***********************************************************/
+
+/* ----- this file was automatically generated -- do not edit by hand ----- */
+
+#ifndef CONF_ACT_C
+#define CONF_ACT_C
+
+/* values for active states of elements and fonts */
+
+static struct
+{
+  int element;
+  int element_active;
+}
+element_with_active_state[] =
+{
+  {
+    EL_BD_MAGIC_WALL,
+    EL_BD_MAGIC_WALL_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_1_LEFT,
+    EL_CONVEYOR_BELT_1_LEFT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_1_MIDDLE,
+    EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_1_RIGHT,
+    EL_CONVEYOR_BELT_1_RIGHT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_2_LEFT,
+    EL_CONVEYOR_BELT_2_LEFT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_2_MIDDLE,
+    EL_CONVEYOR_BELT_2_MIDDLE_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_2_RIGHT,
+    EL_CONVEYOR_BELT_2_RIGHT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_3_LEFT,
+    EL_CONVEYOR_BELT_3_LEFT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_3_MIDDLE,
+    EL_CONVEYOR_BELT_3_MIDDLE_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_3_RIGHT,
+    EL_CONVEYOR_BELT_3_RIGHT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_4_LEFT,
+    EL_CONVEYOR_BELT_4_LEFT_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_4_MIDDLE,
+    EL_CONVEYOR_BELT_4_MIDDLE_ACTIVE
+  },
+  {
+    EL_CONVEYOR_BELT_4_RIGHT,
+    EL_CONVEYOR_BELT_4_RIGHT_ACTIVE
+  },
+  {
+    EL_DC_GATE_WHITE_GRAY,
+    EL_DC_GATE_WHITE_GRAY_ACTIVE
+  },
+  {
+    EL_DC_MAGIC_WALL,
+    EL_DC_MAGIC_WALL_ACTIVE
+  },
+  {
+    EL_DC_TIMEGATE_SWITCH,
+    EL_DC_TIMEGATE_SWITCH_ACTIVE
+  },
+  {
+    EL_DYNABOMB,
+    EL_DYNABOMB_ACTIVE
+  },
+  {
+    EL_DYNABOMB_PLAYER_1,
+    EL_DYNABOMB_PLAYER_1_ACTIVE
+  },
+  {
+    EL_DYNABOMB_PLAYER_2,
+    EL_DYNABOMB_PLAYER_2_ACTIVE
+  },
+  {
+    EL_DYNABOMB_PLAYER_3,
+    EL_DYNABOMB_PLAYER_3_ACTIVE
+  },
+  {
+    EL_DYNABOMB_PLAYER_4,
+    EL_DYNABOMB_PLAYER_4_ACTIVE
+  },
+  {
+    EL_DYNAMITE,
+    EL_DYNAMITE_ACTIVE
+  },
+  {
+    EL_EMC_DRIPPER,
+    EL_EMC_DRIPPER_ACTIVE
+  },
+  {
+    EL_EMC_FAKE_GRASS,
+    EL_EMC_FAKE_GRASS_ACTIVE
+  },
+  {
+    EL_EMC_GATE_5_GRAY,
+    EL_EMC_GATE_5_GRAY_ACTIVE
+  },
+  {
+    EL_EMC_GATE_6_GRAY,
+    EL_EMC_GATE_6_GRAY_ACTIVE
+  },
+  {
+    EL_EMC_GATE_7_GRAY,
+    EL_EMC_GATE_7_GRAY_ACTIVE
+  },
+  {
+    EL_EMC_GATE_8_GRAY,
+    EL_EMC_GATE_8_GRAY_ACTIVE
+  },
+  {
+    EL_EMC_MAGIC_BALL,
+    EL_EMC_MAGIC_BALL_ACTIVE
+  },
+  {
+    EL_EMC_MAGIC_BALL_SWITCH,
+    EL_EMC_MAGIC_BALL_SWITCH_ACTIVE
+  },
+  {
+    EL_EMC_SPRING_BUMPER,
+    EL_EMC_SPRING_BUMPER_ACTIVE
+  },
+  {
+    EL_EM_DYNAMITE,
+    EL_EM_DYNAMITE_ACTIVE
+  },
+  {
+    EL_EM_GATE_1_GRAY,
+    EL_EM_GATE_1_GRAY_ACTIVE
+  },
+  {
+    EL_EM_GATE_2_GRAY,
+    EL_EM_GATE_2_GRAY_ACTIVE
+  },
+  {
+    EL_EM_GATE_3_GRAY,
+    EL_EM_GATE_3_GRAY_ACTIVE
+  },
+  {
+    EL_EM_GATE_4_GRAY,
+    EL_EM_GATE_4_GRAY_ACTIVE
+  },
+  {
+    EL_GATE_1_GRAY,
+    EL_GATE_1_GRAY_ACTIVE
+  },
+  {
+    EL_GATE_2_GRAY,
+    EL_GATE_2_GRAY_ACTIVE
+  },
+  {
+    EL_GATE_3_GRAY,
+    EL_GATE_3_GRAY_ACTIVE
+  },
+  {
+    EL_GATE_4_GRAY,
+    EL_GATE_4_GRAY_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_BD,
+    EL_INTERNAL_CASCADE_BD_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_CE,
+    EL_INTERNAL_CASCADE_CE_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_CHARS,
+    EL_INTERNAL_CASCADE_CHARS_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_DC,
+    EL_INTERNAL_CASCADE_DC_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_DX,
+    EL_INTERNAL_CASCADE_DX_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_DYNAMIC,
+    EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_EM,
+    EL_INTERNAL_CASCADE_EM_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_EMC,
+    EL_INTERNAL_CASCADE_EMC_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_GE,
+    EL_INTERNAL_CASCADE_GE_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_REF,
+    EL_INTERNAL_CASCADE_REF_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_RND,
+    EL_INTERNAL_CASCADE_RND_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_SB,
+    EL_INTERNAL_CASCADE_SB_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_SP,
+    EL_INTERNAL_CASCADE_SP_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_STEEL_CHARS,
+    EL_INTERNAL_CASCADE_STEEL_CHARS_ACTIVE
+  },
+  {
+    EL_INTERNAL_CASCADE_USER,
+    EL_INTERNAL_CASCADE_USER_ACTIVE
+  },
+  {
+    EL_INVISIBLE_SAND,
+    EL_INVISIBLE_SAND_ACTIVE
+  },
+  {
+    EL_INVISIBLE_STEELWALL,
+    EL_INVISIBLE_STEELWALL_ACTIVE
+  },
+  {
+    EL_INVISIBLE_WALL,
+    EL_INVISIBLE_WALL_ACTIVE
+  },
+  {
+    EL_LAMP,
+    EL_LAMP_ACTIVE
+  },
+  {
+    EL_LIGHT_SWITCH,
+    EL_LIGHT_SWITCH_ACTIVE
+  },
+  {
+    EL_MAGIC_WALL,
+    EL_MAGIC_WALL_ACTIVE
+  },
+  {
+    EL_ROBOT_WHEEL,
+    EL_ROBOT_WHEEL_ACTIVE
+  },
+  {
+    EL_SHIELD_DEADLY,
+    EL_SHIELD_DEADLY_ACTIVE
+  },
+  {
+    EL_SHIELD_NORMAL,
+    EL_SHIELD_NORMAL_ACTIVE
+  },
+  {
+    EL_SP_BUGGY_BASE,
+    EL_SP_BUGGY_BASE_ACTIVE
+  },
+  {
+    EL_SP_DISK_RED,
+    EL_SP_DISK_RED_ACTIVE
+  },
+  {
+    EL_SP_TERMINAL,
+    EL_SP_TERMINAL_ACTIVE
+  },
+  {
+    EL_TIMEGATE_SWITCH,
+    EL_TIMEGATE_SWITCH_ACTIVE
+  },
+  {
+    EL_TRAP,
+    EL_TRAP_ACTIVE
+  },
+  {
+    -1,
+    -1
+  },
+};
+
+
+static struct
+{
+  int font_nr;
+  int font_nr_active;
+}
+font_with_active_state[] =
+{
+  {
+    FONT_INPUT_1,
+    FONT_INPUT_1_ACTIVE
+  },
+  {
+    FONT_INPUT_2,
+    FONT_INPUT_2_ACTIVE
+  },
+  {
+    FONT_LEVEL_NUMBER,
+    FONT_LEVEL_NUMBER_ACTIVE
+  },
+  {
+    FONT_MENU_1,
+    FONT_MENU_1_ACTIVE
+  },
+  {
+    FONT_MENU_2,
+    FONT_MENU_2_ACTIVE
+  },
+  {
+    FONT_TEXT_1,
+    FONT_TEXT_1_ACTIVE
+  },
+  {
+    FONT_TEXT_2,
+    FONT_TEXT_2_ACTIVE
+  },
+  {
+    FONT_TEXT_3,
+    FONT_TEXT_3_ACTIVE
+  },
+  {
+    FONT_TEXT_4,
+    FONT_TEXT_4_ACTIVE
+  },
+  {
+    -1,
+    -1
+  },
+};
+
+#endif /* CONF_ACT_C */
index 6d3909ea4becd1dc0748586098bf403123827497..685202d136af4c4f6c8379b2494a44d9ae1fdca9 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-04-05 02:56"
+#define COMPILE_DATE_STRING "2007-04-07 03:38"
index d159b46fdd1a5843cf2bd899252fb2048f7977e1..2a9eabb016a0ca6c1ac2e69424e736a30cdb9044 100644 (file)
@@ -5465,12 +5465,19 @@ static void InitBeltMovement()
     for (j = 0; j < NUM_BELT_PARTS; j++)
     {
       int element = belt_base_active_element[belt_nr] + j;
-      int graphic = el2img(element);
+      int graphic_1 = el2img(element);
+      int graphic_2 = el2panelimg(element);
 
       if (game.belt_dir[i] == MV_LEFT)
-       graphic_info[graphic].anim_mode &= ~ANIM_REVERSE;
+      {
+       graphic_info[graphic_1].anim_mode &= ~ANIM_REVERSE;
+       graphic_info[graphic_2].anim_mode &= ~ANIM_REVERSE;
+      }
       else
-       graphic_info[graphic].anim_mode |=  ANIM_REVERSE;
+      {
+       graphic_info[graphic_1].anim_mode |=  ANIM_REVERSE;
+       graphic_info[graphic_2].anim_mode |=  ANIM_REVERSE;
+      }
     }
   }
 
@@ -5546,12 +5553,19 @@ static void ToggleBeltSwitch(int x, int y)
   for (i = 0; i < NUM_BELT_PARTS; i++)
   {
     int element = belt_base_active_element[belt_nr] + i;
-    int graphic = el2img(element);
+    int graphic_1 = el2img(element);
+    int graphic_2 = el2panelimg(element);
 
     if (belt_dir == MV_LEFT)
-      graphic_info[graphic].anim_mode &= ~ANIM_REVERSE;
+    {
+      graphic_info[graphic_1].anim_mode &= ~ANIM_REVERSE;
+      graphic_info[graphic_2].anim_mode &= ~ANIM_REVERSE;
+    }
     else
-      graphic_info[graphic].anim_mode |=  ANIM_REVERSE;
+    {
+      graphic_info[graphic_1].anim_mode |=  ANIM_REVERSE;
+      graphic_info[graphic_2].anim_mode |=  ANIM_REVERSE;
+    }
   }
 
   SCAN_PLAYFIELD(xx, yy)
index 08177e1b3cd22e520f2451d5649d1702d0b7e05c..ee8df89223c4cf391781c92fc67f19e46470bc0c 100644 (file)
@@ -32,6 +32,7 @@
 #include "conf_fnt.c"  /* include auto-generated data structure definitions */
 #include "conf_g2s.c"  /* include auto-generated data structure definitions */
 #include "conf_g2m.c"  /* include auto-generated data structure definitions */
+#include "conf_act.c"  /* include auto-generated data structure definitions */
 
 
 #define CONFIG_TOKEN_FONT_INITIAL              "font.initial"
@@ -513,6 +514,16 @@ void InitElementGraphicInfo()
     int graphic   = property_mapping[i].artwork_index;
     boolean crumbled = FALSE;
 
+#if 0
+    if ((element == EL_EM_DYNAMITE ||
+        element == EL_EM_DYNAMITE_ACTIVE) &&
+       action == ACTION_ACTIVE &&
+       (special == GFX_SPECIAL_ARG_EDITOR ||
+        special == GFX_SPECIAL_ARG_PANEL))
+      printf("::: DYNAMIC: %d, %d, %d -> %d\n",
+            element, action, special, graphic);
+#endif
+
     if (special == GFX_SPECIAL_ARG_CRUMBLED)
     {
       special = -1;
@@ -906,6 +917,15 @@ void InitElementSpecialGraphicInfo()
     boolean special_redefined =
       getImageListEntryFromImageID(graphic)->redefined;
 
+#if 0
+    if ((element == EL_EM_DYNAMITE ||
+        element == EL_EM_DYNAMITE_ACTIVE) &&
+       (special == GFX_SPECIAL_ARG_EDITOR ||
+        special == GFX_SPECIAL_ARG_PANEL))
+      printf("::: SPECIAL STATIC: %d, %d -> %d\n",
+            element, special, graphic);
+#endif
+
     /* if the base graphic ("emerald", for example) has been redefined,
        but not the special graphic ("emerald.EDITOR", for example), do not
        use an existing (in this case considered obsolete) special graphic
@@ -919,13 +939,57 @@ void InitElementSpecialGraphicInfo()
   /* initialize special element/graphic mapping from dynamic configuration */
   for (i = 0; i < num_property_mappings; i++)
   {
-    int element = property_mapping[i].base_index;
-    int special = property_mapping[i].ext3_index;
-    int graphic = property_mapping[i].artwork_index;
+    int element   = property_mapping[i].base_index;
+    int action    = property_mapping[i].ext1_index;
+    int direction = property_mapping[i].ext2_index;
+    int special   = property_mapping[i].ext3_index;
+    int graphic   = property_mapping[i].artwork_index;
+
+#if 0
+    if ((element == EL_EM_DYNAMITE ||
+        element == EL_EM_DYNAMITE_ACTIVE ||
+        element == EL_CONVEYOR_BELT_1_MIDDLE ||
+        element == EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE) &&
+       (special == GFX_SPECIAL_ARG_EDITOR ||
+        special == GFX_SPECIAL_ARG_PANEL))
+      printf("::: SPECIAL DYNAMIC: %d, %d -> %d [%d]\n",
+            element, special, graphic, property_mapping[i].ext1_index);
+#endif
+
+#if 0
+    if (element == EL_CONVEYOR_BELT_1_MIDDLE &&
+       action == ACTION_ACTIVE)
+    {
+      element = EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE;
+      action = -1;
+    }
+#endif
+
+#if 0
+    if (element == EL_MAGIC_WALL &&
+       action == ACTION_ACTIVE)
+    {
+      element = EL_MAGIC_WALL_ACTIVE;
+      action = -1;
+    }
+#endif
+
+#if 1
+    /* for action ".active", replace element with active element, if exists */
+    if (action == ACTION_ACTIVE && element != ELEMENT_ACTIVE(element))
+    {
+      element = ELEMENT_ACTIVE(element);
+      action = -1;
+    }
+#endif
 
     if (element >= MAX_NUM_ELEMENTS)
       continue;
 
+    /* do not change special graphic if action or direction was specified */
+    if (action != -1 || direction != -1)
+      continue;
+
     if (IS_SPECIAL_GFX_ARG(special))
       element_info[element].special_graphic[special] = graphic;
   }
@@ -4351,6 +4415,32 @@ static void InitGlobal()
 #endif
   }
 
+  /* always start with reliable default values (all elements) */
+  for (i = 0; i < MAX_NUM_ELEMENTS; i++)
+    ActiveElement[i] = i;
+
+  /* now add all entries that have an active state (active elements) */
+  for (i = 0; element_with_active_state[i].element != -1; i++)
+  {
+    int element = element_with_active_state[i].element;
+    int element_active = element_with_active_state[i].element_active;
+
+    ActiveElement[element] = element_active;
+  }
+
+  /* always start with reliable default values (all fonts) */
+  for (i = 0; i < NUM_FONTS; i++)
+    ActiveFont[i] = i;
+
+  /* now add all entries that have an active state (active fonts) */
+  for (i = 0; font_with_active_state[i].font_nr != -1; i++)
+  {
+    int font = font_with_active_state[i].font_nr;
+    int font_active = font_with_active_state[i].font_nr_active;
+
+    ActiveFont[font] = font_active;
+  }
+
   global.autoplay_leveldir = NULL;
   global.convert_leveldir = NULL;
 
index 95c5dfd3b2b5ed2464ccbf82e443189aa04d2f09..e300b9bb50821b6c4115fb0e2a8181af2ea57de5 100644 (file)
@@ -2322,10 +2322,20 @@ static void LoadArtworkConfigFromFilename(struct ArtworkListInfo *artwork_info,
 
       base_index = i;
 
+#if 0
+      if (IS_PARENT_PROCESS())
+       printf("===> MATCH: '%s', '%s'\n", token, base_prefix);
+#endif
+
       if (start_pos + len_base_prefix == len_token)    /* exact match */
       {
        exact_match = TRUE;
 
+#if 0
+       if (IS_PARENT_PROCESS())
+         printf("===> EXACT MATCH: '%s', '%s'\n", token, base_prefix);
+#endif
+
        add_dynamic_file_list_entry(dynamic_file_list,
                                    num_dynamic_file_list_entries,
                                    extra_file_hash,
@@ -2359,10 +2369,20 @@ static void LoadArtworkConfigFromFilename(struct ArtworkListInfo *artwork_info,
 
        ext1_index = j;
 
+#if 0
+       if (IS_PARENT_PROCESS())
+         printf("===> MATCH: '%s', '%s'\n", token, ext1_suffix);
+#endif
+
        if (start_pos + len_ext1_suffix == len_token)   /* exact match */
        {
          exact_match = TRUE;
 
+#if 0
+       if (IS_PARENT_PROCESS())
+         printf("===> EXACT MATCH: '%s', '%s'\n", token, ext1_suffix);
+#endif
+
          add_dynamic_file_list_entry(dynamic_file_list,
                                      num_dynamic_file_list_entries,
                                      extra_file_hash,
@@ -2401,10 +2421,20 @@ static void LoadArtworkConfigFromFilename(struct ArtworkListInfo *artwork_info,
 
        ext2_index = k;
 
+#if 0
+       if (IS_PARENT_PROCESS())
+         printf("===> MATCH: '%s', '%s'\n", token, ext2_suffix);
+#endif
+
        if (start_pos + len_ext2_suffix == len_token)   /* exact match */
        {
          exact_match = TRUE;
 
+#if 0
+         if (IS_PARENT_PROCESS())
+           printf("===> EXACT MATCH: '%s', '%s'\n", token, ext2_suffix);
+#endif
+
          add_dynamic_file_list_entry(dynamic_file_list,
                                      num_dynamic_file_list_entries,
                                      extra_file_hash,
@@ -2443,10 +2473,20 @@ static void LoadArtworkConfigFromFilename(struct ArtworkListInfo *artwork_info,
 
        ext3_index = l;
 
+#if 0
+       if (IS_PARENT_PROCESS())
+         printf("===> MATCH: '%s', '%s'\n", token, ext3_suffix);
+#endif
+
        if (start_pos + len_ext3_suffix == len_token) /* exact match */
        {
          exact_match = TRUE;
 
+#if 0
+         if (IS_PARENT_PROCESS())
+           printf("===> EXACT MATCH: '%s', '%s'\n", token, ext3_suffix);
+#endif
+
          add_dynamic_file_list_entry(dynamic_file_list,
                                      num_dynamic_file_list_entries,
                                      extra_file_hash,
index 58b615071e65f342c848b215d3b17cc4bca16ab9..0279b1a7271455a6ec959f789b412f1cd2d520c5 100644 (file)
@@ -75,6 +75,9 @@ int                   GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 int                    GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 int                    GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
+int                    ActiveElement[MAX_NUM_ELEMENTS];
+int                    ActiveFont[NUM_FONTS];
+
 int                    lev_fieldx, lev_fieldy;
 int                    scroll_x, scroll_y;
 
index 3bd3d6bebe75a2c1b0b449e262b0d4ed115c828c..eb6b438688736b525534e15efd4dd11a5eecbcc4 100644 (file)
                                 (d) == MV_UP    ? "MV_UP"    :         \
                                 (d) == MV_DOWN  ? "MV_DOWN"  : "(various)")
 
+#define ELEMENT_ACTIVE(e)      (ActiveElement[e])
+
+#define FONT_ACTIVE(f)         (ActiveFont[f])
+
+
 /* fundamental game speed values */
 #define MICROLEVEL_SCROLL_DELAY        50      /* delay for scrolling micro level */
 #define MICROLEVEL_LABEL_DELAY 250     /* delay for micro level label */
 #define NUM_FONTS                      37
 #define NUM_INITIAL_FONTS              4
 
+#if 0
 #define FONT_ACTIVE(f)                                                   \
        ((f) == FONT_MENU_1             ? FONT_MENU_1_ACTIVE            : \
         (f) == FONT_MENU_2             ? FONT_MENU_2_ACTIVE            : \
         (f) == FONT_INPUT_2            ? FONT_INPUT_2_ACTIVE           : \
         (f) == FONT_LEVEL_NUMBER       ? FONT_LEVEL_NUMBER_ACTIVE      : \
         (f))
-
+#endif
 
 /* values for game_status (must match special image configuration suffixes) */
 #define GAME_MODE_DEFAULT              0
@@ -2667,6 +2673,9 @@ extern int                        GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern int                     GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern int                     GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
+extern int                     ActiveElement[MAX_NUM_ELEMENTS];
+extern int                     ActiveFont[NUM_FONTS];
+
 extern int                     lev_fieldx, lev_fieldy;
 extern int                     scroll_x, scroll_y;
 
index fb1fa83758138b38493d9fce5a54aacf2cbd98d8..97b32f42ef5891a96c93fb4c63a2e049e7cbfcae 100644 (file)
@@ -1257,6 +1257,21 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
   title = title_default;
 #endif
 
+#if 0
+  {
+    int graphicA = element_info[EL_EM_DYNAMITE_ACTIVE].special_graphic[GFX_SPECIAL_ARG_EDITOR];
+    int graphicB = element_info[EL_EM_DYNAMITE_ACTIVE].special_graphic[GFX_SPECIAL_ARG_PANEL];
+    int graphic1 = element_info[EL_CONVEYOR_BELT_1_MIDDLE].special_graphic[GFX_SPECIAL_ARG_EDITOR];
+    int graphic2 = element_info[EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE].special_graphic[GFX_SPECIAL_ARG_EDITOR];
+
+    printf("::: %d [%d] -> %d, %d [%d, %d]\n",
+          graphicA, graphicB,
+          graphic_info[graphicA].src_x,
+          graphic_info[graphicA].src_y,
+          graphic1, graphic2);
+  }
+#endif
+
 #if 0
   printf("::: %d, %d\n", fading.anim_mode == ANIM_CROSSFADE,
         redraw_mask == REDRAW_ALL);