M
Minimaul
Guest
Great I will get started on updating PegTool when I get home tonightI thought I had posted this, but maybe not. Here goes the peg info from SR2(probably identical in SR3):
header:
uint32 signature
uint16 version
uint16 platform
uint32 directory block size
uint32 data block size
uint16 number of bitmaps
uint16 flags
uint16 total number of entries(animated bitmaps may make this < number of bitmaps)
uint16 alignment value
after the header immediately follows the peg entries:
uint32 data pointer/offset
uint16 width
uint16 height
uint16 bitmap format
uint16 pal format
uint32 mip filter value
uint16 number of frames
uint16 flags
uint32 filename pointer/offset
uint16 pal size
uint8 fps
uint8 mip levels (base frame + number of mips, always at least 1)
uint32 frame size (bytes in palette + image)
uint32 next pointer (runtime)
uint32 prev pointer (runtime)
uint32 cache (runtime)
uint32 cache (runtime)
A vbm is just a peg with a single entry, nothing special there. Palette data seems to be a PS2 relic. PC bitmap formats are DXT1, DXT3, DXT5, 565, 1555, 4444, 888, 8888, 16_DUDV, 16_DOT3_COMPRESSED and A8 starting at value 400 and going sequentially. The peg entry flags are bitfields with the least significant bit being alpha, then non power of two, alpha test, cube map, interleaved mips, interleaved data. The interleaving information is really only used on Xbox 360 to help make the texture alignment not as horrible.