rnd-20040918-2-src
authorHolger Schemel <info@artsoft.org>
Sat, 18 Sep 2004 02:10:52 +0000 (04:10 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:48:01 +0000 (10:48 +0200)
src/conftime.h
src/editor.c
src/files.c
src/files.h

index e0ae55e6462bec1008135e57be7b4cd0c1e60c8c..f688d3be98e16496e2255d859c10992796e628ce 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-09-18 03:18]"
+#define COMPILE_DATE_STRING "[2004-09-18 04:09]"
index aa07d4b84bec3d68f10bcdd4a0358bdf33ef884f..42ba6bb800c81798fcc0c63181e4e1a6b4a0eab6 100644 (file)
@@ -9017,6 +9017,8 @@ static void HandleControlButtons(struct GadgetInfo *gi)
        CopyPlayfield(level.field, FieldBackup);
        CopyPlayfield(Feld, level.field);
 
+       CopyNativeLevel_RND_to_Native(&level);
+
        UnmapLevelEditorGadgets();
        UndrawSpecialEditorDoor();
 
index 4b4ddebd95e8b808c7f9005d410d9c64999b42b7..601c74cf8e9f3814e0d20f82cb776855fb8e8daa 100644 (file)
@@ -1860,28 +1860,28 @@ static int map_element_RND_to_EM(int element_rnd)
     { Xfake_door_6,            EL_EMC_GATE_6_GRAY              },
     { Xfake_door_7,            EL_EMC_GATE_7_GRAY              },
     { Xfake_door_8,            EL_EMC_GATE_8_GRAY              },
-    { Xsteel_1,                        EL_UNKNOWN                      },
+    { Xsteel_1,                        EL_STEELWALL                    },
     { Xsteel_2,                        EL_UNKNOWN                      },
-    { Xsteel_3,                        EL_UNKNOWN                      },
+    { Xsteel_3,                        EL_EMC_STEELWALL_1              },
     { Xsteel_4,                        EL_UNKNOWN                      },
-    { Xwall_1,                 EL_UNKNOWN                      },
+    { Xwall_1,                 EL_WALL                         },
     { Xwall_2,                 EL_UNKNOWN                      },
     { Xwall_3,                 EL_UNKNOWN                      },
     { Xwall_4,                 EL_UNKNOWN                      },
-    { Xround_wall_1,           EL_UNKNOWN                      },
+    { Xround_wall_1,           EL_WALL_SLIPPERY                },
     { Xround_wall_2,           EL_UNKNOWN                      },
     { Xround_wall_3,           EL_UNKNOWN                      },
     { Xround_wall_4,           EL_UNKNOWN                      },
     { Xdecor_1,                        EL_UNKNOWN                      },
-    { Xdecor_2,                        EL_UNKNOWN                      },
-    { Xdecor_3,                        EL_UNKNOWN                      },
-    { Xdecor_4,                        EL_UNKNOWN                      },
-    { Xdecor_5,                        EL_UNKNOWN                      },
-    { Xdecor_6,                        EL_UNKNOWN                      },
+    { Xdecor_2,                        EL_EMC_WALL_6                   },
+    { Xdecor_3,                        EL_EMC_WALL_4                   },
+    { Xdecor_4,                        EL_EMC_WALL_5                   },
+    { Xdecor_5,                        EL_EMC_WALL_7                   },
+    { Xdecor_6,                        EL_EMC_WALL_8                   },
     { Xdecor_7,                        EL_UNKNOWN                      },
-    { Xdecor_8,                        EL_UNKNOWN                      },
-    { Xdecor_9,                        EL_UNKNOWN                      },
-    { Xdecor_10,               EL_UNKNOWN                      },
+    { Xdecor_8,                        EL_EMC_WALL_1                   },
+    { Xdecor_9,                        EL_EMC_WALL_2                   },
+    { Xdecor_10,               EL_EMC_WALL_3                   },
     { Xdecor_11,               EL_UNKNOWN                      },
     { Xdecor_12,               EL_UNKNOWN                      },
     { Xalpha_0,                        EL_CHAR('0')                    },
@@ -2523,12 +2523,22 @@ static void LoadLevelFromFileInfo_EM(struct LevelInfo *level,
 {
   if (!LoadNativeLevel_EM(level_file_info->filename))
     level->no_valid_file = TRUE;
-
-  CopyNativeLevel_EM_to_RND(level);
 }
 
 #endif
 
+void CopyNativeLevel_RND_to_Native(struct LevelInfo *level)
+{
+  if (level->game_engine_type == GAME_ENGINE_TYPE_EM)
+    CopyNativeLevel_RND_to_EM(level);
+}
+
+void CopyNativeLevel_Native_to_RND(struct LevelInfo *level)
+{
+  if (level->game_engine_type == GAME_ENGINE_TYPE_EM)
+    CopyNativeLevel_EM_to_RND(level);
+}
+
 
 /* ------------------------------------------------------------------------- */
 /* functions for loading SP level                                            */
@@ -2902,6 +2912,8 @@ void LoadLevelFromFileInfo(struct LevelInfo *level,
 
   if (level->game_engine_type == GAME_ENGINE_TYPE_UNKNOWN)
     level->game_engine_type = GAME_ENGINE_TYPE_RND;
+
+  CopyNativeLevel_Native_to_RND(level);
 }
 
 void LoadLevelFromFilename(struct LevelInfo *level, char *filename)
index 558837256d5f30fb07ae49c97b8d8d0212ecd66a..3c68f01f925ee9b0ec4a333d2933d3e1b56fc774 100644 (file)
@@ -57,8 +57,8 @@ void SaveLevel(int);
 void SaveLevelTemplate();
 void DumpLevel(struct LevelInfo *);
 
-void CopyNativeLevel_RND_to_EM(struct LevelInfo *);
-void CopyNativeLevel_EM_to_RND(struct LevelInfo *);
+void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
+void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
 
 void LoadTapeFromFilename(char *);
 void LoadTape(int);