DCC Loading Issues

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
cla$$ics
Moderator
Arch-Angel
Posts: 1320
Joined: Wed Aug 15, 2007 3:48 pm
United States of America

Hand-picked

DCC Loading Issues

Post by cla$$ics » Tue Jan 30, 2018 6:10 am

For OpenD2 I am working on the DCC decoder. I am very close to getting it working. In fact, this close:
Image
That's the first frame (0) of the Necromancer death animation, direction 0. It's very close, albeit with some sprite corruption down at the bottom.
Other frames...do not fare as well.
Image
That's the second frame (frame 1).

The rest of the file seems to be loading correctly but the frame decoding seems wrong.
https://github.com/eezstreet/OpenD2/blo ... p#L52-L383
Here is the associated code. I've followed SVR's decoder to a T however nothing is jumping out at me. The only other thing I think it could be is the bitstream:
https://github.com/eezstreet/OpenD2/blo ... stream.cpp

Or, perhaps it is unlikely, but maybe an MPQ decoding issue. The Druid and the Assassin animations appear to be totally uncompressed in d2exp.mpq and my loader does not account for those yet. Those crash even before the decoding step.
If I can get the decoder working, that would probably solve the biggest issue at the moment facing the project.
Is there some obvious issue that's causing it to not work? Or is there some kind of clue as to how I can debug the issue better? As far as I can tell, the issue is not related to the renderer or SDL itself. Also confusing me was that in Dr. Tester it shows the 0th direction as "Direction 8 in File", and lists it as the second direction, for some reason. I can't seem to preview the DCC in CV5 either.
Although done for our needs, mod-makers should like these changes, too.
11/1/08 - COTL; 5/10/09 - Angel; 11/11/09 - Archangel

User avatar
seltsamuel
Posts: 80
Joined: Sat Feb 10, 2007 8:52 am

Re: DCC Loading Issues

Post by seltsamuel » Wed Jan 31, 2018 9:22 pm

Hi,
if you just want a working decoder.. look into the sources of Pauls DS1 Editor.
Encoding is a different story.

Greetings

Seltsamuel

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
South Africa

Hand-picked

Re: DCC Loading Issues

Post by Necrolis » Wed Jan 31, 2018 9:34 pm

seltsamuel wrote:
Wed Jan 31, 2018 9:22 pm
Hi,
if you just want a working decoder.. look into the sources of Pauls DS1 Editor.
Encoding is a different story.

Greetings

Seltsamuel
Pauls decoder (and encoder in DCCMerge) are great references and very good for tools, but horribly slow (in testing I found SVR's decoder to be between 10 and 20 times faster).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Return to “Code Editing”