-
Notifications
You must be signed in to change notification settings - Fork 0
/
sphinx_savegame.bt
222 lines (184 loc) · 4.04 KB
/
sphinx_savegame.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: SphinxSaveGame.bt
// Authors: jmarti856
// Version: 1.0
// Purpose: Parse Save Games files.
// Category: SaveGames
// File Mask: *
// ID Bytes:
// History:
//------------------------------------------------
//*===============================================================================================
//* DATA STRUCTS
//*===============================================================================================
typedef struct
{
uint title_hashcode <format=hex>;
uint desc_hashcode <format=hex>;
}note_entry_t;
typedef struct
{
uint hashcode <format=hex>;
uint value;
}objective_entry_t;
typedef struct
{
uint hashcode <format=hex>;;
int count_cur;
int count_max;
uint flags;
}item;
typedef struct
{
uint cur_sel_item;
uint item_count;
item items[140];
}item_cycle;
typedef struct
{
float x;
float y;
float z;
}vector_xyz;
typedef struct
{
float x;
float y;
float z;
float w;
}vector_xyzw;
typedef struct
{
uint trig_type;
uint trig_subtype;
uint saved_state_value;
vector_xyz vector_xyz_t;
}cur_level_saved_triggers;
//*===============================================================================================
//* DEFINE STRUCTS USED IN THE SAVEGAME FILE
//*===============================================================================================
//The first parameters of the header ara always little endian
LittleEndian();
typedef struct
{
uint version <format=hex>;
uint version_again <format=hex>;
uint game_time_sec;
short scarabs;
short health_ankhs;
short crowns;
char save_name_tag[16];
short padding;
uint cur_level_hashcode <format=hex>;
uint cur_level_restart_id;
int cur_level_entrance_id;
int cur_level_timer;
int game_time_sec_b;
char alignment_88h[4];
}headerStruct;
typedef struct
{
char padding[4];
note_entry_t notes[10];
uint note_count;
}notes;
typedef struct
{
uint objective_count;
objective_entry_t objective_array[1700];
}objectives_t;
typedef struct
{
uint health_thirds;
uint total_health_thirds;
}SecondaryHeaderFields;
typedef struct
{
uint filter_include;
uint filter_exclude;
uint filter_optional;
uint current_cycle;
uint used_cycle_count;
item_cycle item_cycle_t[7];
}bos_items;
typedef struct
{
uint cur_level_saved_triggers_count;
cur_level_saved_triggers saved_trigger_t[100];
}savedTriggers;
typedef struct
{
uint player_character_idx;
}playerCharacter;
typedef struct
{
uint secondMummy;
uint thirdMummy;
}triple_mummy_copies;
typedef struct
{
vector_xyzw mummyPos[2];
}triple_mummy_copies_position;
typedef struct
{
vector_xyzw mummyPos[2];
}triple_mummy_copies_rotation;
typedef struct
{
float camera_angle;
float camera_elevation;
float camera_distance;
vector_xyzw camera_position;
}camera;
typedef struct
{
uint prog_buttons[4];
}mummy_prog_buttons;
typedef struct
{
uint prog_buttons[4];
}sphinx_prog_buttons;
typedef struct
{
uint trailing_crc32;
}crc32;
//*===============================================================================================
//* READ FILE
//*===============================================================================================
SetBackColor(cAqua);
headerStruct infoheaderStruct;
SetBackColor(cRed);
notes notesSphinx;
SetBackColor(cGreen);
notes notesMummy;
SetBackColor(cLtBlue);
objectives_t Objectives;
SetBackColor(cSilver);
SecondaryHeaderFields sphinxHealth;
SetBackColor(cDkYellow);
bos_items sphinxItems;
SetBackColor(cWhite);
bos_items mummyItems;
FSeek(0xB2C4);
SetBackColor(cDkRed);
savedTriggers curMapTriggers;
SetBackColor(cDkPurple);
playerCharacter playerIndex;
FSeek(0xBC50);
SetBackColor(cLtGray);
triple_mummy_copies mummyCopies;
SetBackColor(cLtGreen);
triple_mummy_copies_position mummyPosition;
SetBackColor(cAqua);
triple_mummy_copies_rotation mummyRotation;
SetBackColor(cLtRed);
camera cameraData;
SetBackColor(cDkAqua);
mummy_prog_buttons mummyButtons;
SetBackColor(cYellow);
sphinx_prog_buttons sphinxButtons;
FSeek(0xBCD8);
SetBackColor(cGreen);
crc32 redundancyCheck;