rnd-20051123-1-src
[rocksndiamonds.git] / src / init.c
index 798f4b4aab05442ac4d6f0c40db79ce65d710d30..60f11d7631ef4582c26b671573069dc1236b66e6 100644 (file)
@@ -3949,6 +3949,12 @@ void InitElementPropertiesEngine(int engine_version)
       if (element_info[i].change_page[j].can_change)
        SET_PROPERTY(i, EP_CAN_CHANGE, TRUE);
 
+    /* ---------- 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)
+       SET_PROPERTY(i, EP_HAS_ACTION, TRUE);
+
     /* ---------- GFX_CRUMBLED --------------------------------------------- */
 #if 1
     SET_PROPERTY(i, EP_GFX_CRUMBLED,
@@ -4280,6 +4286,11 @@ static void InitSetup()
     options.verbose = TRUE;
 }
 
+static void InitGameInfo()
+{
+  game.restart_level = FALSE;
+}
+
 static void InitPlayerInfo()
 {
   int i;
@@ -4415,7 +4426,7 @@ static void InitArtworkConfig()
 
   for (i = 0; i < NUM_MUSIC_PREFIXES; i++)
     music_id_prefix[i] = music_prefix_info[i].prefix;
-  music_id_prefix[MAX_LEVELS] = NULL;
+  music_id_prefix[NUM_MUSIC_PREFIXES] = NULL;
 
   for (i = 0; i < NUM_ACTIONS; i++)
     action_id_suffix[i] = element_action_info[i].suffix;
@@ -4710,7 +4721,12 @@ static char *getNewArtworkIdentifier(int type)
             artwork_current_identifier) != 0)
     artwork_new_identifier = artwork_current_identifier;
 
+#if 1
+  *(ARTWORK_CURRENT_IDENTIFIER_PTR(artwork, type))= artwork_current_identifier;
+#else
+  /* newer versions of gcc do not like this anymore :-/ */
   *(&(ARTWORK_CURRENT_IDENTIFIER(artwork, type))) = artwork_current_identifier;
+#endif
 
 #if 0
   if (type == ARTWORK_TYPE_GRAPHICS)
@@ -4833,6 +4849,7 @@ void OpenAll()
 
   InitSetup();
 
+  InitGameInfo();
   InitPlayerInfo();
   InitArtworkInfo();           /* needed before loading gfx, sound & music */
   InitArtworkConfig();         /* needed before forking sound child process */