This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
SFXPARAM.bt
75 lines (64 loc) · 1.85 KB
/
SFXPARAM.bt
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
75
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: SFXPARAM.bt
// Authors: TKGP
// Version:
// Purpose: DS2 special-purpose SFX params
// Category: Dantelion
// File Mask: *.sfxparam
// ID Bytes: 73 66 78
// History:
//------------------------------------------------
LittleEndian();
//------------------------------------------------
typedef struct {
char magic[3]; Assert(magic == "sfx");
char type; Assert(type == 'd' || type == 'p');
int unk04;
int rowCount;
int unk0C; Assert(unk0C == 0x20);
int unk10 <hidden=true>; Assert(unk10 == 0);
int unk14 <hidden=true>; Assert(unk14 == 0);
int unk18 <hidden=true>; Assert(unk18 == 0);
int unk1C <hidden=true>; Assert(unk1C == 0);
} Header <bgcolor=cLtRed>;
typedef struct {
int id;
int unk04 <hidden=true>; Assert(unk04 == 0);
} DRow <read=ReadDRow, bgcolor=cLtGreen, optimize=false>;
string ReadDRow(DRow& row) {
string str;
return SPrintf(str, "%9i", row.id);
}
typedef struct {
int id;
float unk04;
int unk08;
int unk0C;
byte unk10; Assert(unk10 == 0 || unk10 == 1);
byte unk11; Assert(unk11 == 0 || unk11 == 1);
byte unk12; Assert(unk12 == 0 || unk12 == 1);
byte unk13; Assert(unk13 == 0 || unk13 == 1);
int unk14;
int unk18; // 2 shorts?
int unk1C;
float unk20;
float unk24;
float unk28;
float unk2C;
float unk30;
float unk34;
float unk38;
float unk3C;
} PRow <read=ReadPRow, bgcolor=cLtGreen, optimize=false>;
string ReadPRow(PRow& row) {
string str;
return SPrintf(str, "%9i", row.id);
}
//------------------------------------------------
Header header;
if (header.type == 'd')
struct { DRow rows[header.rowCount]; } rows <open=true>;
else if (header.type == 'p')
struct { PRow rows[header.rowCount]; } rows <open=true>;