- /* prevent scrolling further than player step size screen when scrolling */
- if (ABS(screen_x - screen_x_old) > TILEX / 8 ||
- ABS(screen_y - screen_y_old) > TILEY / 8)
+#if 1
+ /* prevent scrolling further than double player step size when scrolling */
+ if (ABS(screen_x - screen_x_old) > 2 * stepsize ||
+ ABS(screen_y - screen_y_old) > 2 * stepsize)
+ {
+ int dx = SIGN(screen_x - screen_x_old);
+ int dy = SIGN(screen_y - screen_y_old);
+
+ screen_x = screen_x_old + dx * 2 * stepsize;
+ screen_y = screen_y_old + dy * 2 * stepsize;
+ }
+#else
+ /* prevent scrolling further than player step size when scrolling */
+ if (ABS(screen_x - screen_x_old) > stepsize ||
+ ABS(screen_y - screen_y_old) > stepsize)