This is the file that holds the texture image. There are 4bit index files as well as 8bit index files. Each is a binary file with the following configuration:
Header area (64byte) |
u32 tex_img_tag u32 tex_img_width u32 tex_img_height u32 tex_pixel_depth (48byte reserved area) |
---|---|
Image area |
u32 pixel_index_array(0) u32 pixel_index_array(1) : : |
For convenience, this ID is used to identify whether the file is a TMF file.
For 4bitCI
TAG_TEX_IMG_4_CI = 0x00120200
For 8bitCI
TAG_TEX_IMG_8_CI = 0x00120300
Describes the number of pixels in a horizontal line of the texture image.
Describes the number of vertical lines in the texture image.
Describes the number of bits used per pixel.
For 4bitCI
TEX_PIXEL_DEPTH_4_CI = 0x00000004
For 8bitCI
TEX_PIXEL_DEPTH_8_CI = 0x00000008
The area describing which color in the palette to use for each pixel.
The pixel data is basically described in order from the bottom-left of the image data.
For a 4bitCI, 8 pixels at a time are stored in pixel_index_array in order from the bottom-left of the image data. u32, like NIFF, stores data using the big endian method.
For an 8bitCI, 4 pixels at a time are stored in pixel_index_array in order from the bottom-left of the image data.
In either case, if the last data does not fill 32bits, the remainder is filled with 0x0.
Copyright (C) 1998-1999 NINTENDO Co.,Ltd. Copyright (C) 1998-1999 NINTENDO OF AMERICA, Inc. Copyright (C) 1998-1999 MONEGI CORPORATION. Copyright (C) 1998-1999 INTELLIGENT SYSTEMS Co.,Ltd. All rights reserved. |