80 LOGWARN(
"Could not craft map - Too many maps in use");
101 if (!IDSerializer.Load())
106 unsigned int MapCount = IDSerializer.
GetMapCount();
110 for (
unsigned int i = 0; i < MapCount; ++i)
116 if (!Serializer.Load())
142 if (!IDSerializer.Save())
144 LOGERROR(
"Could not save idcounts.dat");
154 if (!Serializer.Save())
cMap * CreateMap(int a_CenterX, int a_CenterY, unsigned int a_Scale=3)
Creates a new map.
Utility class used to serialize item ID counts.
Utility class used to serialize maps.
cMapManager(cWorld *a_World)
void SetMapCount(unsigned int a_MapCount)
Encapsulates an in-game world map.
void TickMaps(void)
Ticks each registered map.
void LOGERROR(const char *a_Format, fmt::ArgList a_ArgList)
void SaveMapData(void)
Saves the map data to the disk.
unsigned int GetID(void) const
const AString & GetDataPath(void) const
Returns the data path to the world data.
unsigned int GetMapCount(void) const
void LoadMapData(void)
Loads the map data from the disk.
RAII for cCriticalSection - locks the CS on creation, unlocks on destruction.
bool DoWithMap(UInt32 a_ID, cMapCallback a_Callback)
Calls the callback for the map with the specified ID.
cMap * GetMapData(unsigned int a_ID)
Returns the map with the specified ID, nullptr if out of range.