rnd-20030816-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 16 Aug 2003 17:59:44 +0000 (19:59 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:43:12 +0000 (10:43 +0200)
src/conftime.h
src/game.c
src/init.c
src/screens.c

index c0029802f47c7ef9219c439236f676d1578d5ee8..d4797146f6adbe5a27b4518f3bcaf1c995109119 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-08-15 20:05]"
+#define COMPILE_DATE_STRING "[2003-08-16 19:53]"
index 2f2b0381cd79d02f3e6f12b28bf248b4e196359f..5956c7d899ca466076188317e162b2fbad6382b1 100644 (file)
@@ -1222,47 +1222,60 @@ void InitGame()
   {
     int start_x = 0, start_y = 0;
     int found_rating = 0;
+    int found_element = EL_UNDEFINED;
 
-    for(y=0; y < lev_fieldy; y++)
+    for(y=0; y < lev_fieldy; y++) for(x=0; x < lev_fieldx; x++)
     {
-      for(x=0; x < lev_fieldx; x++)
+      int element = Feld[x][y];
+      int content;
+      int xx, yy;
+      boolean is_player;
+
+      if (!IS_CUSTOM_ELEMENT(element))
+       continue;
+
+      if (CAN_CHANGE(element))
       {
-       int element = Feld[x][y];
+       content = element_info[element].change.target_element;
+       is_player = (ELEM_IS_PLAYER(content) || content == EL_SP_MURPHY);
 
-       if (IS_CUSTOM_ELEMENT(element))
+       if (is_player && (found_rating < 3 || element < found_element))
        {
-         int xx, yy;
+         start_x = x;
+         start_y = y;
 
-         for(yy=0; yy < 3; yy++)
-         {
-           for(xx=0; xx < 3; xx++)
-           {
-             int content;
-             boolean is_player;
+         found_rating = 3;
+         found_element = element;
+       }
+      }
 
-             content = element_info[element].content[xx][yy];
-             is_player = (ELEM_IS_PLAYER(content) || content == EL_SP_MURPHY);
+      for(yy=0; yy < 3; yy++) for(xx=0; xx < 3; xx++)
+      {
+       content = element_info[element].content[xx][yy];
+       is_player = (ELEM_IS_PLAYER(content) || content == EL_SP_MURPHY);
+
+       if (is_player && (found_rating < 2 || element < found_element))
+       {
+         start_x = x + xx - 1;
+         start_y = y + yy - 1;
 
-             if (is_player && found_rating < 2)
-             {
-               start_x = x + xx - 1;
-               start_y = y + yy - 1;
+         found_rating = 2;
+         found_element = element;
+       }
 
-               found_rating = 2;
-             }
+       if (!CAN_CHANGE(element))
+         continue;
 
-             content = element_info[element].change.content[xx][yy];
-             is_player = (ELEM_IS_PLAYER(content) || content == EL_SP_MURPHY);
+       content = element_info[element].change.content[xx][yy];
+       is_player = (ELEM_IS_PLAYER(content) || content == EL_SP_MURPHY);
 
-             if (is_player && found_rating < 1)
-             {
-               start_x = x + xx - 1;
-               start_y = y + yy - 1;
+       if (is_player && (found_rating < 1 || element < found_element))
+       {
+         start_x = x + xx - 1;
+         start_y = y + yy - 1;
 
-               found_rating = 1;
-             }
-           }
-         }
+         found_rating = 1;
+         found_element = element;
        }
       }
     }
index ddb8ff5fece3c0aa3c88a7fa33bc0c1980b2151a..bb214b604b24112384b946c6b3881cf6b5533d25 100644 (file)
@@ -3286,6 +3286,7 @@ static char *getNewArtworkIdentifier(int type)
   char *setup_artwork_set = SETUP_ARTWORK_SET(setup, type);
   char *leveldir_identifier = leveldir_current->identifier;
 #if 1
+  /* !!! setLevelArtworkDir() should be moved to an earlier stage !!! */
   char *leveldir_artwork_set = setLevelArtworkDir(artwork_first_node);
 #else
   char *leveldir_artwork_set = LEVELDIR_ARTWORK_SET(leveldir_current, type);
index 4637a650ff9dc1a1cc775a3312aa9c157288004c..43bd950eecfd5dc2e496a001147089fba81e90e6 100644 (file)
@@ -1241,8 +1241,11 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
   int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
   int last_game_status = game_status;  /* save current game status */
 
+#if 1
+  DrawBackground(mSX, mSY, SXSIZE - 32 + menu.scrollbar_xoffset, SYSIZE);
+#else
   DrawBackground(SX, SY, SXSIZE - 32, SYSIZE);
-  redraw_mask |= REDRAW_FIELD;
+#endif
 
   title_string =
     (ti->type == TREE_TYPE_LEVEL_DIR ? "Level Directories" :
@@ -1278,6 +1281,8 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
   }
 
   game_status = last_game_status;      /* restore current game status */
+
+  redraw_mask |= REDRAW_FIELD;
 }
 
 static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti)