nn::ui2d provides the Binary Cafe Layout Animation file format to store animations for Bflyt files.
Standard ui2d header.
There are 3 top level sections, Animation Tag (pat1), Animation Info (pai1), and Animation Share (pah1).
Animation Tag
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x8
|
Ui2d Section Header
|
Magic: "pat1"
|
| 0x8
|
0x2
|
u16
|
Tag Order
|
| 0xa
|
0x2
|
u16
|
Group Count
|
| 0xc
|
0x4
|
u32
|
Name Offset
|
| 0x10
|
0x4
|
u32
|
Group Array Offset
|
| 0x14
|
0x4
|
u32
|
User Data List Section Offset
|
| 0x18
|
0x2
|
u16
|
Start Frame
|
| 0x1a
|
0x2
|
u16
|
End Frame
|
Animation Group
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x21
|
char[0x21]
|
GroupName
|
| 0x21
|
0x1
|
u8
|
Unknown Flag
|
| 0x22
|
0x2
|
u16
|
Unknown/Reserved
|
Animation Info
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x8
|
Ui2d Section Header
|
Magic: "pai1"
|
| 0x8
|
0x2
|
u16
|
Frame count
|
| 0xa
|
0x1
|
u8
|
Is looping
|
| 0xb
|
0x1
|
u8
|
Unknown/Reserved
|
| 0xc
|
0x2
|
u16
|
Texture count
|
| 0xe
|
0x2
|
u16
|
Animation Content count
|
| 0x10
|
0x4
|
u32
|
Animation Content offset array offset (u32 array of offsets to AnimationContent)
|
| 0x14
|
0x4 * Texture Count
|
u32
|
Texture name offset array
|
Animation Target
| Name
|
Enum Value
|
Description
|
| Pane
|
0x0
|
Animation targets Panes
|
| Material
|
0x1
|
Animation targets Materials
|
| User
|
0x2
|
Animation targets UserData
|
| PaneExt
|
0x3
|
Seems to duplicate as Pane sometimes?
|
| StateMachine
|
0x4
|
Animation targets StateMachine
|
Animation Content
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x1c
|
char[0x1c]
|
Animation Name
|
| 0x1c
|
0x1
|
u8
|
Animation Info Count
|
| 0x1d
|
0x1
|
u8
|
Animation Target
|
| 0x1e
|
0x2
|
u16
|
Unknown/Reserved
|
| 0x20
|
0x4 * Animation Info Count
|
u32
|
Animation Info Offset Array
|
Animation Info Type
| Name (unofficial)
|
Magic Value
|
Description
|
| Per Character Transform Curve Anim
|
FLCC
|
|
| Extended User Data Anim
|
FLEU
|
|
| Per Character Transform Anim
|
FLCT
|
|
| Pane SRT (Scale Rotation Translation) Anim
|
FLPA
|
|
| Vertex Color Anim
|
FLVC
|
|
| Visibility Anim
|
FLVI
|
|
| Drop Shadow Anim
|
FLDS
|
|
| Mask Texture Anim
|
FLMT
|
|
| Procedural Shape Anim
|
FLPS
|
|
| Window Anim
|
FLWN
|
|
| State Machine Anim
|
FSMA
|
|
| Alpha Compare Anim
|
FLAC
|
|
| Font Shadow Anim
|
FLFS
|
|
| Indirect SRT Anim
|
FLIM
|
|
| Material Color Anim
|
FLMC
|
|
| Texture SRT Anim
|
FLTS
|
|
| Texture Pattern Anim
|
FLTP
|
|
| Brick Repeat Anim
|
FTBR
|
|
| Vector Graphics Anim
|
FVGA
|
|
Animation Info
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x4
|
u32
|
Animation Info Type Magic
|
| 0x4
|
0x1
|
u8
|
Animation Target Count
|
| 0x5
|
0x3
|
u24
|
Unknown/Reserved
|
| 0x8
|
0x4 * Animation Target Count
|
u32
|
Animation Target Offset Array
|
Animation Curve
Animation Curve Type
| Name (unofficial)
|
Enum Value
|
Description
|
| Constant
|
0x0
|
Plain float values
|
| Step
|
0x1
|
Step key frames
|
| Hermite
|
0x2
|
Hermite key frames
|
Step Key
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x4
|
float
|
Key Index
|
| 0x4
|
0x2
|
u16
|
Value
|
| 0x6
|
0x2
|
u16
|
Unknown/Reserved
|
Hermite Key
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x4
|
float
|
Key Index
|
| 0x4
|
0x4
|
float
|
Value
|
| 0x8
|
0x4
|
float
|
Slope
|
Animation Target
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x1
|
u8
|
Unknown/Reserved
|
| 0x1
|
0x1
|
u8
|
Target Index
|
| 0x2
|
0x1
|
u8
|
Anim Curve Type
|
| 0x3
|
0x1
|
u8
|
Unknown/Reserved
|
| 0x4
|
0x2
|
u16
|
Frame Count
|
| 0x6
|
0x2
|
u16
|
Unknown/Reserved
|
| 0x8
|
0x4
|
u32
|
Key Array Offset
|
Animation Share
Note; at time of writing author has not seen a Bflan with this section
| Offset
|
Size
|
Type
|
Description
|
| 0x0
|
0x8
|
Ui2d Section Header
|
Magic: "pah1"
|
| 0x8
|
0x4
|
u32
|
Share Info Offset
|
| 0xc
|
0x2
|
u16
|
Share Info Count
|
| 0xe
|
0x2
|
u16
|
Unknown/Reserved
|