From: Holger Schemel Date: Sun, 31 May 2009 01:08:39 +0000 (+0200) Subject: rnd-20090531-1-src X-Git-Tag: 3.2.6.1^2~1 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=ade0034b74cb1213bfe0a73213f459081e10b85a rnd-20090531-1-src * 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) --- diff --git a/ChangeLog b/ChangeLog index befc3128..50a9bbac 100644 --- 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 diff --git a/src/conftime.h b/src/conftime.h index cf283497..3cefa770 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2009-03-26 10:48" +#define COMPILE_DATE_STRING "2009-05-31 03:01" diff --git a/src/init.c b/src/init.c index 32ec0892..ea5ec18d 100644 --- a/src/init.c +++ b/src/init.c @@ -6191,6 +6191,7 @@ void OpenAll() InitElementPropertiesStatic(); InitElementPropertiesEngine(GAME_VERSION_ACTUAL); + InitElementPropertiesGfxElement(); print_timestamp_time("[post-video]"); diff --git a/src/libgame/system.c b/src/libgame/system.c index f05fffa0..c3d95754 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -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) diff --git a/src/main.h b/src/main.h index 93d3259d..68f1eed0 100644 --- a/src/main.h +++ b/src/main.h @@ -759,8 +759,23 @@ #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)