29 : _file(
CascStorage, fileDataId, description), _mapName(
std::move(mapName))
52 std::string dirname = std::string(
szWorkDirWmo) +
"/dir_bin";
53 FILE* dirfile = fopen(dirname.c_str(),
"ab");
56 printf(
"Can't open dirfile!'%s'\n", dirname.c_str());
70 if (!strcmp(fourcc,
"MPHD"))
75 else if (!strcmp(fourcc,
"MAIN"))
80 else if (!strcmp(fourcc,
"MAID"))
86 else if (!strcmp(fourcc,
"MWMO"))
91 char *buf =
new char[
size];
94 while (p < buf +
size)
100 p = p + strlen(p) + 1;
108 else if (!strcmp(fourcc,
"MODF"))
114 for (
uint32 i = 0; i < mapObjectCount; ++i)
118 if (!(mapObjDef.
Flags & 0x8))
127 MapObject::Extract(mapObjDef, fileName.c_str(),
true, mapId, mapId, dirfile,
nullptr);
143 if (!(x >= 0 && y >= 0 && x < 64 && y < 64))
char const * GetPlainName(char const *FileName)
void NormalizeFileName(char *name, size_t len)
size_t read(void *dest, size_t bytes)
void FreeADT(ADTFile *adt)
std::vector< std::string > _wmoNames
ADTFile * GetMap(int32 x, int32 y)
WDTFile(uint32 fileDataId, std::string const &description, std::string mapName, bool cache)
std::unique_ptr< ADTCache > _adtCache
std::unique_ptr< WDT::MAID > _adtFileDataIds
void ExtractSet(WMODoodadData const &doodadData, ADT::MODF const &wmo, bool isGlobalWmo, uint32 mapID, uint32 originalMapId, FILE *pDirfile, std::vector< ADTOutputCache > *dirfileCache)
void Extract(ADT::MODF const &mapObjDef, char const *WmoInstName, bool isGlobalWmo, uint32 mapID, uint32 originalMapId, FILE *pDirfile, std::vector< ADTOutputCache > *dirfileCache)
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default TC string format function.
constexpr std::size_t size()
struct WDT::MAIN::SMAreaInfo Data[64][64]
std::unordered_map< std::string, WMODoodadData > WmoDoodads
char const * szWorkDirWmo
bool ExtractSingleWmo(std::string &fname)
std::shared_ptr< CASC::Storage > CascStorage