This is the file that holds the color palette information of the texture. There are files for 4bitCI and 8bitCI. Each is a binary file with the following configuration:
Header area (64bytes) |
u32 color_index_tag u32 color_num u32 color_type (52byte reserved area) |
---|---|
Color area |
u32 color_array(0) u32 color_array(1) : : |
For convenience, this ID is used to identify whether the file is a TLF file.
For 4bitCI
TAG_COLOR_PALETTE_16 = 0x00200100
For 8bitCI
TAG_COLOR_PALETTE_256 = 0x00200200
The number of colors entered in the color palette.
For 4bitCI
PALETTE_COLOR_NUM_16 = 0x00000010
For 8bitCI
PALETTE_COLOR_NUM_256 = 0x00000100
The type of the color stored in the palette
For 16bitRGBA
PALETTE_COLOR_TYPE_RGBA16 = 0x00000000
For 16bitIA
PALETTE_COLOR_TYPE_IA16 = 0x00000001
The actual data inside the palette. The actual color values are stored in order from palette number 0. Each color value is a 16bit value, so 2 are stored in each color_array. For a 4bitCI, there are a total of 16 colors in the palette, so color_array is the 8 units of data from 0~7. For an 8bitCI, there are a total of 256 colors in the palette, so color_array is the 128 units of data from 0~127.
Copyright (C) 1998 NINTENDO Co.,Ltd. Copyright (C) 1998 NINTENDO OF AMERICA, Inc. Copyright (C) 1998 MONEGI CORPORATION. Copyright (C) 1998 INTELLIGENT SYSTEMS Co.,Ltd. All rights reserved. |