Originally Posted by
Flowerew
I haven't had no problems so far. Listfiles seem to be ok, and even expansion3.mpq has been read without problems. So I dont know what you mean, TOM_RUS.
Basicaly libmpq has no support for mpq files used in 4.x wow client. For example wow-update-XXXXX.mpq doesn't store any directly usable data, only diffs from base mpq+all previous diffs (PTCH files). I'm surprised that libmpq can still open thise new files...
P.S. While trying to get your sample running, i've encountered few problems: 2 compile errors in VS2010 and 1 crash, what i've modified so far to fix them:
Code:
Index: samples/Sample_D3dByAreaId.cpp
===================================================================
--- samples/Sample_D3dByAreaId.cpp (revision 44)
+++ samples/Sample_D3dByAreaId.cpp (working copy)
@@ -25,12 +25,12 @@
//------------------------------------------------------------------------------
int main( int arch, char **argv ) {
- MpqHandler mpq_h( "C:\\Users\\Public\\Games\\World of Warcraft\\Data" );
+ MpqHandler mpq_h( "G:\\Games\\World of Warcraft\\Data" );
loadAllMpqs( mpq_h );
// load WDT file which tells us what ADT tiles to load
BufferS_t file_buffer;
- std::string zone_path( "oldworld\\world\\maps\\azeroth\\azeroth" );
+ std::string zone_path( "world\\maps\\azeroth\\azeroth" );
mpq_h.getFile( zone_path + ".wdt", &file_buffer );
// create geometry buffer
@@ -199,7 +199,7 @@
// unique identifier not found: insert UID in map
if ( found == uid_map.end() ) {
- uid_map.insert( UidMap_t::value_type( doodad.info.uid, 0 ) );
+ uid_map.insert( UidMap_t::value_type( doodad.info.uid, (void*)0 ) );
BufferS_t doodad_buf;
mpq_h.getFile( doodad.name, &doodad_buf );
@@ -239,7 +239,7 @@
// same procedure as above
if ( found == uid_map.end() ) {
- uid_map.insert( UidMap_t::value_type( wmo.info.uid, 0 ) );
+ uid_map.insert( UidMap_t::value_type( wmo.info.uid, (void*)0 ) );
BufferS_t wmo_buf;
mpq_h.getFile( wmo.name, &wmo_buf );
Index: src/wmomodel.cpp
===================================================================
--- src/wmomodel.cpp (revision 44)
+++ src/wmomodel.cpp (working copy)
@@ -83,8 +83,10 @@
// read MODN chunk: doodad names
i_str.read( (char*)&_modnChunk, CHUNK_DATA );
- _modnChunk.doodadNames.resize( _modnChunk.size );
- i_str.read( (char*)&_modnChunk.doodadNames[0], _modnChunk.size );
+ if(_modnChunk.size) {
+ _modnChunk.doodadNames.resize( _modnChunk.size );
+ i_str.read( (char*)&_modnChunk.doodadNames[0], _modnChunk.size );
+ }
// read MODD chunk: doodad informations
i_str.read( (char*)&_moddChunk, CHUNK_DATA );
and even after those fixes I can't get anything like displayed on your screenshot...
That's what I got http://img88.imageshack.us/img88/1808/elwynnforest.jpg