39{
41 {
42
43 return false;
44 }
45
46 char fourcc[5];
48
49 std::string dirname = std::string(
szWorkDirWmo) +
"/dir_bin";
50 FILE* dirfile;
51 dirfile = fopen(dirname.c_str(), "ab");
52 if (!dirfile)
53 {
54 printf("Can't open dirfile!'%s'\n", dirname.c_str());
55 return false;
56 }
57
59 {
62
64 fourcc[4] = 0;
65
67
68 if (!strcmp(fourcc, "MAIN"))
69 {
70 }
71 if (!strcmp(fourcc, "MWMO"))
72 {
73
74 if (size)
75 {
76 char* buf = new char[size];
78 char* p = buf;
79 while (p < buf + size)
80 {
81 std::string path(p);
82
86 p = p + strlen(p) + 1;
88
90 }
91 delete[] buf;
92 }
93 }
94 else if (!strcmp(fourcc, "MODF"))
95 {
96
97 if (size)
98 {
100 for (
uint32 i = 0; i < mapObjectCount; ++i)
101 {
106 }
107 }
108 }
110 }
111
113 fclose(dirfile);
114 return true;
115}
std::uint32_t uint32
Definition: Define.h:108
void fixnamen(char *name, size_t len)
Definition: adtfile.cpp:45
void fixname2(char *name, size_t len)
Definition: adtfile.cpp:63
std::unordered_map< std::string, WMODoodadData > WmoDoodads
Definition: vmapexport.cpp:64
char const * szWorkDirWmo
Definition: vmapexport.cpp:68
bool ExtractSingleWmo(std::string &fname)
Definition: vmapexport.cpp:98
char * wdtGetPlainName(char *FileName)
Definition: wdtfile.cpp:24
void ExtractSet(WMODoodadData const &doodadData, ADT::MODF const &wmo, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
Definition: model.cpp:181
void Extract(ADT::MODF const &mapObjDef, char const *WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
Definition: wmo.cpp:510
size_t read(void *dest, size_t bytes)
Definition: mpq_libmpq.cpp:96
bool isEof()
Definition: mpq_libmpq04.h:93
size_t getPos()
Definition: mpq_libmpq04.h:90
void seek(int offset)
Definition: mpq_libmpq.cpp:114
uint32 Id
Definition: adtfile.h:40
std::vector< std::string > _wmoNames
Definition: wdtfile.h:37
void flipcc(char *fcc)
Definition: mpq_libmpq04.h:99