1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +01:00

Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.

Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
This commit is contained in:
Peter Nelson
2024-04-04 18:27:34 +01:00
committed by Peter Nelson
parent 3c94e81665
commit 9854553e10
16 changed files with 59 additions and 60 deletions

View File

@@ -843,7 +843,7 @@ protected:
void SetNewScroll(int sx, int sy, int sub)
{
const NWidgetBase *wi = this->GetWidget<NWidgetBase>(WID_SM_MAP);
Point hv = InverseRemapCoords(wi->current_x * ZOOM_LVL_BASE * TILE_SIZE / 2, wi->current_y * ZOOM_LVL_BASE * TILE_SIZE / 2);
Point hv = InverseRemapCoords(wi->current_x * ZOOM_BASE * TILE_SIZE / 2, wi->current_y * ZOOM_BASE * TILE_SIZE / 2);
hv.x *= this->zoom;
hv.y *= this->zoom;