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
/
Copy pathSIBCAM.bt
122 lines (101 loc) · 2.89 KB
/
SIBCAM.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//------------------------------------------------
//--- 010 Editor v10.0.1 Binary Template
//
// File: SIBCAM.bt
// Authors: horkrux, TKGP
// Version:
// Purpose: Pre-Havok camera animations
// Category: Dantelion
// File Mask: *.sibcam
// ID Bytes:
// History:
//------------------------------------------------
#include "Util.bt"
LittleEndian();
if (ReadInt() == 0x1000000)
BigEndian();
//------------------------------------------------
typedef struct {
int unk00; Assert(unk00 == 1);
int unk04; Assert(unk04 == 8);
int unk08; Assert(unk08 == 0xC);
int unk0C <format=hex>; Assert(unk0C == 0x20051014);
int unk10; Assert(unk10 == 0);
int lastFrame;
int camOffsetOffset <format=hex>; Assert(camOffsetOffset == 0x84);
int unk1C; Assert(unk1C == 1);
int frameDataOffset <format=hex>;
int frameDataEndOffset <format=hex>;
int frameDataCount;
int unk2C; Assert(unk2C == 0);
int fileSize <format=hex>;
local int i <hidden=true>;
for (i = 0; i < 20; i++) {
int unused <fgcolor=cGray, hidden=true>; Assert(unused == 0);
}
int camOffset <format=hex>; Assert(camOffset == 0x178);
int unk88; Assert(unk88 == 3);
} Header <bgcolor=cLtRed>;
typedef struct {
short unk00; Assert(unk00 == 0);
short unk02; Assert(unk02 == -1);
int unk04; Assert(unk04 == -1);
int unk08; Assert(unk08 == -1);
Vector3 position;
Vector3 rotation;
Vector3 scale;
int framesOffsetOffset <format=hex>; Assert(framesOffsetOffset == 0x184);
int unk34; Assert(unk34 == 0);
int unk38; Assert(unk38 == 0);
int fovOffset <format=hex>;
local int i <hidden=true>;
for (i = 0; i < 43; i++) {
int unused <fgcolor=cGray, hidden=true>; Assert(unused == 0);
}
char camType[12];
int framesOffset <format=hex>; Assert(framesOffset == 0x1AC);
int frameCount;
int unk100; Assert(unk100 == 3);
Vector3 rotation1;
Vector3 rotation2;
int unk11C; Assert(unk11C == 0);
} CamSetup <bgcolor=cLtGreen>;
typedef struct {
int unk00;
int unk04;
int unk08;
int unk0C;
int unk10;
int unk14;
int unk18;
int unk1C;
} FrameHeader <bgcolor=cAqua>;
typedef struct {
float defaultFov;
int fovDataOffset <format=hex>;
int fovDataCount;
int unk0C <hidden=true>; Assert(unk0C == 0);
} FovHeader <bgcolor=cLtYellow>;
typedef struct {
int frameNumber;
float frameFov;
float tanIn;
float tanOut;
} FovData <bgcolor=cYellow>;
typedef struct {
FovHeader header;
if (header.fovDataCount > 0) {
FovData data[header.fovDataCount];
}
} Fov;
typedef struct {
float unk00;
float unk04;
float unk08;
} FrameData <bgcolor=cDkAqua>;
//------------------------------------------------
Header header;
CamSetup camSetup;
FrameHeader frameHeaders[camSetup.frameCount];
Fov fov;
FrameData frameData[header.frameDataCount];