BTP (File Format)

From Wexos's Wiki
Jump to navigationJump to search

BTP (Binary Texture Pattern) is a texture pattern animation file format part of JSystem.

File Format

Header

A file starts with the following structure:

Offset Type Description
0x00 Char[4] File library magic. Always J3D1 in ASCII.
0x04 Char[4] File type magic. Always btp1 in ASCII.
0x08 UInt32 Size of file in bytes.
0x0C UInt32 Number of sections stored in the file.

After comes 0x10 bytes filled with 0x10. This is data used for a SVR block, but the magic has never been written.

TPT

Offset Type Description
0x00 Char[4] Section magic. Always TPT1 in ASCII.
0x04 UInt32 Section size.
0x08 Byte Loop mode.
0x09 Byte Unknown.
0x0A UInt16 Number of frames.
0x0C UInt16 Number of texture pattern.
0x0E UInt16 Number of global texture IDs.
0x10 UInt32 Texture pattern array offset.
0x14 UInt32 Global texture ID array offset. Points to an array of UInt16s, which represents texture indices in a BMD file.
0x18 UInt32 Material ID array offset. Points to an array of UInt16s, which represents material indices in a BMD file.
0x1C UInt32 String table offset.

Texture Pattern

Type Offset Description
0x00 UInt16 Number of frames stored for this animation.
0x02 UInt16 Index of the first texture ID to use from the global texture ID array.
0x04 Byte Map target ID.
0x05 Byte[3] Padding.

Tools

The following tools can handle BTP files:

  • (none)