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:107
void fixnamen(char *name, std::size_t len)
Definition: adtfile.cpp:44
void fixname2(char *name, std::size_t len)
Definition: adtfile.cpp:62
char * wdtGetPlainName(char *FileName)
Definition: wdtfile.cpp:24
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
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:509
bool isEof()
Definition: mpq_libmpq04.h:92
void seek(int offset)
Definition: mpq_libmpq.cpp:114
std::size_t read(void *dest, std::size_t bytes)
Definition: mpq_libmpq.cpp:96
std::size_t getPos()
Definition: mpq_libmpq04.h:89
uint32 Id
Definition: adtfile.h:40
std::vector< std::string > _wmoNames
Definition: wdtfile.h:36
void flipcc(char *fcc)
Definition: mpq_libmpq04.h:98