Change: make for smooth-scrolling based on actual time

This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
This commit is contained in:
Patric Stout
2024-01-22 16:45:00 +01:00
committed by Patric Stout
parent cbb24b5d71
commit ea8c1d8597
5 changed files with 61 additions and 29 deletions

View File

@@ -26,7 +26,7 @@ void InitializeWindowViewport(Window *w, int x, int y, int width, int height, st
Viewport *IsPtInWindowViewport(const Window *w, int x, int y);
Point TranslateXYToTileCoord(const Viewport *vp, int x, int y, bool clamp_to_map = true);
Point GetTileBelowCursor();
void UpdateViewportPosition(Window *w);
void UpdateViewportPosition(Window *w, uint32_t delta_ms);
bool MarkAllViewportsDirty(int left, int top, int right, int bottom);