From 949c6449052986b2adcc7e33cd79941afbbcf574 Mon Sep 17 00:00:00 2001 From: Sebastian Mischke Date: Mon, 5 Jan 2026 13:38:09 +0100 Subject: [PATCH] Rename m_unk0x18 to m_worldXScale --- LEGO1/lego/legoomni/include/legoracemap.h | 2 +- LEGO1/lego/legoomni/src/race/legoracemap.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoracemap.h b/LEGO1/lego/legoomni/include/legoracemap.h index 6fb791f7..c9d4c4aa 100644 --- a/LEGO1/lego/legoomni/include/legoracemap.h +++ b/LEGO1/lego/legoomni/include/legoracemap.h @@ -44,7 +44,7 @@ class LegoRaceMap : public virtual LegoRaceActor { // likely an x-offset of the race map in world space float m_worldXOffset; // 0x14 // inversely scales the map in x direction (either convert world->screen space or to control the size) - float m_unk0x18; // 0x18 + float m_worldXScale; // 0x18 // likely a y-offset of the race map in world space float m_worldYOffset; // 0x1c // inversely scales the map in y direction (either convert world->screen space or to control the size) diff --git a/LEGO1/lego/legoomni/src/race/legoracemap.cpp b/LEGO1/lego/legoomni/src/race/legoracemap.cpp index 738d1335..06480b95 100644 --- a/LEGO1/lego/legoomni/src/race/legoracemap.cpp +++ b/LEGO1/lego/legoomni/src/race/legoracemap.cpp @@ -59,7 +59,7 @@ void LegoRaceMap::ParseAction(char* p_extra) token = strtok(NULL, g_parseExtraTokens); if (token != NULL) { - m_unk0x18 = atof(token); + m_worldXScale = atof(token); } token = strtok(NULL, g_parseExtraTokens); @@ -109,7 +109,7 @@ void LegoRaceMap::ParseAction(char* p_extra) void LegoRaceMap::UpdateMapLocatorPosition() { if (m_mapEnabled) { - short xPos = (GetWorldPosition()[0] - m_worldXOffset) / m_unk0x18 * m_unk0x24; + short xPos = (GetWorldPosition()[0] - m_worldXOffset) / m_worldXScale * m_unk0x24; short yPos = (GetWorldPosition()[2] - m_worldYOffset) / m_unk0x20 * m_unk0x28; m_stillPresenter->SetPosition(xPos + m_unk0x2c, m_unk0x30 - yPos);