mirror of
https://github.com/dpethes/rerogue.git
synced 2025-06-07 18:58:32 +02:00
add file format documentation
This commit is contained in:
parent
315f6334ab
commit
4286799259
32
doc/file_data_spec.txt
Normal file
32
doc/file_data_spec.txt
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
HDR
|
||||||
|
entry
|
||||||
|
{
|
||||||
|
16B char[16] section name
|
||||||
|
12B zero
|
||||||
|
4B base offset
|
||||||
|
}
|
||||||
|
|
||||||
|
DAT
|
||||||
|
section
|
||||||
|
{
|
||||||
|
4B offset
|
||||||
|
4B size
|
||||||
|
xB file data, mod4 padded
|
||||||
|
entry
|
||||||
|
{
|
||||||
|
4B int: file offset
|
||||||
|
4B int: file size, if directory then sum of all its file sizes
|
||||||
|
4B int: 0xFFFFFFFF padding
|
||||||
|
2B int: type flag:
|
||||||
|
%10000000 - folder
|
||||||
|
%00000010 - file
|
||||||
|
%00000000 - file
|
||||||
|
%10000010 - subfolder?
|
||||||
|
2B int: if directory then sum of all subentry sizes plus this entry size (subentry count * 32 + 32)
|
||||||
|
16B char: filename (replace last "_" with "." if any)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
25
doc/file_hmp_spec.txt
Normal file
25
doc/file_hmp_spec.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
15B zeros
|
||||||
|
1B ? allways 0x3f (63)
|
||||||
|
4B ?
|
||||||
|
4B ? allways 0x0000003f (63)
|
||||||
|
2B tile count
|
||||||
|
2b ?
|
||||||
|
4B offset to tiles
|
||||||
|
4B offset to some data?
|
||||||
|
2B width in BLK
|
||||||
|
2B height in BLK
|
||||||
|
BLK
|
||||||
|
{
|
||||||
|
width * height * 2B tile indices
|
||||||
|
}
|
||||||
|
xB ?
|
||||||
|
tiles
|
||||||
|
{
|
||||||
|
2b texmap idx (from texture index file)
|
||||||
|
1b ?
|
||||||
|
1b lo - minimum height in tile (probably for terrain LOD?)
|
||||||
|
1b hi - maximum height in tile
|
||||||
|
25B - 5x5 heights
|
||||||
|
}
|
||||||
|
2B 0x0000
|
||||||
|
|
32
doc/file_image_spec.txt
Normal file
32
doc/file_image_spec.txt
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
4B data size DS
|
||||||
|
4B offset to pixels
|
||||||
|
32B zeros
|
||||||
|
4B description string offset DSO
|
||||||
|
attributes {
|
||||||
|
2B width - must be increased to multiple of 2 if odd
|
||||||
|
2B height
|
||||||
|
1B 0x01
|
||||||
|
1B bits per pixel:
|
||||||
|
-0: 4bit
|
||||||
|
-1: 8bit
|
||||||
|
1B subtype:
|
||||||
|
-3 RGBA
|
||||||
|
-4 greyscale
|
||||||
|
-5 ? ov_rdir
|
||||||
|
1B 0, 0x80/128
|
||||||
|
}
|
||||||
|
4B zeros
|
||||||
|
4B ?
|
||||||
|
xB pixels
|
||||||
|
(DSO - DS)B description string (zero term.)
|
||||||
|
|
||||||
|
if there's more data in file, repeat
|
||||||
|
|
||||||
|
|
||||||
|
subtype:
|
||||||
|
0 - palette 16x3B RGB, 4bit per pixel
|
||||||
|
1 - ?256x4B palette RGBA, 8bit per pixel?
|
||||||
|
2 - ?16bit RGB?
|
||||||
|
3 - RGBA 32bit
|
||||||
|
4 - grayscale, 4bit per pixel if bpp = 0, else grayscale 8 bit
|
||||||
|
5 - grayscale, 16bit per pixel
|
Loading…
x
Reference in New Issue
Block a user