Extracting images from GRAPHICS.DAT palette issues
Posted: Tue Oct 19, 2004 3:54 am
Hello,
I'm a long time player, first time poster.
I wanted to extract the graphics from the GRAPHICS.DAT (PC 3.4 English) file. I couldn't run the extraction programs on dmweb.free.fr on my computer since at the time I was on a mac, so I read the specs on http://dmweb.free.fr and I downloaded the code for dmdecode and wrote a Python program. After quite a while with endian fun I got it working and extracted all of the graphics.
There's only one problem, the graphics for certain monsters are colored wrong (worms are orange-ish-tan-ish). So I tried running dmdecode on a PC, and it yielded the same results.
I found a program called: DMGHL_Sample2.SR1.Rev0 which is a program that uses the DMGHL library to extract the graphics. This program worked correctly. Now I have my images, but I'm still curious about how I could make my program work correctly. I downloaded the source to the DMGHL library, but cannot see any differences in the algorithm WRT the palettes. It looks like it uses the same palette that I do, so I think that the correction might occurr in the sample program itself, which I don't have the source to.
Now, from what I understand, DM has two palettes, one for the interface elements, and one for the dungeon. I know that I'm using the wrong palette for some of these images. I could fairly easily fix it by hand, but was wondering if there were a better way.
Is there a way for me to determine from any of the DM data files what these palettes are, or is that stored in the exe?
I'm a long time player, first time poster.
I wanted to extract the graphics from the GRAPHICS.DAT (PC 3.4 English) file. I couldn't run the extraction programs on dmweb.free.fr on my computer since at the time I was on a mac, so I read the specs on http://dmweb.free.fr and I downloaded the code for dmdecode and wrote a Python program. After quite a while with endian fun I got it working and extracted all of the graphics.
There's only one problem, the graphics for certain monsters are colored wrong (worms are orange-ish-tan-ish). So I tried running dmdecode on a PC, and it yielded the same results.
I found a program called: DMGHL_Sample2.SR1.Rev0 which is a program that uses the DMGHL library to extract the graphics. This program worked correctly. Now I have my images, but I'm still curious about how I could make my program work correctly. I downloaded the source to the DMGHL library, but cannot see any differences in the algorithm WRT the palettes. It looks like it uses the same palette that I do, so I think that the correction might occurr in the sample program itself, which I don't have the source to.
Now, from what I understand, DM has two palettes, one for the interface elements, and one for the dungeon. I know that I'm using the wrong palette for some of these images. I could fairly easily fix it by hand, but was wondering if there were a better way.
Is there a way for me to determine from any of the DM data files what these palettes are, or is that stored in the exe?