Skip to content

Commit 39c3097

Browse files
Wall-coreratkosrb
authored andcommitted
Improve debugging of vmap extractor.
1 parent 1d47006 commit 39c3097

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

contrib/vmap_extractor/vmapextract/adtfile.cpp

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,28 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY, StringSet& failed
132132

133133
size_t nextpos = ADT.getPos() + size;
134134

135-
if (!strcmp(fourcc, "MCIN"))
135+
if (!strcmp(fourcc, "MVER"))
136+
{
137+
}
138+
else if (!strcmp(fourcc, "MHDR"))
139+
{
140+
}
141+
else if (!strcmp(fourcc, "MMID"))
142+
{
143+
}
144+
else if (!strcmp(fourcc, "MWID"))
145+
{
146+
}
147+
else if (!strcmp(fourcc, "MCNK"))
148+
{
149+
}
150+
else if (!strcmp(fourcc, "MFBO"))
151+
{
152+
}
153+
else if (!strcmp(fourcc, "MTXF"))
154+
{
155+
}
156+
else if (!strcmp(fourcc, "MCIN"))
136157
{
137158
}
138159
else if (!strcmp(fourcc, "MTEX"))
@@ -206,6 +227,12 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY, StringSet& failed
206227
}
207228
}
208229
}
230+
else
231+
{
232+
printf("Map=%s, Chunk='%s', Pos=%zd, Size=%d\nBad chunk data. Continue processing this tile? (y/n) ", AdtMapNumber.c_str(), fourcc, ADT.getPos(), size);
233+
if (getchar() == 'n')
234+
return false;
235+
}
209236
//======================
210237
ADT.seek(nextpos);
211238
}

0 commit comments

Comments
 (0)