-
Notifications
You must be signed in to change notification settings - Fork 27
/
brlyt.h
74 lines (63 loc) · 1.24 KB
/
brlyt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* brlyt.h
*
*
* Created by Alex Marshall on 09/01/27.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#ifndef BRLYT_H_
#define BRLYT_H_
#include "types.h"
typedef struct
{
fourcc magic; // RLYT
u32 unk1; // 0xFEFF0008
u32 filesize; // The filesize of the brlyt.
u16 lyt_offset; // Offset to the lyt1 section.
u16 unk2; // Unknown.
} brlyt_header;
typedef struct
{
fourcc magic; // The magic.
u32 length; // How long the entry is.
} brlyt_entry_header;
typedef struct
{
fourcc magic; // The magic.
u32 length; // How long the entry is.
u32 data_location; // The location of the data in the BRLYT file.
} brlyt_entry;
typedef struct
{
u16 flags;
u16 alpha;
char name[0x18];
f32 x;
f32 y;
f32 unk[3];
f32 angle;
f32 xmag;
f32 ymag;
f32 width;
f32 height;
} brlyt_pic1_chunk;
typedef struct
{
u32 unk[3];
} brlyt_lyt1_chunk;
typedef struct
{
char name[16];
u16 numsubs;
u16 unk;
} brlyt_grp1_chunkbase;
typedef struct
{
u16 num;
u16 offs;
} brlyt_img_chunk;
// grs1, gre1, pas1, and pae1 all don't have anything special. they seem to just be prefixes to some sections.
void parse_brlyt(char *filename);
void make_brlyt(char* infile, char* outfile);
#endif //BRLYT_H_