rnd-20090531-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 31 May 2009 01:08:39 +0000 (03:08 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:57:15 +0000 (10:57 +0200)
* fixed bug with element_info[e].gfx_element not being initialized in
  early game stage, causing native graphics in EMC level sets to be
  mapped completely to EL_EMPTY (causing a blank screen when playing)
  (this only happened when starting the program with an EMC set with
  native graphics, but not when switching to such a set at runtime)

ChangeLog
src/conftime.h
src/init.c
src/libgame/system.c
src/main.h

index befc31283b5cca7039171c40abbc7e112f7436fb..50a9bbac783f314fc1367f811639da3683e5384d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-31
+       * fixed bug with element_info[e].gfx_element not being initialized in
+         early game stage, causing native graphics in EMC level sets to be
+         mapped completely to EL_EMPTY (causing a blank screen when playing)
+         (this only happened when starting the program with an EMC set with
+         native graphics, but not when switching to such a set at runtime)
+
 2009-03-26
        * extended backwards compatibility mode to allow already fixed bug with
          change actions (see "2008-02-05") for existing levels (especially the
index cf2834973a49455c9e9bbc353ae0d32baadb43c1..3cefa770e5c42f416135f6c2ec7b6eaed6046d46 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2009-03-26 10:48"
+#define COMPILE_DATE_STRING "2009-05-31 03:01"
index 32ec089204945182cbede2348f9d99e75d45891e..ea5ec18de985d667f2fccda3b504cdbc3f7c1fc5 100644 (file)
@@ -6191,6 +6191,7 @@ void OpenAll()
 
   InitElementPropertiesStatic();
   InitElementPropertiesEngine(GAME_VERSION_ACTUAL);
+  InitElementPropertiesGfxElement();
 
   print_timestamp_time("[post-video]");
 
index f05fffa0bfa8411abba2505e9805b70a87549ae2..c3d9575489c60fb74c5bb67c6fd8a926b2341268 100644 (file)
@@ -498,7 +498,7 @@ void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap,
   if (DrawingDeactivated(dst_x, dst_y, width, height))
     return;
 
-#if 1
+#if 0
   /* !!! 2009-03-24: It seems that this problem still exists with 1.2.12 !!! */
 #if defined(TARGET_SDL) && defined(PLATFORM_WIN32)
   if (src_bitmap == dst_bitmap)
index 93d3259dce9a2adcb69e94189623faff0a868e5f..68f1eed082c22ec8b93d9b9e902c93f65ca9849d 100644 (file)
 #define IS_DC_STEELWALL_2(e)   ((e) >= EL_DC_STEELWALL_2_LEFT &&       \
                                 (e) <= EL_DC_STEELWALL_2_SINGLE)
 
+#if 1
+
 #if 1
 #define GFX_ELEMENT(e)         (element_info[e].gfx_element)
+#else
+#define GFX_ELEMENT(e)         (element_info[e].gfx_element ==         \
+                                (element_info[e].use_gfx_element ?     \
+                                 element_info[e].gfx_element : e)  ?   \
+                                element_info[e].gfx_element :          \
+                                element_info[e].gfx_element +          \
+                                0 * printf("::: %d: %d <-> %d\n",      \
+                                           e,                          \
+                                           element_info[e].gfx_element,      \
+                                           element_info[e].use_gfx_element ? \
+                                           element_info[e].gfx_element : e))
+#endif
+
 #else
 #define GFX_ELEMENT(e)         (element_info[e].use_gfx_element ?      \
                                 element_info[e].gfx_element : e)