X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fmain_bd.c;h=a854786e3a868e429a3431f4c6c3cd6de4435c74;hb=87a3ac20b2b40d71721dfb83b913e55f1f106244;hp=56e448a79721b18e91a8bb10d7f82c22c611a3ac;hpb=e781055ddb3142d2d309a98e67ec66cf261eb179;p=rocksndiamonds.git diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index 56e448a7..a854786e 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -250,9 +250,11 @@ static void UpdateGameDoorValues_BD(void) static void PrepareGameTileBitmap_BD(void) { - struct GraphicInfo_BD *g = &graphic_info_bd_object[O_STONE][0]; + struct GraphicInfo_BD *g_template = &graphic_info_bd_color_template; + struct GraphicInfo_BD *g_default = &graphic_info_bd_object[O_STONE][0]; - gd_prepare_tile_bitmap(native_bd_level.cave, g->bitmap, 1); + gd_prepare_tile_bitmap(native_bd_level.cave, g_template->bitmap, 1); + gd_set_tile_bitmap_reference(g_default->bitmap); } void PreparePreviewTileBitmap_BD(Bitmap *bitmap, int scale_down_factor) @@ -384,6 +386,19 @@ void GameActions_BD(byte action[MAX_PLAYERS]) play_game_func(game_bd.game, action[0]); + // scroll without iterating engine if player out of sight (mainly due to wrap-around) + // (this is needed to prevent broken tapes in case of viewport or tile size changes) + while (game_bd.game->out_of_window) + { + RedrawPlayfield_BD(TRUE); + + BlitScreenToBitmap_BD(backbuffer); + + BackToFront(); + + play_game_func(game_bd.game, action[0]); + } + RedrawPlayfield_BD(FALSE); UpdateGameDoorValues_BD();