X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_graphics.c;h=3471c9d2598509d5d97d1573461509f96ee820aa;hb=507622f89d162a0f98adc1e482da85aa6ae1cf73;hp=3d7819195060a201f4bc0f404e877c27c4f1d9dd;hpb=aa4eb01dedc49a4b9a7f1a03e654b6754069d9cc;p=rocksndiamonds.git diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index 3d781919..3471c9d2 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -14,8 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include "main_bd.h" @@ -53,7 +51,7 @@ static int scroll_x, scroll_y; /* quit, global variable which is set to true if the application should quit */ boolean gd_quit = FALSE; -const guint8 *gd_keystate; +const byte *gd_keystate; static int cell_size = 0; @@ -205,7 +203,6 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) boolean out_of_window; int player_x, player_y, visible_x, visible_y; boolean changed; - int scroll_divisor; /* max scrolling speed depends on the speed of the cave. */ /* game moves cell_size_game * 1s / cave time pixels in a second. */ @@ -232,13 +229,6 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) /* cell_size contains the scaled size, but we need the original. */ changed = FALSE; - /* some sort of scrolling speed. - with larger cells, the divisor must be smaller, so the scrolling faster. */ - scroll_divisor = 256 / cell_size; - - /* fine scrolling is 50hz (normal would be 25hz only) */ - scroll_divisor *= 2; - if (cave_scroll(visible_x, play_area_w, player_x * cell_size + cell_size / 2 - play_area_w / 2, exact_scroll, &scroll_x, &scroll_desired_x, scroll_speed)) changed = TRUE; @@ -332,6 +322,10 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d if (is_explosion(tile) && dir != GD_MV_STILL) use_smooth_movements = FALSE; + // do not use smooth movement animation for player entering exit (engine stopped) + if (cave->player_state == GD_PL_EXITED) + use_smooth_movements = FALSE; + #if DO_GFX_SANITY_CHECK if (use_native_bd_graphics_engine() && !setup.small_game_graphics && !program.headless) {