+2009-06-15
+ * version 3.2.6.1 released
+
+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-30
+ * deactivated blit-to-same-surface workaround again (see 2009-03-24)
+ and using self-compiled, patched SDL.dll that solves this problem
+ (interim solution until release of SDL 1.2.14 that should fix this)
+
+2009-03-26
+ * extended backwards compatibility mode to allow already fixed bug with
+ change actions (see "2008-02-05") for existing levels (especially the
+ Zelda and Zelda II levels and other cool stuff by Alan Bond like FMV)
+
+2009-03-24
+ * reactivated workaround to prevent program crashes due to blitting to
+ the same SDL surface that apparently only occurs on Windows systems
+ (this is no final solution; this problem needs further investigation)
+
+2008-11-05
+ * version number set to 3.2.6.1
+
+2008-11-04
+ * version 3.2.6.0 released
+
2008-10-11
* fixed behaviour of player option "no centering when relocating" which
was incorrect when disabled and relocation target inside visible area
-#define COMPILE_DATE_STRING "2008-11-03 21:21"
+#define COMPILE_DATE_STRING "2009-06-15 22:46"
change->target_element = EL_PLAYER_1;
}
+#if 1
+ /* try to detect and fix "Zelda" style levels, which are broken with 3.2.5 */
+ if (level->game_version < VERSION_IDENT(3,2,5,0))
+ {
+ /* This is needed to fix a problem that was caused by a bugfix in function
+ game.c/CheckTriggeredElementChangeExt() introduced with 3.2.5 that
+ corrects the behaviour when a custom element changes to another custom
+ element with a higher element number that has change actions defined.
+ Normally, only one change per frame is allowed for custom elements.
+ Therefore, it is checked if a custom element already changed in the
+ current frame; if it did, subsequent changes are suppressed.
+ Unfortunately, this is only checked for element changes, but not for
+ change actions, which are still executed. As the function above loops
+ through all custom elements from lower to higher, an element change
+ resulting in a lower CE number won't be checked again, while a target
+ element with a higher number will also be checked, and potential change
+ actions will get executed for this CE, too (which is wrong), while
+ further changes are ignored (which is correct). As this bugfix breaks
+ Zelda II (and introduces graphical bugs to Zelda I, and also breaks a
+ few other levels like Alan Bond's "FMV"), allow the previous, incorrect
+ behaviour for existing levels and tapes that make use of this bug */
+
+ level->use_action_after_change_bug = TRUE;
+ }
+#else
+ /* !!! THIS DOES NOT FIX "Zelda I" (GRAPHICALLY) AND "Alan's FMV" LEVELS */
/* try to detect and fix "Zelda II" levels, which are broken with 3.2.5 */
{
int element = EL_CUSTOM_16;
strncmp(ei->description, "scanline - row 1", 16) == 0)
level->use_action_after_change_bug = TRUE;
}
+#endif
/* not centering level after relocating player was default only in 3.2.3 */
if (level->game_version == VERSION_IDENT(3,2,3,0)) /* (no pre-releases) */
bitmap_db_field);
InitGfxDoor1Info(DX, DY, DXSIZE, DYSIZE);
InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
+ InitGfxWindowInfo(WIN_XSIZE, WIN_YSIZE);
InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
InitGfxCustomArtworkInfo();
InitElementPropertiesStatic();
InitElementPropertiesEngine(GAME_VERSION_ACTUAL);
+ InitElementPropertiesGfxElement();
print_timestamp_time("[post-video]");
BITMAP *bitmap = NULL;
if (gfx_capabilities & GFX_HW_VRAM_BLIT &&
- width == gfx.scrollbuffer_width && height == gfx.scrollbuffer_height)
+ width == gfx.scrollbuffer_width && height == gfx.scrollbuffer_height)
bitmap = create_video_bitmap(width, height);
if (bitmap == NULL)
gfx.vysize = vysize;
}
+void InitGfxWindowInfo(int win_xsize, int win_ysize)
+{
+ gfx.win_xsize = win_xsize;
+ gfx.win_ysize = win_ysize;
+}
+
void InitGfxScrollbufferInfo(int scrollbuffer_width, int scrollbuffer_height)
{
/* currently only used by MSDOS code to alloc VRAM buffer, if available */
+ /* 2009-03-24: also (temporarily?) used for overlapping blit workaround */
gfx.scrollbuffer_width = scrollbuffer_width;
gfx.scrollbuffer_height = scrollbuffer_height;
}
return;
#if 0
- /* !!! APPARENTLY THIS HAS BEEN FIXED IN SDL 1.2.12 !!! */
+ /* !!! 2009-03-30: Fixed by using self-compiled, patched SDL.dll !!! */
+ /* (This bug still exists in the actual (as of 2009-06-15) version 1.2.13,
+ but is already fixed in SVN and should therefore finally be fixed with
+ the next official SDL release, which is probably version 1.2.14.) */
+#if 1
+ /* !!! 2009-03-24: It seems that this problem still exists in 1.2.12 !!! */
#if defined(TARGET_SDL) && defined(PLATFORM_WIN32)
if (src_bitmap == dst_bitmap)
{
recent SDL libraries, but apparently does not work in 1.2.11 directly */
static Bitmap *tmp_bitmap = NULL;
+ static int tmp_bitmap_xsize = 0;
+ static int tmp_bitmap_ysize = 0;
+
+ /* start with largest static bitmaps for initial bitmap size ... */
+ if (tmp_bitmap_xsize == 0 && tmp_bitmap_ysize == 0)
+ {
+ tmp_bitmap_xsize = MAX(gfx.win_xsize, gfx.scrollbuffer_width);
+ tmp_bitmap_ysize = MAX(gfx.win_ysize, gfx.scrollbuffer_height);
+ }
+
+ /* ... and allow for later re-adjustments due to custom artwork bitmaps */
+ if (src_bitmap->width > tmp_bitmap_xsize ||
+ src_bitmap->height > tmp_bitmap_ysize)
+ {
+ tmp_bitmap_xsize = MAX(tmp_bitmap_xsize, src_bitmap->width);
+ tmp_bitmap_ysize = MAX(tmp_bitmap_ysize, src_bitmap->height);
+
+ FreeBitmap(tmp_bitmap);
+
+ tmp_bitmap = NULL;
+ }
if (tmp_bitmap == NULL)
- tmp_bitmap = CreateBitmap(MAX(FXSIZE, WIN_XSIZE),
- MAX(FYSIZE, WIN_YSIZE), DEFAULT_DEPTH);
+ tmp_bitmap = CreateBitmap(tmp_bitmap_xsize, tmp_bitmap_ysize,
+ DEFAULT_DEPTH);
sysCopyArea(src_bitmap, tmp_bitmap,
src_x, src_y, width, height, dst_x, dst_y, BLIT_OPAQUE);
sysCopyArea(tmp_bitmap, dst_bitmap,
- src_x, src_y, width, height, dst_x, dst_y, BLIT_OPAQUE);
+ dst_x, dst_y, width, height, dst_x, dst_y, BLIT_OPAQUE);
return;
}
#endif
+#endif
#endif
sysCopyArea(src_bitmap, dst_bitmap,
int vx, vy;
int vxsize, vysize;
+ int win_xsize, win_ysize;
+
int draw_deactivation_mask;
int draw_background_mask;
void InitGfxFieldInfo(int, int, int, int, int, int, int, int, Bitmap *);
void InitGfxDoor1Info(int, int, int, int);
void InitGfxDoor2Info(int, int, int, int);
+void InitGfxWindowInfo(int, int);
void InitGfxScrollbufferInfo(int, int);
void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void));
void InitGfxCustomArtworkInfo();
#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)
#define PROGRAM_VERSION_MAJOR 3
#define PROGRAM_VERSION_MINOR 2
#define PROGRAM_VERSION_PATCH 6
-#define PROGRAM_VERSION_BUILD 0
+#define PROGRAM_VERSION_BUILD 1
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"