Skip to content

Instantly share code, notes, and snippets.

@Brian151
Created December 14, 2022 22:51
Show Gist options
  • Save Brian151/6378b46596480cd1208d265dca772e82 to your computer and use it in GitHub Desktop.
Save Brian151/6378b46596480cd1208d265dca772e82 to your computer and use it in GitHub Desktop.
all texture formats for Nintendo 64 games made by Rare
// common
TypeFormat : Byte {
U4 textureType
U4 textureFormat
}
Flags : U16 {
Bit unk0x8000
Bit unk0x4000
Bit unk0x2000
Bit unk0x1000
Bit unk0x800
Bit interlace
Bit unk0x200
Bit unk0x100
Bit wrapS // 0 : wrap, // 1: clamp
Bit wrapT // 0 : wrap, // 1: clamp
Bit unk0x20
Bit flag0x10
Bit unk0x80
Bit flag0x04
Bit unk0x2
Bit flag0x01
}
enum formats {
RGBA32
RGBA16
I8
I4
IA16
IA8
IA4
CI4
CI8
}
// Diddy Kong Racing
Struct DKR {
Byte width
Byte height
TypeFormat format
Byte spriteX
Byte spriteY
Byte unk0x5
Flags flags
U16 palOffset // CI only
U32 unk0x0a
U16 unk0x0e
U16 unk0x10
U16 numberOfTextures
U16 frameAdvanceDelay // numberOfTextures > 1
U16 writeSize
U32 unk0x18
Byte unk0xc
Byte isCompressed // != 0 : compressed
U16 unk0x1e
}
// Dinosaur Planet
Struct DP {
Byte width
Byte height
TypeFormat format
Byte spriteX
Byte spriteY
Byte unk0x5
Flags flags
U32 PTR_gdl
U16 levels
U16 unk_0xe
U16 unk_0x10
U16 gdlIdx
U32 PTR_next
U16 unk_0x18
Byte unk_0x1a
Byte hwMSB {
U4 widthMSB
U4 heightMSB
}
Byte cms
Byte masks
Byte cmt
Byte maskt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment