From 6efba23d7bb2bddf431300e3fe08d864da275f1d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 14 Dec 2024 19:10:30 +0100 Subject: [PATCH] fixed graphics when digging crumbled sand with BD game engine This change is needed for BD1 cave scheduling where animation cycle is not always in sync with the game engine. --- src/game_bd/bd_graphics.c | 2 +- src/tools.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index c6fd7d03..122bd53c 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -620,7 +620,7 @@ static void gd_drawcave_crumbled(Bitmap *dest, GdGame *game, int x, int y, boole GdCave *cave = game->cave; int sx = x * cell_size - scroll_x; int sy = y * cell_size - scroll_y; - int frame = game->animcycle; + int frame = game->itercycle; int border_size = cell_size / 8; int draw = game->drawing_buffer[y][x]; int draw_last = game->last_drawing_buffer[y][x]; diff --git a/src/tools.c b/src/tools.c index 1684a8e0..6ec7373a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -11268,7 +11268,7 @@ void InitGraphicInfo_BD(void) e == O_DIRT2_DIGGING_LEFT_CRUMBLED || e == O_DIRT2_DIGGING_RIGHT_CRUMBLED || e == O_DIRT2_DIGGING_UP_CRUMBLED || - e == O_DIRT2_DIGGING_DOWN_CRUMBLED ? j * 2 % 8: + e == O_DIRT2_DIGGING_DOWN_CRUMBLED ? j : j * 2); int frame = getAnimationFrame(g->anim_frames, g->anim_delay, -- 2.34.1