Closed collinsmith closed 5 years ago
After a bit more research, this looks like a bug with my pkexplode implementation or the data requires some extra work before being passed to it. I double checked the actual patch_d2.mpq data and my table matches the entry/sectors.
[MPQ] Reading data\global\sfx\item\gem.wav...
[MPQ] entry = com.riiablo.mpq.MPQ$HashTable$Entry@6a79ddf6[key=0x92063ef62aa83903,locale=Neutral / English (American),platform=DEFAULT,blockIndex=130]
[MPQ] block = com.riiablo.mpq.MPQ$BlockTable$Block@3c528972[filePos=0x7e48b2,CSize=28401,FSize=31370,flags=IMPLODE|EXISTS]
Resolved issue by checking if compressed sector size is the same as the sector size, in which case the sector isn't compressed at all and is the raw data, so copy it. Tested fix on affected sound file.
patch_d2.mpq version of
data\global\sfx\item\gem.wav
is failing to load due to bad data. Flags are marked asIMPLODE|EXISTS
, but this doesn't seem to be the case (it looks like it's encrypted or compressed still like in d2sfx.mpq). d2exp.mpq also containsdata\global\sfx\item\gem.wav
, but it's a different sound. Since the sound in d2sfx.mpq sounds the same as patch_d2.mpq, I'm going to manually override it and circumvent d2exp.mpq as a workaround.I'm not sure if this is an error with the MPQ or an error with my decoder, however my inclination is that this is an error with the MPQ since I've yet to see any other files produce such an error (although other MPQ readers are able to extract it). If any more pop up, I'll have this issue to reference.
FYI: Output from decoding d2sfx