#include <QVector>
#include <ff7tkdata_export.h>
#include <Type_FF7CHAR>
#include <Type_FF7CHOCOBO>
Go to the source code of this file.
|
#define | PACK(structure) structure Q_PACKED |
|
|
| PACK (struct FF7TKDATA_EXPORT LOVE { qint8 aeris;qint8 tifa;qint8 yuffie;qint8 barret;}) |
|
| PACK (struct FF7TKDATA_EXPORT FF7DESC { quint8 level;qint8 party[3];quint8 name[16];quint16 curHP;quint16 maxHP;quint16 curMP;quint16 maxMP;quint32 gil;quint32 time;quint8 location[32];}) |
|
| PACK (struct FF7TKDATA_EXPORT FF7XYT { qint16 x;qint16 y;quint16 t;quint8 d;}) |
|
| PACK (struct FF7TKDATA_EXPORT FF7SLOT { FF7SLOT() { clear();} static constexpr int emptyChecksum=0x4D1D;static constexpr int slotSize=0x10F4;inline bool operator==(FF7SLOT &other) { return other.toByteArray()==toByteArray();} inline bool operator!=(FF7SLOT &other) { return other.toByteArray() !=toByteArray();} bool isEmpty() { return(checksum==emptyChecksum||toByteArray()==QByteArray(slotSize, 0x00));} void clear() { setData(QByteArray(slotSize, 0x00));} QByteArray toByteArray() { return QByteArray(reinterpret_cast< const char * >(&checksum), slotSize);} void setData(const QByteArray &data) { if(data.size()==slotSize) memcpy(&checksum, data, slotSize);} static FF7SLOT fromByteArray(const QByteArray &data) { FF7SLOT s;s.setData(data);return s;} static quint16 generateChecksum(FF7SLOT ff7Slot) { return generateChecksum(ff7Slot.toByteArray());} static quint16 generateChecksum(QByteArray slotData) { QByteArray data=slotData.mid(4);int i=0;quint16 r=0xFFFF;quint16 len=data.size();quint16 pbit=0x8000;while(len--) { int t=data.at(i++);r ^=t<< 8;for(int d=0;d< 8;d++) { if(r &pbit) r=quint16(r<< 1) ^ 0x1021;else r<<=1;} r &=(1<< 16) - 1;} return((r ^ 0xFFFF) &0xFFFF);} void updateChecksum() { checksum=generateChecksum(toByteArray());} quint16 checksum;quint8 z_1[2];FF7DESC desc;quint8 colors[4][3];FF7CHAR chars[9];qint8 party[3];quint8 z_2[1];quint16 items[320];materia materias[200];materia stolen[48];quint8 z_3[32];quint32 gil;quint32 time;quint8 timer[3];quint8 z_4[13];quint16 mapid;quint16 locationid;quint8 z_5[2];FF7XYT coord;quint8 z_6[3];quint16 mprogress;quint8 z_7[1];LOVE love;quint8 z_8[17];quint16 battles;quint16 runs;quint16 menu_visible;quint16 menu_locked;quint8 z_9[16];quint8 itemsmask_1;quint8 materiacaves;quint8 z_10[14];quint8 keyitems[8];quint8 z_11[8];LOVE b_love;quint8 z_12[1];qint8 pennedchocos[4];quint8 z_13[2];quint8 u_weapon_hp[3];quint8 seenpandora;quint8 z_14[27];quint8 tut_sub;quint8 ruby_emerald;quint8 z_15[2];quint8 world_map_chocobos;quint8 world_map_vehicles;quint8 z_16[38];quint8 condorlosses;quint8 condorwins;quint8 z_17[12];quint16 condorfunds;quint8 z_18[43];quint8 bm_progress1;quint8 bm_progress2;quint8 z_19[38];quint8 f_party[3];quint8 z_20[4];quint8 aeris_church;quint8 z_21[49];quint8 bm_progress3;quint8 z_22[7];quint16 gp;quint8 z_23[4];quint16 battlepoints;quint8 z_24[6];qint8 stables;qint8 stablesoccupied;quint8 z_25[1];qint8 chocobomask;quint8 chocomated;quint8 z_26[40];quint8 yuffieforest;quint8 z_27[28];quint8 donprogress;quint8 z_28[31];quint8 turtleflyers;quint8 z_29[12];quint8 reg_yuffie;quint8 z_30[15];quint8 midgartrainflags;quint8 z_31[64];FF7CHOCOBO chocobos[4];quint8 z_32[13];quint16 BikeHighScore;quint8 SnowUnused;quint32 SnowBegFastTime;quint32 SnowExpFastTime;quint32 SnowCrazyFastTime;quint8 SnowBegScore;quint8 SnowExpScore;quint8 SnowCrazyScore;quint8 Snowtempvar;quint16 coster_2;quint16 coster_3;quint8 z_33[17];quint16 coster_1;quint8 z_34[1];quint8 battleArenaSpecialWins;quint8 z_35[1];quint8 stablechocorating[6];quint8 z_36[24];qint16 cratersaveMapId;qint16 cratersaveX;qint16 cratersaveY;qint16 cratersaveZ;quint8 z_37[64];qint8 disc;quint8 z_38[1];quint8 intbombing;quint8 z_39[3];quint16 steps;quint8 z_40[22];quint8 field_help;quint8 z_41[1];quint8 chocobonames[6][6];quint16 chocostaminas[6];quint8 reg_vinny;quint8 z_42[23];quint8 location[24];quint8 z_43[5];quint8 tut_save;quint8 z_44[14];quint8 wonsubgame;quint8 z_45[35];quint32 l_world;quint32 l_world2;quint32 wc_world;quint32 wc_world2;quint32 tc_world;quint32 tc_world2;quint32 bh_world;quint32 bh_world2;quint32 sub_world;quint32 sub_world2;quint32 durw_world;quint32 durw_world2;quint16 pole1_x;quint16 pole1_y;quint16 pole2_x;quint16 pole2_y;quint16 pole3_x;quint16 pole3_y;quint8 z_46[236];FF7CHOCOBO choco56[2];quint16 phsallowed;quint16 phsvisible;quint8 z_47[48];quint8 battlespeed;quint8 battlemspeed;quint16 options;quint8 controller_map[16];quint8 fieldmspeed;quint8 z_48[8];}) |
|
| PACK (struct FF7TKDATA_EXPORT FF7HEADFOOT { quint8 sl_header[0x0200];quint8 sl_footer[0x0D0C];}) |
|
◆ PACK
#define PACK |
( |
|
structure | ) |
structure Q_PACKED |
◆ SubContainer
◆ PACK() [1/5]
PACK |
( |
struct FF7TKDATA_EXPORT FF7DESC { quint8 level;qint8 party[3];quint8 name[16];quint16 curHP;quint16 maxHP;quint16 curMP;quint16 maxMP;quint32 gil;quint32 time;quint8 location[32];} |
| ) |
|
◆ PACK() [2/5]
PACK |
( |
struct FF7TKDATA_EXPORT FF7HEADFOOT { quint8 sl_header[0x0200];quint8 sl_footer[0x0D0C];} |
| ) |
|
◆ PACK() [3/5]
PACK |
( |
struct FF7TKDATA_EXPORT FF7SLOT { FF7SLOT() { clear();} static constexpr int emptyChecksum=0x4D1D;static constexpr int slotSize=0x10F4;inline bool operator==(FF7SLOT &other) { return other.toByteArray()==toByteArray();} inline bool operator!=(FF7SLOT &other) { return other.toByteArray() !=toByteArray();} bool isEmpty() { return(checksum==emptyChecksum||toByteArray()==QByteArray(slotSize, 0x00));} void clear() { setData(QByteArray(slotSize, 0x00));} QByteArray toByteArray() { return QByteArray(reinterpret_cast< const char * >(&checksum), slotSize);} void setData(const QByteArray &data) { if(data.size()==slotSize) memcpy(&checksum, data, slotSize);} static FF7SLOT fromByteArray(const QByteArray &data) { FF7SLOT s;s.setData(data);return s;} static quint16 generateChecksum(FF7SLOT ff7Slot) { return generateChecksum(ff7Slot.toByteArray());} static quint16 generateChecksum(QByteArray slotData) { QByteArray data=slotData.mid(4);int i=0;quint16 r=0xFFFF;quint16 len=data.size();quint16 pbit=0x8000;while(len--) { int t=data.at(i++);r ^=t<< 8;for(int d=0;d< 8;d++) { if(r &pbit) r=quint16(r<< 1) ^ 0x1021;else r<<=1;} r &=(1<< 16) - 1;} return((r ^ 0xFFFF) &0xFFFF);} void updateChecksum() { checksum=generateChecksum(toByteArray());} quint16 checksum;quint8 z_1[2];FF7DESC desc;quint8 colors[4][3];FF7CHAR chars[9];qint8 party[3];quint8 z_2[1];quint16 items[320];materia materias[200];materia stolen[48];quint8 z_3[32];quint32 gil;quint32 time;quint8 timer[3];quint8 z_4[13];quint16 mapid;quint16 locationid;quint8 z_5[2];FF7XYT coord;quint8 z_6[3];quint16 mprogress;quint8 z_7[1];LOVE love;quint8 z_8[17];quint16 battles;quint16 runs;quint16 menu_visible;quint16 menu_locked;quint8 z_9[16];quint8 itemsmask_1;quint8 materiacaves;quint8 z_10[14];quint8 keyitems[8];quint8 z_11[8];LOVE b_love;quint8 z_12[1];qint8 pennedchocos[4];quint8 z_13[2];quint8 u_weapon_hp[3];quint8 seenpandora;quint8 z_14[27];quint8 tut_sub;quint8 ruby_emerald;quint8 z_15[2];quint8 world_map_chocobos;quint8 world_map_vehicles;quint8 z_16[38];quint8 condorlosses;quint8 condorwins;quint8 z_17[12];quint16 condorfunds;quint8 z_18[43];quint8 bm_progress1;quint8 bm_progress2;quint8 z_19[38];quint8 f_party[3];quint8 z_20[4];quint8 aeris_church;quint8 z_21[49];quint8 bm_progress3;quint8 z_22[7];quint16 gp;quint8 z_23[4];quint16 battlepoints;quint8 z_24[6];qint8 stables;qint8 stablesoccupied;quint8 z_25[1];qint8 chocobomask;quint8 chocomated;quint8 z_26[40];quint8 yuffieforest;quint8 z_27[28];quint8 donprogress;quint8 z_28[31];quint8 turtleflyers;quint8 z_29[12];quint8 reg_yuffie;quint8 z_30[15];quint8 midgartrainflags;quint8 z_31[64];FF7CHOCOBO chocobos[4];quint8 z_32[13];quint16 BikeHighScore;quint8 SnowUnused;quint32 SnowBegFastTime;quint32 SnowExpFastTime;quint32 SnowCrazyFastTime;quint8 SnowBegScore;quint8 SnowExpScore;quint8 SnowCrazyScore;quint8 Snowtempvar;quint16 coster_2;quint16 coster_3;quint8 z_33[17];quint16 coster_1;quint8 z_34[1];quint8 battleArenaSpecialWins;quint8 z_35[1];quint8 stablechocorating[6];quint8 z_36[24];qint16 cratersaveMapId;qint16 cratersaveX;qint16 cratersaveY;qint16 cratersaveZ;quint8 z_37[64];qint8 disc;quint8 z_38[1];quint8 intbombing;quint8 z_39[3];quint16 steps;quint8 z_40[22];quint8 field_help;quint8 z_41[1];quint8 chocobonames[6][6];quint16 chocostaminas[6];quint8 reg_vinny;quint8 z_42[23];quint8 location[24];quint8 z_43[5];quint8 tut_save;quint8 z_44[14];quint8 wonsubgame;quint8 z_45[35];quint32 l_world;quint32 l_world2;quint32 wc_world;quint32 wc_world2;quint32 tc_world;quint32 tc_world2;quint32 bh_world;quint32 bh_world2;quint32 sub_world;quint32 sub_world2;quint32 durw_world;quint32 durw_world2;quint16 pole1_x;quint16 pole1_y;quint16 pole2_x;quint16 pole2_y;quint16 pole3_x;quint16 pole3_y;quint8 z_46[236];FF7CHOCOBO choco56[2];quint16 phsallowed;quint16 phsvisible;quint8 z_47[48];quint8 battlespeed;quint8 battlemspeed;quint16 options;quint8 controller_map[16];quint8 fieldmspeed;quint8 z_48[8];} |
| ) |
|
◆ PACK() [4/5]
PACK |
( |
struct FF7TKDATA_EXPORT FF7XYT { qint16 x;qint16 y;quint16 t;quint8 d;} |
| ) |
|
◆ PACK() [5/5]
PACK |
( |
struct FF7TKDATA_EXPORT LOVE { qint8 aeris;qint8 tifa;qint8 yuffie;qint8 barret;} |
| ) |
|