From: Holger Schemel Date: Mon, 12 Feb 2024 23:01:47 +0000 (+0100) Subject: fixed playing with small game graphics for native EM engine X-Git-Tag: 4.4.0.0-test-1~370 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b4f920dc8d374025768ed93a77079a014392eb35;p=rocksndiamonds.git fixed playing with small game graphics for native EM engine --- diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index b68459bf..2c0e1335 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -343,12 +343,13 @@ int gd_drawcave(Bitmap *dest, GdGame *game, boolean force_redraw) int tile = game->element_buffer[y][x]; int frame = game->animcycle; struct GraphicInfo_BD *g = &graphic_info_bd_object[tile][frame]; + int width = g->width * TILESIZE_VAR / TILESIZE; + int height = g->height * TILESIZE_VAR / TILESIZE; - blit_bitmap(g->bitmap, dest, g->src_x, g->src_y, g->width, g->height, - offset.x, offset.y); + blit_bitmap(g->bitmap, dest, g->src_x, g->src_y, width, height, offset.x, offset.y); #if DO_GFX_SANITY_CHECK - if (use_native_bd_graphics_engine() && !program.headless) + if (use_native_bd_graphics_engine() && !setup.small_game_graphics && !program.headless) { int old_x = (game->gfx_buffer[y][x] % GD_NUM_OF_CELLS) % GD_NUM_OF_CELLS_X; int old_y = (game->gfx_buffer[y][x] % GD_NUM_OF_CELLS) / GD_NUM_OF_CELLS_X; diff --git a/src/game_bd/main_bd.h b/src/game_bd/main_bd.h index 1018cb23..d14b9c4c 100644 --- a/src/game_bd/main_bd.h +++ b/src/game_bd/main_bd.h @@ -48,6 +48,8 @@ /* screen sizes and positions for BD engine */ +#define TILESIZE 32 + extern int TILESIZE_VAR; #define TILEX TILESIZE_VAR