feat(world): add CMap::Load

This commit is contained in:
fallenoak committed 2025-10-08 16:49:49 -05:00
1 parent 9a48558429
commit 1e362b0c6e
4 files changed
+46 -1

No files matched your search

+4 -1
View File
@@ -1,4 +1,7 @@
file(GLOB PRIVATE_SOURCES "*.cpp")
file(GLOB PRIVATE_SOURCES
"*.cpp"
"map/*.cpp"
)
add_library(world STATIC
${PRIVATE_SOURCES}
+6
View File
@@ -0,0 +1,6 @@
#ifndef WORLD_MAP_HPP
#define WORLD_MAP_HPP
#include "world/map/CMap.hpp"
#endif
+19
View File
@@ -0,0 +1,19 @@
#include "world/map/CMap.hpp"
#include <storm/String.hpp>
char CMap::s_mapName[256];
char CMap::s_mapPath[256];
char CMap::s_wdtFilename[256];
void CMap::Load(const char* mapName, int32_t zoneID) {
// TODO
auto nameOfs = SStrCopy(CMap::s_mapPath, "World\\Maps\\");
SStrCopy(&CMap::s_mapPath[nameOfs], mapName);
SStrCopy(CMap::s_mapName, mapName);
SStrPrintf(CMap::s_wdtFilename, sizeof(CMap::s_wdtFilename), "%s\\%s.wdt", CMap::s_mapPath, CMap::s_mapName);
// TODO
}
+17
View File
@@ -0,0 +1,17 @@
#ifndef WORLD_MAP_C_MAP_HPP
#define WORLD_MAP_C_MAP_HPP
#include <cstdint>
class CMap {
public:
// Static variables
static char s_mapName[];
static char s_mapPath[];
static char s_wdtFilename[];
// Static functions
static void Load(const char* mapName, int32_t zoneID);
};
#endif