X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_graphics.c;h=ef87fc0f9465267ed2e79db8d00c5f2c8eb91147;hb=79e91e9a5ec83a11ee4708c8cf2c42dd4dd63cce;hp=bb3fb894d17673094d072e7cbcabfe34b6563287;hpb=98c783a5e4c5bc5bf520d48ac20898970291b3d5;p=rocksndiamonds.git diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index bb3fb894..ef87fc0f 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -261,6 +261,13 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) player_x = game->cave->player_x - game->cave->x1; // cell coordinates of player player_y = game->cave->player_y - game->cave->y1; + // when wrapping around to opposite level border, use faster scrolling + if (game->cave->player_x == game->cave->x1 || + game->cave->player_x == game->cave->x2 || + game->cave->player_y == game->cave->y1 || + game->cave->player_y == game->cave->y2) + scroll_speed *= 4; + // pixel size of visible part of the cave (may be smaller in intermissions) visible_x = (game->cave->x2 - game->cave->x1 + 1) * cell_size; visible_y = (game->cave->y2 - game->cave->y1 + 1) * cell_size;