-
Notifications
You must be signed in to change notification settings - Fork 4
Field File Section 4: Palette
Niema Moshiri edited this page May 28, 2019
·
2 revisions
The Palette contains color data. This wiki is a useful reference for the Palette section.
- This is a 4-byte unsigned integer denoting the total length (in bytes) of this section
- The exact same section length (not sure why it's included again in the Section 4 Header)
- This is a 2-byte unsigned integer that is always exactly 0
- It's useful for the PlayStation version, but not the PC/Switch versions
- This is a 2-byte unsigned integer that is always exactly 480
- It's useful for the PlayStation version, but not the PC/Switch versions
- This is a 2-byte unsigned integer denoting the number of colors on each page of the palette (always 256)
- This is a 2-byte unsigned integer denoting the number of pages in this palette
- There are "Number of Pages" * "Number of Colors per Page" colors, each represented using 2 bytes
- From leftmost bit to rightmost bit:
- The first bit is a mask (alpha?)
- The next 5 bits are an unsigned integer for Blue
- The next 5 bits are an unsigned integer for Green
- The next 5 bits are an unsigned integer for Red
- In other words:
ABBBBBGG GGGRRRRR
(A
= Mask,B
= Blue,G
= Green,R
= Red)
Niema Moshiri 2019