From 09c016c9359bcd1c594f5c290acd495193a4eb12 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 17 Feb 2026 19:35:22 -0600 Subject: [PATCH] feat(world): set CMap::s_mapID in CMap::Load --- src/world/map/CMap.cpp | 7 ++++++- src/world/map/CMap.hpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/world/map/CMap.cpp b/src/world/map/CMap.cpp index f86ce96..9839f45 100644 --- a/src/world/map/CMap.cpp +++ b/src/world/map/CMap.cpp @@ -28,6 +28,7 @@ uint32_t* CMap::s_mapObjDefGroupHeap; uint32_t* CMap::s_mapObjDefHeap; uint32_t* CMap::s_mapObjGroupHeap; uint32_t* CMap::s_mapObjHeap; +int32_t CMap::s_mapID = -1; char CMap::s_mapName[256]; char CMap::s_mapPath[256]; char CMap::s_wdtFilename[256]; @@ -61,7 +62,7 @@ void CMap::Initialize() { // TODO } -void CMap::Load(const char* mapName, int32_t zoneID) { +void CMap::Load(const char* mapName, int32_t mapID) { // TODO auto nameOfs = SStrCopy(CMap::s_mapPath, "World\\Maps\\"); @@ -72,6 +73,10 @@ void CMap::Load(const char* mapName, int32_t zoneID) { SStrPrintf(CMap::s_wdtFilename, sizeof(CMap::s_wdtFilename), "%s\\%s.wdt", CMap::s_mapPath, CMap::s_mapName); // TODO + + CMap::s_mapID = mapID; + + // TODO } void CMap::MapMemInitialize() { diff --git a/src/world/map/CMap.hpp b/src/world/map/CMap.hpp index c70177b..372c6bb 100644 --- a/src/world/map/CMap.hpp +++ b/src/world/map/CMap.hpp @@ -23,6 +23,7 @@ class CMap { static uint32_t* s_mapObjDefHeap; static uint32_t* s_mapObjGroupHeap; static uint32_t* s_mapObjHeap; + static int32_t s_mapID; static char s_mapName[]; static char s_mapPath[]; static char s_wdtFilename[]; @@ -30,7 +31,7 @@ class CMap { // Static functions static CMapEntity* AllocEntity(int32_t a1); static void Initialize(); - static void Load(const char* mapName, int32_t zoneID); + static void Load(const char* mapName, int32_t mapID); static void MapMemInitialize(); };