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?
Extracting images from GRAPHICS.DAT palette issues
Moderator: Ameena
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

-
- Neophyte
- Posts: 3
- Joined: Mon Oct 18, 2004 11:54 am
Extracting images from GRAPHICS.DAT palette issues
Last edited by RedHatDude on Tue Oct 19, 2004 6:25 am, edited 1 time in total.
-
- Neophyte
- Posts: 3
- Joined: Mon Oct 18, 2004 11:54 am
- Gambit37
- Should eat more pies
- Posts: 13776
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Exactly. There is another lookup table in the graphics dat that determines which colours are replaced in those locations. I'm not sure where it's stored or how, but look in the CSBWin forums for a post about file 0558, which should lead you to some downloadable docs with info about those colours...
By default, the palette uses the flesh/orange colours for those two indexes on ALL images that are extracted. DMHGL must account for that and put the correct colours into certain images...
By default, the palette uses the flesh/orange colours for those two indexes on ALL images that are extracted. DMHGL must account for that and put the correct colours into certain images...
-
- Neophyte
- Posts: 3
- Joined: Mon Oct 18, 2004 11:54 am
- Gambit37
- Should eat more pies
- Posts: 13776
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
0558 is one of the structures that is extracted from GRAPHICS.DAT when you use the DMExtract tool. "Charlatan" spent a long time decoding it and documented his findings, though it is in French. This data structure contains tons of info about the graphics for the game, including bytes for monsters that tell the game which colours to use for indexes 9 & 10.
In the notes, there is a detailed description of how it works plus a graphic of the colour table. I don't know how much of that will be useful to you though.
The post you want is here:
http://www.dungeon-master.com/forum/vie ... hp?t=23191
And the download links are here (can be found in that post):
http://pageperso.aol.fr/TheCharlatan75/Lucyle/0558.zip
http://pageperso.aol.fr/TheCharlatan75/ ... atures.zip
In the notes, there is a detailed description of how it works plus a graphic of the colour table. I don't know how much of that will be useful to you though.
The post you want is here:
http://www.dungeon-master.com/forum/vie ... hp?t=23191
And the download links are here (can be found in that post):
http://pageperso.aol.fr/TheCharlatan75/Lucyle/0558.zip
http://pageperso.aol.fr/TheCharlatan75/ ... atures.zip
- ChristopheF
- Encyclopedist
- Posts: 1623
- Joined: Sun Oct 24, 1999 2:36 pm
- Location: France
- Contact: