+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
CONFIG_GAME = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(CONFIG_SPECIAL)
CONFIG = $(CONFIG_GAME) $(JOYSTICK)
-# DEBUG = -DDEBUG -g
+DEBUG = -DDEBUG -g
# PROFILING = $(PROFILING_FLAGS)
# OPTIONS = $(DEBUG) -Wall # only for debugging purposes
-#define COMPILE_DATE_STRING "2008-11-03 21:21"
+#define COMPILE_DATE_STRING "2009-03-26 10:48"
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) */
# =============================================================================
# Rocks'n'Diamonds Makefile (game_em)
# -----------------------------------------------------------------------------
-# (c) 1995-2005 Holger Schemel <info@artsoft.org>
+# (c) 1995-2006 Holger Schemel <info@artsoft.org>
# -----------------------------------------------------------------------------
# Emerald Mine for X11 © 2000,2001 David Tritscher
# =============================================================================
bitmap_db_field);
InitGfxDoor1Info(DX, DY, DXSIZE, DYSIZE);
InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
+ InitGfxWindowInfo(WIN_XSIZE, WIN_YSIZE);
InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
InitGfxCustomArtworkInfo();
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;
}
if (DrawingDeactivated(dst_x, dst_y, width, height))
return;
-#if 0
- /* !!! APPARENTLY THIS HAS BEEN FIXED IN SDL 1.2.12 !!! */
+#if 1
+ /* !!! 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)
{
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;
}
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 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"