rnd-20051125-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 25 Nov 2005 16:56:40 +0000 (17:56 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:49:24 +0000 (10:49 +0200)
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/init.c
src/main.h
src/screens.c
src/tools.c
src/tools.h

index 9aa3e6bbe9abb401875199a0d7964572eef92175..66b5af444299a28c640883abb84fff5083e4e49d 100644 (file)
@@ -4161,6 +4161,10 @@ struct ConfigInfo image_config[] =
   { "background.EDITOR",                       UNDEFINED_FILENAME      },
   { "background.INFO",                         UNDEFINED_FILENAME      },
   { "background.INFO[ELEMENTS]",               UNDEFINED_FILENAME      },
+  { "background.INFO[MUSIC]",                  UNDEFINED_FILENAME      },
+  { "background.INFO[CREDITS]",                        UNDEFINED_FILENAME      },
+  { "background.INFO[PROGRAM]",                        UNDEFINED_FILENAME      },
+  { "background.INFO[LEVELSET]",               UNDEFINED_FILENAME      },
   { "background.SETUP",                                UNDEFINED_FILENAME      },
   { "background.DOOR",                         UNDEFINED_FILENAME      },
 
index 2d2cc45f745440fbea994ff460ce5e467ae867e0..191d05386cb423bd1f6d680f4268c1785898c791 100644 (file)
 #define IMG_BACKGROUND_EDITOR                          1474
 #define IMG_BACKGROUND_INFO                            1475
 #define IMG_BACKGROUND_INFO_ELEMENTS                   1476
-#define IMG_BACKGROUND_SETUP                           1477
-#define IMG_BACKGROUND_DOOR                            1478
+#define IMG_BACKGROUND_INFO_MUSIC                      1477
+#define IMG_BACKGROUND_INFO_CREDITS                    1478
+#define IMG_BACKGROUND_INFO_PROGRAM                    1479
+#define IMG_BACKGROUND_INFO_LEVELSET                   1480
+#define IMG_BACKGROUND_SETUP                           1481
+#define IMG_BACKGROUND_DOOR                            1482
 
-#define NUM_IMAGE_FILES                                        1479
+#define NUM_IMAGE_FILES                                        1483
 
 #endif /* CONF_GFX_H */
index ab6708a4cd210b25f8f46af5bcbcc8650f8c8d4a..9c17eddb9e7e87ea1fc75e143f81fe4c9f6320f8 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2005-11-22 23:49]"
+#define COMPILE_DATE_STRING "[2005-11-25 10:58]"
index 9e3f01e5554c2b13a0db5c701cd0948ef6205895..2558453cb90993605a73d3686c939d5b40086a2a 100644 (file)
 #define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 33)
 #define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 34)
 #define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 35)
-#define GADGET_ID_CHANGE_USE_ACTION    (GADGET_ID_CHECKBUTTON_FIRST + 36)
+#define GADGET_ID_CHANGE_HAS_ACTION    (GADGET_ID_CHECKBUTTON_FIRST + 36)
 #define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 37)
 #define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 38)
 #define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 39)
 #define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   34
 #define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 35
 #define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    36
-#define ED_CHECKBUTTON_ID_CHANGE_USE_ACTION    37
+#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION    37
 
 #define ED_NUM_CHECKBUTTONS                    38
 
 #define ED_CHECKBUTTON_ID_CUSTOM_LAST  ED_CHECKBUTTON_ID_CUSTOM2_LAST
 
 #define ED_CHECKBUTTON_ID_CHANGE_FIRST ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE
-#define ED_CHECKBUTTON_ID_CHANGE_LAST  ED_CHECKBUTTON_ID_CHANGE_USE_ACTION
+#define ED_CHECKBUTTON_ID_CHANGE_LAST  ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION
 
 /* values for radiobutton gadgets */
 #define ED_RADIOBUTTON_ID_PERCENTAGE   0
@@ -2366,8 +2366,8 @@ static struct
   },
   {
     ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(13),
-    GADGET_ID_CHANGE_USE_ACTION,       GADGET_ID_NONE,
-    &custom_element_change.use_action,
+    GADGET_ID_CHANGE_HAS_ACTION,       GADGET_ID_NONE,
+    &custom_element_change.has_action,
     NULL, NULL,                                "execute action on specified condition"
   },
 };
index 8d3cbc9986c90b83e4536bf78bc15e59f8a1ffb8..f5275728156c3e921462a8cf5d030149262672b1 100644 (file)
@@ -114,7 +114,7 @@ void setElementChangeInfoToDefaults(struct ElementChangeInfo *change)
   change->random_percentage = 100;
   change->replace_when = CP_WHEN_EMPTY;
 
-  change->use_action = FALSE;
+  change->has_action = FALSE;
   change->action_type = CA_NO_ACTION;
   change->action_mode = CA_MODE_UNDEFINED;
   change->action_arg = CA_ARG_UNDEFINED;
@@ -1307,7 +1307,7 @@ static int LoadLevel_CUS4(FILE *file, int chunk_size, struct LevelInfo *level)
                            CH_PAGE_ANY : (1 << change->trigger_page));
 
 #if 1
-    change->use_action = getFile8Bit(file);
+    change->has_action = getFile8Bit(file);
     change->action_type = getFile8Bit(file);
     change->action_mode = getFile8Bit(file);
     change->action_arg = getFile16BitBE(file);
@@ -3411,7 +3411,7 @@ static void SaveLevel_CUS4(FILE *file, struct LevelInfo *level, int element)
 
 #if 1
 
-    putFile8Bit(file, change->use_action);
+    putFile8Bit(file, change->has_action);
     putFile8Bit(file, change->action_type);
     putFile8Bit(file, change->action_mode);
     putFile16BitBE(file, change->action_arg);
index d8039785faa95e2179dfd8d154821fcca63bb23c..23667a16aec7298aaabe1f4c5748af5b3152daa1 100644 (file)
@@ -60,6 +60,8 @@
 
 #define USE_BACK_WALKABLE_BUGFIX       (TRUE   * USE_NEW_STUFF         * 1)
 
+#define TEST_NEW_STUFF                 (TRUE)
+
 
 /* for DigField() */
 #define DF_NO_PUSH             0
@@ -369,9 +371,9 @@ static boolean CheckElementChangeExt(int, int, int, int, int, int, int, int);
 #define CheckElementChange(x, y, e, te, ev)                            \
        CheckElementChangeExt(x, y, e, te, ev, CH_PLAYER_ANY, CH_SIDE_ANY, -1)
 #define CheckElementChangeByPlayer(x, y, e, ev, p, s)                  \
-       CheckElementChangeExt(x, y, e, EL_EMPTY, ev, p, s, CH_PAGE_ANY)
+       CheckElementChangeExt(x, y, e, EL_EMPTY, ev, p, s, -1)
 #define CheckElementChangeBySide(x, y, e, te, ev, s)                   \
-       CheckElementChangeExt(x, y, e, te, ev, CH_PLAYER_ANY, s, CH_PAGE_ANY)
+       CheckElementChangeExt(x, y, e, te, ev, CH_PLAYER_ANY, s, -1)
 #define CheckElementChangeByPage(x, y, e, te, ev, p)                   \
        CheckElementChangeExt(x, y, e, te, ev, CH_PLAYER_ANY, CH_SIDE_ANY, p)
 
@@ -1493,6 +1495,20 @@ static void InitGameEngine()
   }
 #endif
 
+  /* ---------- initialize internal run-time variables ------------- */
+
+  for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
+  {
+    struct ElementInfo *ei = &element_info[EL_CUSTOM_START + i];
+
+    for (j = 0; j < ei->num_change_pages; j++)
+    {
+      ei->change_page[j].can_change_or_has_action =
+       (ei->change_page[j].can_change |
+        ei->change_page[j].has_action);
+    }
+  }
+
   /* ---------- initialize run-time trigger player and element ------------- */
 
   for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
@@ -7907,6 +7923,9 @@ static void ExecuteCustomElementAction(int element, int page)
   int action_arg = change->action_arg;
   int i;
 
+  if (!change->has_action)
+    return;
+
   /* ---------- determine action paramater values ---------- */
 
   int action_arg_element =
@@ -8264,7 +8283,7 @@ static void ChangeElementNowExt(struct ElementChangeInfo *change,
 #endif
 
 #if 0
-  if (change->use_action)
+  if (change->has_action)
     ExecuteCustomElementAction(...);
 #endif
 }
@@ -8557,8 +8576,8 @@ static void ChangeElement(int x, int y, int page)
       return;
     }
 
-#if 1
-    if (change->use_action)
+#if 0
+    if (change->has_action)
       ExecuteCustomElementAction(element, page);
 #endif
 
@@ -8587,17 +8606,19 @@ static boolean CheckTriggeredElementChangeExt(int lx, int ly,
   {
     int element = EL_CUSTOM_START + i;
 
+    boolean change_found = FALSE;
     boolean change_element = FALSE;
     int page = 0;
 
-    if (!CAN_CHANGE(element) || !HAS_ANY_CHANGE_EVENT(element, trigger_event))
+    if (!CAN_CHANGE_OR_HAS_ACTION(element) ||
+       !HAS_ANY_CHANGE_EVENT(element, trigger_event))
       continue;
 
     for (j = 0; j < element_info[element].num_change_pages; j++)
     {
       struct ElementChangeInfo *change = &element_info[element].change_page[j];
 
-      if (change->can_change &&
+      if (change->can_change_or_has_action &&
          change->has_event[trigger_event] &&
          change->trigger_side & trigger_side &&
          change->trigger_player & trigger_player &&
@@ -8610,6 +8631,28 @@ static boolean CheckTriggeredElementChangeExt(int lx, int ly,
                 trigger_element-EL_CUSTOM_START+1, i+1, j, trigger_event);
 #endif
 
+#if 1
+       change->actual_trigger_element = trigger_element;
+       change->actual_trigger_player = EL_PLAYER_1 + log_2(trigger_player);
+
+       if (change->can_change && !change_found)
+       {
+         change_found = TRUE;
+
+         for (y = 0; y < lev_fieldy; y++) for (x = 0; x < lev_fieldx; x++)
+         {
+           if (Feld[x][y] == element)
+           {
+             ChangeDelay[x][y] = 1;
+             ChangeEvent[x][y] = trigger_event;
+             ChangeElement(x, y, j);
+           }
+         }
+       }
+
+       if (change->has_action)
+         ExecuteCustomElementAction(element, j);
+#else
        change_element = TRUE;
        page = j;
 
@@ -8617,9 +8660,11 @@ static boolean CheckTriggeredElementChangeExt(int lx, int ly,
        change->actual_trigger_player = EL_PLAYER_1 + log_2(trigger_player);
 
        break;
+#endif
       }
     }
 
+#if 0
     if (!change_element)
       continue;
 
@@ -8637,6 +8682,7 @@ static boolean CheckTriggeredElementChangeExt(int lx, int ly,
        ChangeElement(x, y, page);
       }
     }
+#endif
   }
 
   return TRUE;
@@ -8673,6 +8719,103 @@ static boolean CheckElementChangeExt(int x, int y,
   }
 #endif
 
+#if 1
+  if (trigger_page < 0)
+  {
+    boolean change_element = FALSE;
+    int i;
+
+    for (i = 0; i < element_info[element].num_change_pages; i++)
+    {
+      struct ElementChangeInfo *change = &element_info[element].change_page[i];
+
+      boolean check_trigger_element =
+       (trigger_event == CE_TOUCHING_X ||
+        trigger_event == CE_HITTING_X ||
+        trigger_event == CE_HIT_BY_X);
+
+      if (change->can_change &&
+         change->has_event[trigger_event] &&
+         change->trigger_side & trigger_side &&
+         change->trigger_player & trigger_player
+#if 1
+         &&
+         (!check_trigger_element ||
+          IS_EQUAL_OR_IN_GROUP(trigger_element, change->trigger_element))
+#endif
+         )
+      {
+       change_element = TRUE;
+       trigger_page = i;
+
+       change->actual_trigger_element = trigger_element;
+       change->actual_trigger_player = EL_PLAYER_1 + log_2(trigger_player);
+
+       break;
+      }
+    }
+
+    if (!change_element)
+      return FALSE;
+  }
+  else
+  {
+    struct ElementInfo *ei = &element_info[element];
+    struct ElementChangeInfo *change = &ei->change_page[trigger_page];
+
+    change->actual_trigger_element = trigger_element;
+    change->actual_trigger_player = EL_PLAYER_1;       /* unused */
+  }
+
+#else
+
+  /* !!! this check misses pages with same event, but different side !!! */
+
+  if (trigger_page < 0)
+    trigger_page = element_info[element].event_page_nr[trigger_event];
+
+  if (!(element_info[element].change_page[trigger_page].trigger_side & trigger_side))
+    return FALSE;
+#endif
+
+  ChangeDelay[x][y] = 1;
+  ChangeEvent[x][y] = trigger_event;
+  ChangeElement(x, y, trigger_page);
+
+  return TRUE;
+}
+
+static boolean CheckElementChangeExtTEST(int x, int y,
+                                    int element,
+                                    int trigger_element,
+                                    int trigger_event,
+                                    int trigger_player,
+                                    int trigger_side,
+                                    int trigger_page)
+{
+  if (!CAN_CHANGE(element) || !HAS_ANY_CHANGE_EVENT(element, trigger_event))
+    return FALSE;
+
+  if (Feld[x][y] == EL_BLOCKED)
+  {
+    Blocked2Moving(x, y, &x, &y);
+    element = Feld[x][y];
+  }
+
+#if 1
+  if (Feld[x][y] != element)   /* check if element has already changed */
+  {
+#if 0
+    printf("::: %d ('%s') != %d ('%s') [%d]\n",
+          Feld[x][y], element_info[Feld[x][y]].token_name,
+          element, element_info[element].token_name,
+          trigger_event);
+#endif
+
+    return FALSE;
+  }
+#endif
+
 #if 1
   if (trigger_page < 0)
   {
@@ -8686,7 +8829,8 @@ static boolean CheckElementChangeExt(int x, int y,
       if (change->can_change &&
          change->has_event[trigger_event] &&
          change->trigger_side & trigger_side &&
-         change->trigger_player & trigger_player)
+         change->trigger_player & trigger_player &&
+         IS_EQUAL_OR_IN_GROUP(trigger_element, change->trigger_element))
       {
        change_element = TRUE;
        trigger_page = i;
@@ -11043,6 +11187,18 @@ void TestIfElementTouchesCustomElement(int x, int y)
     else
       continue;                        /* center and border element do not touch */
 
+#if TEST_NEW_STUFF
+
+    /* check for change of center element (but change it only once) */
+    if (!change_center_element)
+      change_center_element =
+       CheckElementChangeBySide(x, y, center_element, border_element,
+                                CE_TOUCHING_X, border_side);
+
+    /* -> CheckElementChangeExtTEST */
+
+#else
+
     /* check for change of center element (but change it only once) */
     if (IS_CUSTOM_ELEMENT(center_element) &&
        HAS_ANY_CHANGE_EVENT(center_element, CE_TOUCHING_X) &&
@@ -11072,6 +11228,16 @@ void TestIfElementTouchesCustomElement(int x, int y)
       }
     }
 
+#endif
+
+#if TEST_NEW_STUFF
+
+    /* check for change of border element */
+    CheckElementChangeBySide(xx, yy, border_element, center_element,
+                            CE_TOUCHING_X, center_side);
+
+#else
+
     /* check for change of border element */
     if (IS_CUSTOM_ELEMENT(border_element) &&
        HAS_ANY_CHANGE_EVENT(border_element, CE_TOUCHING_X))
@@ -11101,8 +11267,13 @@ void TestIfElementTouchesCustomElement(int x, int y)
        }
       }
     }
+
+#endif
+
   }
 
+#if !TEST_NEW_STUFF
+
   if (change_center_element)
   {
 #if 0
@@ -11112,6 +11283,9 @@ void TestIfElementTouchesCustomElement(int x, int y)
     CheckElementChangeByPage(x, y, center_element, border_trigger_element,
                             CE_TOUCHING_X, center_element_change_page);
   }
+
+#endif
+
 }
 
 void TestIfElementHitsCustomElement(int x, int y, int direction)
@@ -11171,6 +11345,13 @@ void TestIfElementHitsCustomElement(int x, int y, int direction)
                               CE_HIT_BY_SOMETHING, opposite_direction);
 #endif
 
+#if TEST_NEW_STUFF
+
+      CheckElementChangeBySide(x, y, hitting_element, touched_element,
+                              CE_HITTING_X, touched_side);
+
+#else
+
       if (IS_CUSTOM_ELEMENT(hitting_element) &&
          HAS_ANY_CHANGE_EVENT(hitting_element, CE_HITTING_X))
       {
@@ -11197,6 +11378,14 @@ void TestIfElementHitsCustomElement(int x, int y, int direction)
        }
       }
 
+#endif
+
+#if TEST_NEW_STUFF
+
+      CheckElementChangeBySide(hitx, hity, touched_element,
+                              hitting_element, CE_HIT_BY_X, hitting_side);
+#else
+
       if (IS_CUSTOM_ELEMENT(touched_element) &&
          HAS_ANY_CHANGE_EVENT(touched_element, CE_HIT_BY_X))
       {
@@ -11222,6 +11411,8 @@ void TestIfElementHitsCustomElement(int x, int y, int direction)
        }
       }
 
+#endif
+
 #if USE_HIT_BY_SOMETHING_BUGFIX
       CheckElementChangeBySide(hitx, hity, touched_element, hitting_element,
                               CE_HIT_BY_SOMETHING, opposite_direction);
@@ -11289,6 +11480,12 @@ void TestIfElementSmashesCustomElement(int x, int y, int direction)
       CheckElementChangeBySide(hitx, hity, touched_element, hitting_element,
                               CE_SMASHED_BY_SOMETHING, opposite_direction);
 
+#if TEST_NEW_STUFF
+
+      CheckElementChangeBySide(x, y, hitting_element, touched_element,
+                              CE_OTHER_IS_SMASHING, touched_side);
+#else
+
       if (IS_CUSTOM_ELEMENT(hitting_element) &&
          HAS_ANY_CHANGE_EVENT(hitting_element, CE_OTHER_IS_SMASHING))
       {
@@ -11315,6 +11512,14 @@ void TestIfElementSmashesCustomElement(int x, int y, int direction)
        }
       }
 
+#endif
+
+#if TEST_NEW_STUFF
+
+      CheckElementChangeBySide(hitx, hity, touched_element, hitting_element,
+                              CE_OTHER_GETS_SMASHED, hitting_side);
+#else
+
       if (IS_CUSTOM_ELEMENT(touched_element) &&
          HAS_ANY_CHANGE_EVENT(touched_element, CE_OTHER_GETS_SMASHED))
       {
@@ -11339,6 +11544,9 @@ void TestIfElementSmashesCustomElement(int x, int y, int direction)
          }
        }
       }
+
+#endif
+
     }
   }
 }
index 60f11d7631ef4582c26b671573069dc1236b66e6..9fcad89120eb3b07cdc87a97a0ca64b5fc54f7e8 100644 (file)
@@ -3952,9 +3952,13 @@ void InitElementPropertiesEngine(int engine_version)
     /* ---------- HAS_ACTION ----------------------------------------------- */
     SET_PROPERTY(i, EP_HAS_ACTION, FALSE);     /* default: has no action */
     for (j = 0; j < element_info[i].num_change_pages; j++)
-      if (element_info[i].change_page[j].use_action)
+      if (element_info[i].change_page[j].has_action)
        SET_PROPERTY(i, EP_HAS_ACTION, TRUE);
 
+    /* ---------- CAN_CHANGE_OR_HAS_ACTION --------------------------------- */
+    SET_PROPERTY(i, EP_CAN_CHANGE_OR_HAS_ACTION, (CAN_CHANGE(i) ||
+                                                 HAS_ACTION(i)));
+
     /* ---------- GFX_CRUMBLED --------------------------------------------- */
 #if 1
     SET_PROPERTY(i, EP_GFX_CRUMBLED,
index c8aca94af96d16e06271779961fb97522ed3f0f0..fcfbf3203a98d1d3aae243c1d9499244c8873a8d 100644 (file)
 
 /* values for internal purpose only (game engine) */
 #define EP_HAS_ACTION          83
+#define EP_CAN_CHANGE_OR_HAS_ACTION    84
 
-#define NUM_ELEMENT_PROPERTIES 84
+#define NUM_ELEMENT_PROPERTIES 85
 
 #define NUM_EP_BITFIELDS       ((NUM_ELEMENT_PROPERTIES + 31) / 32)
 #define EP_BITFIELD_BASE       0
 #define COULD_MOVE_INTO_ACID(e)        HAS_PROPERTY(e, EP_COULD_MOVE_INTO_ACID)
 #define MAYBE_DONT_COLLIDE_WITH(e) HAS_PROPERTY(e, EP_MAYBE_DONT_COLLIDE_WITH)
 #define HAS_ACTION(e)          HAS_PROPERTY(e, EP_HAS_ACTION)
+#define CAN_CHANGE_OR_HAS_ACTION(e)    \
+                               HAS_PROPERTY(e, EP_CAN_CHANGE_OR_HAS_ACTION)
 
 /* special macros used in game engine */
 #define IS_CUSTOM_ELEMENT(e)   ((e) >= EL_CUSTOM_START &&              \
@@ -1918,7 +1921,7 @@ struct ElementChangeInfo
 
   boolean explode;             /* explode instead of change */
 
-  boolean use_action;          /* execute action on specified condition */
+  boolean has_action;          /* execute action on specified condition */
   int action_type;             /* type of action */
   int action_mode;             /* mode of action */
   int action_arg;              /* parameter of action */
@@ -1934,6 +1937,8 @@ struct ElementChangeInfo
   short actual_trigger_element;        /* element that actually triggered change */
   int actual_trigger_player;   /* player which actually triggered change */
 
+  boolean can_change_or_has_action;    /* can_change | has_action */
+
   /* ---------- internal values used in level editor ---------- */
 
   int direct_action;           /* change triggered by actions on element */
index c8bcf368cc70cfa75970449d2bbab67f280764f0..43a9b6079252a0fc2b42de9f09d1a6ad48659ced 100644 (file)
@@ -750,7 +750,10 @@ void DrawInfoScreen_HelpAnim(int start, int max_anims, boolean init)
     for (i = 0; i < MAX_INFO_ELEMENTS_ON_SCREEN; i++)
       infoscreen_step[i] = infoscreen_frame[i] = 0;
 
+#if 0
     SetMainBackgroundImage(IMG_BACKGROUND_INFO);
+#endif
+
     ClearWindow();
     DrawHeadline();
 
@@ -896,6 +899,8 @@ void DrawInfoScreen_HelpText(int element, int action, int direction, int ypos)
 
 void DrawInfoScreen_Elements()
 {
+  SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_ELEMENTS);
+
   LoadHelpAnimInfo();
   LoadHelpTextInfo();
 
@@ -971,6 +976,8 @@ void HandleInfoScreen_Elements(int button)
 
 void DrawInfoScreen_Music()
 {
+  SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_MUSIC);
+
   ClearWindow();
   DrawHeadline();
 
@@ -1103,6 +1110,8 @@ void DrawInfoScreen_Credits()
   int ystart = 150, ystep = 30;
   int ybottom = SYSIZE - 20;
 
+  SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_CREDITS);
+
   FadeSoundsAndMusic();
 
   ClearWindow();
@@ -1151,6 +1160,8 @@ void DrawInfoScreen_Program()
   int ystart = 150, ystep = 30;
   int ybottom = SYSIZE - 20;
 
+  SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_PROGRAM);
+
   ClearWindow();
   DrawHeadline();
 
@@ -1228,6 +1239,8 @@ void DrawInfoScreen_LevelSet()
   int max_chars_per_line = (SXSIZE - 2 * pad_x) / font_width;
   int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
 
+  SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
+
   ClearWindow();
   DrawHeadline();
 
index eedf5d60284157f4aa9c79b60d0d49ff43cde1ad..883a670f9993dcfa3ca8e10e0de7bc58b04a2aaa 100644 (file)
@@ -425,6 +425,12 @@ void FadeToFront()
   BackToFront();
 }
 
+void SetMainBackgroundImageIfDefined(int graphic)
+{
+  if (graphic_info[graphic].bitmap)
+    SetMainBackgroundImage(graphic);
+}
+
 void SetMainBackgroundImage(int graphic)
 {
   SetMainBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL :
index f41b0f83308646597b2ce278531ed6bb77c087ca..8d288b8aab8e809d156911f4ce3d5c2d10a8d2ae 100644 (file)
@@ -65,6 +65,7 @@ void RedrawPlayfield(boolean, int, int, int, int);
 void BackToFront();
 void FadeToFront();
 void ClearWindow();
+void SetMainBackgroundImageIfDefined(int);
 void SetMainBackgroundImage(int);
 void SetDoorBackgroundImage(int);
 void DrawBackground(int, int, int, int);