2006-10-28
* fixed bug when displaying titlescreen with size less than element tile
- * fixed bug which caused elements with "change when digging <e>" event
+ * fixed bug that caused elements with "change when digging <e>" event
to change for _every_ digged element, not only those specified in <e>
+ * fixed bug that caused impact style collision when dropping element one
+ tile over the player that can both fall down and smash players
+ * fixed bug that caused impact style collision when element changed to
+ falling/smashing element over the player immediately after movement
2006-10-24
* fixed bug that allowed making engine snapshots from the level editor
#define USE_GFX_RESET_PLAYER_ARTWORK (USE_NEW_STUFF * 1)
#define USE_FIX_KILLED_BY_NON_WALKABLE (USE_NEW_STUFF * 1)
+#define USE_FIX_IMPACT_COLLISION (USE_NEW_STUFF * 1)
/* for DigField() */
/* values for delayed check of falling and moving elements and for collision */
#define CHECK_DELAY_MOVING 3
-#define CHECK_DELAY_FALLING 3
+#define CHECK_DELAY_FALLING CHECK_DELAY_MOVING
#define CHECK_DELAY_COLLISION 2
+#define CHECK_DELAY_IMPACT CHECK_DELAY_COLLISION
/* values for initial player move delay (initial delay counter value) */
#define INITIAL_MOVE_DELAY_OFF -1
WasJustMoving[x][y] = 0;
WasJustFalling[x][y] = 0;
CheckCollision[x][y] = 0;
+ CheckImpact[x][y] = 0;
Stop[x][y] = FALSE;
Pushed[x][y] = FALSE;
Store[x][y] = EL_ACID;
}
- else if ((game.engine_version >= VERSION_IDENT(3,1,0,0) &&
+ else if (
+#if USE_FIX_IMPACT_COLLISION
+ (game.engine_version >= VERSION_IDENT(3,1,0,0) &&
+ CheckImpact[x][y] && !IS_FREE(x, y + 1)) ||
+#else
+ (game.engine_version >= VERSION_IDENT(3,1,0,0) &&
CheckCollision[x][y] && !IS_FREE(x, y + 1)) ||
-
+#endif
(game.engine_version >= VERSION_IDENT(3,0,7,0) &&
CAN_FALL(element) && WasJustFalling[x][y] &&
(Feld[x][y + 1] == EL_BLOCKED || IS_PLAYER(x, y + 1))) ||
simply not covered here... :-/ ) */
CheckCollision[x][y] = 0;
+ CheckImpact[x][y] = 0;
Impact(x, y);
}
if ((!CAN_FALL(element) || direction == MV_DOWN) && check_collision_again)
CheckCollision[newx][newy] = CHECK_DELAY_COLLISION;
+
+#if USE_FIX_IMPACT_COLLISION
+ if (CAN_FALL(element) && direction == MV_DOWN && check_collision_again)
+ CheckImpact[newx][newy] = CHECK_DELAY_IMPACT;
+#endif
}
if (DONT_TOUCH(element)) /* object may be nasty to player or others */
WasJustFalling[x][y]--;
if (CheckCollision[x][y] > 0)
CheckCollision[x][y]--;
+ if (CheckImpact[x][y] > 0)
+ CheckImpact[x][y]--;
GfxFrame[x][y]++;
nexty = dropy + GET_DY_FROM_DIR(move_direction);
ChangeCount[dropx][dropy] = 0; /* allow at least one more change */
+
+#if USE_FIX_IMPACT_COLLISION
+ /* do not cause impact style collision by dropping elements that can fall */
+ CheckCollision[dropx][dropy] = CHECK_DELAY_COLLISION;
+#else
CheckCollision[dropx][dropy] = CHECK_DELAY_COLLISION;
+#endif
}
player->drop_delay = GET_NEW_DROP_DELAY(drop_element);
SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(WasJustMoving));
SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(WasJustFalling));
SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(CheckCollision));
+ SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(CheckImpact));
SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(Stop));
SaveEngineSnapshotBuffer(ARGS_ADDRESS_AND_SIZEOF(Pushed));
graphic_info[graphic].post_delay = -1;
graphic_info[graphic].auto_delay = -1;
+#if 1
+ /* optional zoom factor for scaling up the image to a larger size */
+ if (parameter[GFX_ARG_SCALE_UP_FACTOR] != ARG_UNDEFINED_VALUE)
+ graphic_info[graphic].scale_up_factor = parameter[GFX_ARG_SCALE_UP_FACTOR];
+ if (graphic_info[graphic].scale_up_factor < 1)
+ graphic_info[graphic].scale_up_factor = 1; /* no scaling */
+#endif
+
#if 1
if (graphic_info[graphic].use_image_size)
{
- /* set default bitmap size (with scaling, but without small images) */
+ /* set new default bitmap size (with scaling, but without small images) */
graphic_info[graphic].width = get_scaled_graphic_width(graphic);
graphic_info[graphic].height = get_scaled_graphic_height(graphic);
}
if (parameter[GFX_ARG_HEIGHT] != ARG_UNDEFINED_VALUE)
graphic_info[graphic].height = parameter[GFX_ARG_HEIGHT];
+#if 0
/* optional zoom factor for scaling up the image to a larger size */
if (parameter[GFX_ARG_SCALE_UP_FACTOR] != ARG_UNDEFINED_VALUE)
graphic_info[graphic].scale_up_factor = parameter[GFX_ARG_SCALE_UP_FACTOR];
if (graphic_info[graphic].scale_up_factor < 1)
graphic_info[graphic].scale_up_factor = 1; /* no scaling */
+#endif
if (src_bitmap)
{