Added serializable structs for zone file, localize asset, and rawfile asset.
This commit is contained in:
parent
7cda2e1354
commit
55ea909322
17
mainwindow.h
17
mainwindow.h
@ -2,8 +2,11 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "enums.h"
|
||||
#include "rawfile.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "localize.h"
|
||||
#include "zone.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QFileDialog>
|
||||
@ -103,16 +106,6 @@ private slots:
|
||||
void ParseFFVersion(QDataStream *afastFileStream);
|
||||
|
||||
void ParseZoneFile(QByteArray aDecompressedData);
|
||||
void ParseZoneHeader(QDataStream *aZoneFileStream);
|
||||
void ParseZoneSize(QDataStream *aZoneFileStream);
|
||||
|
||||
void ParseZoneUnknownsA(QDataStream *aZoneFileStream);
|
||||
void ParseZoneUnknownsB(QDataStream *aZoneFileStream);
|
||||
void ParseZoneUnknownsC(QDataStream *aZoneFileStream);
|
||||
void ParseZoneTagCount(QDataStream *aZoneFileStream);
|
||||
void ParseZoneRecordCount(QDataStream *aZoneFileStream);
|
||||
void ParseZoneTags(QDataStream *aZoneFileStream);
|
||||
void ParseZoneIndex(QDataStream *aZoneFileStream);
|
||||
|
||||
void ParseAsset_XAnim(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_XModel(QDataStream *aZoneFileStream);
|
||||
@ -124,7 +117,7 @@ private slots:
|
||||
void ParseAsset_D3DBSP(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_Font(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_MenuFile(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_LocalString(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_Localize(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_Weapon(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_FX(QDataStream *aZoneFileStream);
|
||||
void ParseAsset_RawFile(QDataStream *aZoneFileStream);
|
||||
@ -137,7 +130,7 @@ private slots:
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
QMap<QString, int> mTypeMap;
|
||||
QMap<ASSET_TYPE, int> mTypeMap;
|
||||
QStringList mTypeOrder;
|
||||
quint32 mTagCount;
|
||||
quint32 mRecordCount;
|
||||
|
||||
34
utils.h
34
utils.h
@ -14,37 +14,37 @@ public:
|
||||
|
||||
Convert asset type string to asset desc string
|
||||
*/
|
||||
static QString AssetTypeToString(const QString aAssetType) {
|
||||
const QString cleanedType = aAssetType.toUpper();
|
||||
if (cleanedType == "04000000") { // x_anim PARTIALLY VERIFIED
|
||||
static QString AssetTypeToString(ASSET_TYPE aAssetType) {
|
||||
qDebug() << "aAssetType: " << (int)aAssetType;
|
||||
if (aAssetType == ASSET_ANIMATION) { // x_anim PARTIALLY VERIFIED
|
||||
return "ANIMATION";
|
||||
} else if (cleanedType == "05000000") { // xmodel PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_MODEL) { // xmodel PARTIALLY VERIFIED
|
||||
return "MODEL";
|
||||
} else if (cleanedType == "06000000") { // material VERIFIED
|
||||
} else if (aAssetType == ASSET_MATERIAL) { // material VERIFIED
|
||||
return "MATERIAL";
|
||||
} else if (cleanedType == "07000000") { // tech set VERIFIED
|
||||
} else if (aAssetType == ASSET_TECH_SET) { // tech set VERIFIED
|
||||
return "TECH SET";
|
||||
} else if (cleanedType == "09000000") { // loaded_sound VERIFIED
|
||||
} else if (aAssetType == ASSET_SOUND) { // loaded_sound VERIFIED
|
||||
return "SOUND";
|
||||
} else if (cleanedType == "0C000000") { // collision_map PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_COLLISION_MAP) { // collision_map PARTIALLY VERIFIED
|
||||
return "COLLISION MAP";
|
||||
} else if (cleanedType == "0D000000") { // shader PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_SHADER) { // shader PARTIALLY VERIFIED
|
||||
return "SHADER";
|
||||
} else if (cleanedType == "11000000") { // d3dbsp dump VERIFIED
|
||||
} else if (aAssetType == ASSET_D3DBSP_DUMP) { // d3dbsp dump VERIFIED
|
||||
return "D3DBSP DUMP";
|
||||
} else if (cleanedType == "14000000") { // font PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_FONT) { // font PARTIALLY VERIFIED
|
||||
return "FONT";
|
||||
} else if (cleanedType == "15000000") { // menu_file PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_MENU) { // menu_file PARTIALLY VERIFIED
|
||||
return "MENU";
|
||||
} else if (cleanedType == "17000000") { // localized string PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_LOCAL_STRING) { // localized string PARTIALLY VERIFIED
|
||||
return "LOCAL STRING";
|
||||
} else if (cleanedType == "18000000") { // weapon PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_WEAPON) { // weapon PARTIALLY VERIFIED
|
||||
return "WEAPON";
|
||||
} else if (cleanedType == "1A000000") { // fx VERIFIED
|
||||
} else if (aAssetType == ASSET_EFFECT) { // fx VERIFIED
|
||||
return "EFFECT";
|
||||
} else if (cleanedType == "20000000") { // raw_file VERIFIED
|
||||
} else if (aAssetType == ASSET_RAW_FILE) { // raw_file VERIFIED
|
||||
return "RAW FILE";
|
||||
} else if (cleanedType == "21000000") { // string_table PARTIALLY VERIFIED
|
||||
} else if (aAssetType == ASSET_STRING_TABLE) { // string_table PARTIALLY VERIFIED
|
||||
return "STRING TABLE";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user