ff7tk  0.02
Toolkit for making FF7 Tools
FF7Save_Types.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2012 -2016 Chris Rizzitello <sithlord48@gmail.com> //
3 // //
4 // This file is part of FF7tk //
5 // //
6 // FF7tk is free software: you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation, either version 3 of the License, or //
9 // (at your option) any later version. //
10 // //
11 // FF7tk is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14 // GNU General Public License for more details. //
15 /****************************************************************************/
16 
17 #ifndef FF7SAVE_TYPES_H
18 #define FF7SAVE_TYPES_H
19 
20 #ifdef _MSC_VER
21 # define PACK(structure) \
22  __pragma(pack(push, 1)) \
23  structure \
24  __pragma(pack(pop))
25 #elif defined(__MINGW32__)
26  #define PACK(structure) structure __attribute__ ((gcc_struct, __packed__))
27 #else
28  #define PACK(structure) structure Q_PACKED
29 #endif
30 
31 #include <QVector>
32 #include "Type_FF7CHAR.h"
33 #include "Type_FF7CHOCOBO.h"
34 //Materia Type is included as part of FF7Char
35 /*~~~~~~~~~~~~~~~~~~~~~~~~STRUCT TYPES AND SAVE STRUCT~~~~~~~~~~~~~~~~*/
36 PACK(
37 struct LOVE
38 {
39 qint8 aeris;
40 qint8 tifa;
41 qint8 yuffie;
42 qint8 barret;
43 });
44 
50 PACK(
51 struct FF7DESC {
52  quint8 level;
53  quint8 party[3];
54  quint8 name[16];
55  quint16 curHP;
56  quint16 maxHP;
57  quint16 curMP;
58  quint16 maxMP;
59  quint32 gil;
60  quint32 time;
61  quint8 location[32];
62 });
63 PACK(
64 struct FF7XYT {// size of 7. used for coords
65  qint16 x;
66  qint16 y;
67  quint16 t;
68  quint8 d;
69 });
70 
78 PACK(
79 struct FF7SLOT {
80  quint16 checksum;
81  quint8 z_1[2];
82  FF7DESC desc;
83  quint8 colors[4][3];
84  FF7CHAR chars[9];
85  qint8 party[3];
86  quint8 z_2[1];
87  quint16 items[320];
88  materia materias[200];
89  materia stolen[48];
90  quint8 z_3[32];
91  quint32 gil;
92  quint32 time;
93  quint8 timer[3];
94  quint8 z_4[13];
95  quint16 mapid;
96  quint16 locationid;
97  quint8 z_5[2];
98  FF7XYT coord;
99  quint8 z_6[3];
100  quint16 mprogress;
101  quint8 z_7[1];
102  LOVE love;
103  quint8 z_8[17];
104  quint16 battles;
105  quint16 runs;
106  quint16 menu_visible;
107  quint16 menu_locked;
108  quint8 z_9[16];
109  quint8 itemsmask_1;
110  quint8 materiacaves;
111  quint8 z_10[14];
112  quint8 keyitems[8];
113  quint8 z_11[8];
114  LOVE b_love;
115  quint8 z_12[1];
116  qint8 pennedchocos[4];
117  quint8 z_13[2];
118  quint8 u_weapon_hp[3];
119  quint8 seenpandora;
120  quint8 z_14[27];
121  quint8 tut_sub;
122  quint8 ruby_emerald;
123  quint8 z_15[2];
124  quint8 world_map_chocobos;
125  quint8 world_map_vehicles;
126  quint8 z_16[38];
127  quint8 condorlosses;
128  quint8 condorwins;
129  quint8 z_17[12];
130  quint16 condorfunds;
131  quint8 z_18[43];
132  quint8 bm_progress1;
133  quint8 bm_progress2;
134  quint8 z_19[45];
135  quint8 aeris_church;
136  quint8 z_20[49];
137  quint8 bm_progress3;
138  quint8 z_21[7];
139  quint16 gp;
140  quint8 z_22[4];
141  quint16 battlepoints;
142  quint8 z_23[6];
143  qint8 stables;
144  qint8 stablesoccupied;
145  quint8 z_24[1];
146  qint8 chocobomask;
147  quint8 chocomated;
148  quint8 z_25[40];
149  quint8 yuffieforest;
150  quint8 z_26[28];
151  quint8 donprogress;
152  quint8 z_27[31];
153  quint8 turtleflyers;
154  quint8 z_28[12];
155  quint8 reg_yuffie;
156  quint8 z_29[15];
157  quint8 midgartrainflags;
158  quint8 z_30[64];
159  FF7CHOCOBO chocobos[4];
160  quint8 z_31[13];
161  quint16 BikeHighScore;
162  quint8 SnowUnused;
163  quint32 SnowBegFastTime;
164  quint32 SnowExpFastTime;
165  quint32 SnowCrazyFastTime; quint8 SnowBegScore;
166  quint8 SnowExpScore;
167  quint8 SnowCrazyScore;
168  quint8 Snowtempvar;
169  quint16 coster_2;
170  quint16 coster_3;
171  quint8 z_32[17];
172  quint16 coster_1;
173  quint8 z_33[3];
174  quint8 stablechocorating[6];
175  quint8 z_34[24];
176  quint16 cratersaveMapId;
177  quint16 cratersaveX;
178  quint16 cratersaveY;
179  quint16 cratersaveZ;
180  quint8 z_35[64];
181  qint8 disc;
182  quint8 z_36[1];
183  quint8 intbombing;
184  quint8 z_37[3];
185  quint16 steps;
186  quint8 z_38[22];
187  quint8 field_help;
188  quint8 z_39[1];
189  quint8 chocobonames[6][6];
190  quint16 chocostaminas[6];
191  quint8 reg_vinny;
192  quint8 z_40[23];
193  quint8 location[24];
194  quint8 z_41[5];
195  quint8 tut_save;
196  quint8 z_42[14];
197  quint8 wonsubgame;
198  quint8 z_43[35];
199  quint32 l_world;
200  quint32 l_world2;
201  quint32 wc_world;
202  quint32 wc_world2;
203  quint32 tc_world;
204  quint32 tc_world2;
205  quint32 bh_world;
206  quint32 bh_world2;
207  quint32 sub_world;
208  quint32 sub_world2;
209  quint32 durw_world;
210  quint32 durw_world2;
211  quint16 pole1_x;
212  quint16 pole1_y;
213  quint16 pole2_x;
214  quint16 pole2_y;
215  quint16 pole3_x;
216  quint16 pole3_y;
217  quint8 z_44[236];
218  FF7CHOCOBO choco56[2];
219  quint16 phsallowed;
220  quint16 phsvisible;
221  quint8 z_45[48];
222  quint8 battlespeed;
223  quint8 battlemspeed;
224  quint16 options;
225  quint8 controller_map[16];
226  quint8 fieldmspeed;
227  quint8 z_46[8];
228 });
229 
230 PACK(
231 /* FF7HEADFOOT FORMAT COMPATIBILITY (Vegeta_Ss4) v0.8.3*/
232  struct FF7HEADFOOT {
233  quint8 sl_header[0x0200]; // [0x0000] Slot Header
234  quint8 sl_footer[0x0D0C]; // [0x0000] Slot Footer
235 });
236 
237 typedef QVector< QString > SubContainer;
238 #endif // FF7SAVE_TYPES_H
a chocobo in save game
QVector< QString > SubContainer
Description of savegame used for previews.
Main FF7 Save Data Structure.
Character Info in the save game.
materia format saved in materia list or on a character
#define PACK(structure)
Definition: FF7Save_Types.h:28