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
/
PFBB.bt
104 lines (82 loc) · 2.22 KB
/
PFBB.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: PFBB.bt
// Authors: TKGP
// Version:
// Purpose: Unknown DS2 format
// Category: Dantelion
// File Mask: *.pfbbin
// ID Bytes: 50 46 42 42 46 52 50 47 32
// History:
//------------------------------------------------
local int VARINT_LONG = ReadInt(0x24) == 0;
#include "Util.bt"
LittleEndian();
//------------------------------------------------
typedef struct {
char magic[10]; Assert(magic == "PFBBFRPG2");
short unk0A; Assert(unk0A == 0);
int unk0C; Assert(unk0C == 0);
int unk10; Assert(unk10 == 0);
int unk14; Assert(unk14 == 0);
short unk18; Assert(unk18 == 1);
short unk1A; Assert(unk1A == 1);
short unk1C; Assert(unk1C == 1);
short unk1E; Assert(unk1E == 1);
Varint offset20;
Varint offset24;
Varint offset28;
short unk2C; Assert(unk2C == 1);
short unk2E;
} Header <bgcolor=cLtRed>;
typedef struct {
byte b;
} Unk11111 <bgcolor=cBlack, fgcolor=cWhite>;
typedef struct {
Varint unk00;
Varint offset04;
local quad pos <hidden=true> = FTell();
FSeek(offset04.val);
Unk11111 unk11111;
FSeek(pos);
} Unk1111 <optimize=false>;
typedef struct {
Varint unk00;
Varint offset04;
local quad pos <hidden=true> = FTell();
FSeek(offset04.val);
Unk1111 unk1111;
FSeek(pos);
} Unk111 <optimize=false>;
typedef struct {
int unk00;
int unk04;
Varint offset08;
local quad pos <hidden=true> = FTell();
FSeek(offset08.val);
Unk111 unk111s[unk04];
FSeek(pos);
} Unk11 <optimize=false>;
typedef struct {
int unk00;
if (VARINT_LONG) {
int zero <hidden=true>; Assert(zero == 0);
}
OffsetString name(VARINT_LONG, 1);
OffsetString path(VARINT_LONG, 1);
int unk0C;
int unk10;
Varint offset14;
local quad pos <hidden=true> = FTell();
FSeek(offset14.val);
Unk11 unk11s[unk10];
FSeek(pos);
} Unk1 <read=ReadUnk1, bgcolor=cLtGreen, optimize=false>;
wstring ReadUnk1(Unk1& unk1) {
return unk1.path.str + " | " + unk1.name.str;
}
//------------------------------------------------
Header header;
FSeek(header.offset28.val);
Unk1 unk1s[header.unk2E];