Instantly share code, notes, and snippets.

@Risca /notes
Created May 26, 2017

Embed
What would you like to do?
death gate notes
.PIC: Images and other stuff
Begins with header with info on all contained files. Last header entry is blank (all zeros):
4 bytes - Offset to file
2 bytes - Type:
0x0300 == closed book or runes,
0x0500 == navigation images and items,
0x1300 == note, open book, spell casting interface, or frame around embedded video,
0x1500 == big static image,
0x4501 == some kind of overlay images to big images,
3*2 bytes - Type specific data/arguments
For images, first and second argument specifies width and height.
4 bytes - Offset to next file
...
Type 0x1300 and 0x1500 begins with a 256*3 RGB palette in 6 bit BGR format (at the offset), followed by the image itself.
Type 0x4501 begins with 2*2 byte header, might be coordinates on where to overlay. Palette unknown.
Type 0x500 has no header. Palette unknown.
DGATE000-19.PIC == Static images of places and static overlays
DGATE020-28.PIC == books
DGATE040.PIC == Static full size images
DGATE050-58.PIC == Animations
DGATE060-61.PIC == Spells, runes, etc.
DGATE062-63.PIC == Pipes and pipe animations
DGATE064.PIC == Dwarven cave puzzle
DGATE066.PIC == End puzzle
DGATE067.PIC == Book flip page animation
DGATE068.PIC == Clock puzzle
DGATE069.PIC == Steering stone
DGATE070.PIC == Labyrinth on Abarrach (world of stone)
DGATE071.PIC == Images in credits
DGATE075-78.PIC == World map and ship animations
DGATE080-86.PIC == Images shown when talking to a person
.Q: Animations. Might be divided in sections with MF and MZ as delimiters. MF is followed by a new offset in the same file, MZ is probably followed by a size or a relative offset.
.Q files from the dgatevga folder of the CD can be played back with xanim (FLI format).
.MUS: Music. XMIDI format.
Begins with header (of course). First 16 bits are number of songs/melodies + 1 (don't really know why +1).
Rest of header consists of offset (uint32_t) and size (uint16_t) pairs.
.VOC: Voices. 8bit, 2 channels (stereo), somewhere around 10900 Hz (aplay -c2 -r10900 DGATE001.VOC)
Begins with a header. First 16 bits are number of sounds +1 (again, don't really know why +1)
Rest of header consists of offsets (uint32_t) to each sound.
.FLI: Animation. Books for example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment