eezstreet / OpenD2

A project to open source Diablo 2.
GNU General Public License v3.0
573 stars 77 forks source link

Fixed a couple issue in the decryption and de-compression of audio fi… #22

Closed NorthernLight1 closed 5 years ago

NorthernLight1 commented 5 years ago

-The encryption key was only valid for the first block of data. The encryption key for a specific block should be encryption key plus the index of the block (EncryptionKey + 1). -The compression functions were designed to be called one after another, passing the output buffer from one to another. The issue was, it was not correctly passing the output buffer and the number of bytes written to the output buffer.

I tested this with the intro music that plays when you start D2 and it works perfectly ("data\global\music\introedit.wav" in "d2xmusic.mpq").

eezstreet commented 5 years ago

Really nice work! I have reviewed the changes and these look good!