Compare commits
No commits in common. "main" and "feature/from_ida" have entirely different histories.
main
...
feature/fr
10
.gitignore
vendored
10
.gitignore
vendored
@ -3,9 +3,6 @@
|
|||||||
/data/fastfiles/
|
/data/fastfiles/
|
||||||
/releases/
|
/releases/
|
||||||
|
|
||||||
.vscode/*
|
|
||||||
.qmake.stash
|
|
||||||
|
|
||||||
# Ignore Qt Creator user files
|
# Ignore Qt Creator user files
|
||||||
*.pro.user
|
*.pro.user
|
||||||
*.pro.user.*
|
*.pro.user.*
|
||||||
@ -16,10 +13,3 @@
|
|||||||
*.creator.*
|
*.creator.*
|
||||||
*.ps1
|
*.ps1
|
||||||
version.txt
|
version.txt
|
||||||
*.autosave
|
|
||||||
*.XMODEL_EXPORT
|
|
||||||
data/obj/*
|
|
||||||
libs/*/release/*
|
|
||||||
libs/*/debug/*
|
|
||||||
.git.stash
|
|
||||||
*Makefile*
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@ TEMPLATE = subdirs
|
|||||||
|
|
||||||
SUBDIRS += libs \
|
SUBDIRS += libs \
|
||||||
app \
|
app \
|
||||||
#tools \
|
tools \
|
||||||
#tests
|
tests
|
||||||
|
|
||||||
#tests.depends = libs
|
tests.depends = libs
|
||||||
app.depends = libs
|
app.depends = libs
|
||||||
#tools.depends = libs
|
tools.depends = libs
|
||||||
|
|||||||
36
ai-commit.sh
36
ai-commit.sh
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# 1. Stage everything
|
|
||||||
git add -A
|
|
||||||
|
|
||||||
# 2. Get list of staged files
|
|
||||||
FILES=$(git diff --cached --name-only)
|
|
||||||
|
|
||||||
if [ -z "$FILES" ]; then
|
|
||||||
echo "No changes to commit."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. Loop file by file
|
|
||||||
for FILE in $FILES; do
|
|
||||||
# Get diff for this file
|
|
||||||
DIFF=$(git diff --cached -- "$FILE")
|
|
||||||
|
|
||||||
if [ -z "$DIFF" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ask Ollama for a commit message describing this file change
|
|
||||||
MSG=$(echo "$DIFF" | ollama run gemma3 \
|
|
||||||
"You are a commit bot. Write a SHORT, clear, concise Git commit message for changes in file: $FILE.
|
|
||||||
Only output the commit message, nothing else.
|
|
||||||
Diff:
|
|
||||||
$DIFF")
|
|
||||||
|
|
||||||
# Commit just this file with its message
|
|
||||||
git commit -m "$MSG" -- "$FILE"
|
|
||||||
|
|
||||||
echo "✅ Committed $FILE with message:"
|
|
||||||
echo "$MSG"
|
|
||||||
done
|
|
||||||
82
app/app.pro
82
app/app.pro
@ -6,9 +6,66 @@ SUBDIRS += app
|
|||||||
|
|
||||||
CONFIG += c++17
|
CONFIG += c++17
|
||||||
|
|
||||||
SOURCES += $$files($$PWD/*.cpp)
|
SOURCES += \
|
||||||
HEADERS += $$files($$PWD/*.h)
|
aboutdialog.cpp \
|
||||||
FORMS += $$files($$PWD/*.ui)
|
ddsviewer.cpp \
|
||||||
|
fastfileviewer.cpp \
|
||||||
|
imagewidget.cpp \
|
||||||
|
iwiviewer.cpp \
|
||||||
|
localstringviewer.cpp \
|
||||||
|
main.cpp \
|
||||||
|
mainwindow.cpp \
|
||||||
|
materialviewer.cpp \
|
||||||
|
preferenceeditor.cpp \
|
||||||
|
reportissuedialog.cpp \
|
||||||
|
soundviewer.cpp \
|
||||||
|
stringtableviewer.cpp \
|
||||||
|
rumblegraphviewer.cpp \
|
||||||
|
rumblefileviewer.cpp \
|
||||||
|
techsetviewer.cpp \
|
||||||
|
xtreewidget.cpp \
|
||||||
|
xtreewidgetitem.cpp \
|
||||||
|
zonefileviewer.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
aboutdialog.h \
|
||||||
|
d3dbsp_structs.h \
|
||||||
|
ddsviewer.h \
|
||||||
|
fastfileviewer.h \
|
||||||
|
imagewidget.h \
|
||||||
|
iwiviewer.h \
|
||||||
|
localstringviewer.h \
|
||||||
|
mainwindow.h \
|
||||||
|
materialviewer.h \
|
||||||
|
preferenceeditor.h \
|
||||||
|
reportissuedialog.h \
|
||||||
|
soundviewer.h \
|
||||||
|
stringtableviewer.h \
|
||||||
|
rumblegraphviewer.h \
|
||||||
|
rumblefileviewer.h \
|
||||||
|
techsetviewer.h \
|
||||||
|
xtreewidget.h \
|
||||||
|
xtreewidgetitem.h \
|
||||||
|
zonefileviewer.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
aboutdialog.ui \
|
||||||
|
ddsviewer.ui \
|
||||||
|
fastfileviewer.ui \
|
||||||
|
imagewidget.ui \
|
||||||
|
iwiviewer.ui \
|
||||||
|
localstringviewer.ui \
|
||||||
|
mainwindow.ui \
|
||||||
|
materialviewer.ui \
|
||||||
|
modelviewer.ui \
|
||||||
|
preferenceeditor.ui \
|
||||||
|
soundviewer.ui \
|
||||||
|
stringtableviewer.ui \
|
||||||
|
rumblegraphviewer.ui \
|
||||||
|
rumblefileviewer.ui \
|
||||||
|
techsetviewer.ui \
|
||||||
|
zonefileviewer.ui \
|
||||||
|
reportissuedialog.ui
|
||||||
|
|
||||||
RESOURCES += ../data/data.qrc
|
RESOURCES += ../data/data.qrc
|
||||||
|
|
||||||
@ -17,7 +74,6 @@ LIBS += \
|
|||||||
-L$$PWD/../third_party/zlib/lib/ -lzlib \
|
-L$$PWD/../third_party/zlib/lib/ -lzlib \
|
||||||
-L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
|
-L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
|
||||||
-L$$OUT_PWD/../libs/ -lcore \
|
-L$$OUT_PWD/../libs/ -lcore \
|
||||||
-L$$OUT_PWD/../libs/ -lxassets\
|
|
||||||
-L$$OUT_PWD/../libs/ -lcompression \
|
-L$$OUT_PWD/../libs/ -lcompression \
|
||||||
-L$$OUT_PWD/../libs/ -lencryption \
|
-L$$OUT_PWD/../libs/ -lencryption \
|
||||||
-L$$OUT_PWD/../libs/ -lfastfile \
|
-L$$OUT_PWD/../libs/ -lfastfile \
|
||||||
@ -37,7 +93,7 @@ INCLUDEPATH += \
|
|||||||
$$PWD/../libs/ddsfile \
|
$$PWD/../libs/ddsfile \
|
||||||
$$PWD/../libs/ipakfile \
|
$$PWD/../libs/ipakfile \
|
||||||
$$PWD/../libs/iwifile \
|
$$PWD/../libs/iwifile \
|
||||||
$$PWD/../libs/xassets \
|
$$PWD/../libs/assets \
|
||||||
$$PWD/../libs/zonefile
|
$$PWD/../libs/zonefile
|
||||||
|
|
||||||
DEPENDPATH += \
|
DEPENDPATH += \
|
||||||
@ -51,11 +107,17 @@ DEPENDPATH += \
|
|||||||
$$PWD/../libs/ddsfile \
|
$$PWD/../libs/ddsfile \
|
||||||
$$PWD/../libs/ipakfile \
|
$$PWD/../libs/ipakfile \
|
||||||
$$PWD/../libs/iwifile \
|
$$PWD/../libs/iwifile \
|
||||||
$$PWD/../libs/xassets \
|
$$PWD/../libs/assets \
|
||||||
$$PWD/../libs/zonefile
|
$$PWD/../libs/zonefile
|
||||||
|
|
||||||
|
# Copy DLLs to Debug folder
|
||||||
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/devil_sdk/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
|
||||||
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/zlib/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
|
||||||
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/xna/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
|
||||||
|
QMAKE_POST_LINK += xcopy /Y /E /I \"$$PWD/../third_party/xbox_sdk/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
|
||||||
|
|
||||||
win32 {
|
# Copy DLLs to Release folder
|
||||||
QMAKE_POST_LINK =
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/devil_sdk/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
|
||||||
QMAKE_POST_LINK += for /D %%G in (\"$$PWD/../third_party/*/lib\") do copy /Y \"%%~G\*.dll\" \"$$OUT_PWD/$$DESTDIR/\" >NUL $$escape_expand(\\n\\t)
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/zlib/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
|
||||||
}
|
QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/xna/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
|
||||||
|
QMAKE_POST_LINK += xcopy /Y /E /I \"$$PWD/../third_party/xbox_sdk/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
|
||||||
|
|||||||
@ -14,8 +14,8 @@ DDSViewer::~DDSViewer() {
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSViewer::SetDDSFile(const DDSFile* aDDSFile) {
|
void DDSViewer::SetDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
|
||||||
mDDSFile = aDDSFile;
|
mDDSFile.swap(aDDSFile);
|
||||||
|
|
||||||
ui->label_Title->setText(mDDSFile->fileStem + ".dds");
|
ui->label_Title->setText(mDDSFile->fileStem + ".dds");
|
||||||
|
|
||||||
|
|||||||
@ -16,14 +16,14 @@ public:
|
|||||||
explicit DDSViewer(QWidget *parent = nullptr);
|
explicit DDSViewer(QWidget *parent = nullptr);
|
||||||
~DDSViewer();
|
~DDSViewer();
|
||||||
|
|
||||||
void SetDDSFile(const DDSFile *aDDSFile);
|
void SetDDSFile(std::shared_ptr<DDSFile> aDDSFile);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void MipmapIndexChanged(int aMipmapIndex);
|
void MipmapIndexChanged(int aMipmapIndex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DDSViewer *ui;
|
Ui::DDSViewer *ui;
|
||||||
const DDSFile* mDDSFile;
|
std::shared_ptr<DDSFile> mDDSFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DDSVIEWER_H
|
#endif // DDSVIEWER_H
|
||||||
|
|||||||
@ -14,8 +14,8 @@ FastFileViewer::~FastFileViewer()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FastFileViewer::SetFastFile(const FastFile* aFastFile) {
|
void FastFileViewer::SetFastFile(std::shared_ptr<FastFile> aFastFile) {
|
||||||
mFastFile = aFastFile;
|
mFastFile.swap(aFastFile);
|
||||||
|
|
||||||
ui->label_Title->setText(mFastFile->GetStem());
|
ui->label_Title->setText(mFastFile->GetStem());
|
||||||
ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
|
ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
|
||||||
|
|||||||
@ -16,10 +16,10 @@ public:
|
|||||||
explicit FastFileViewer(QWidget *parent = nullptr);
|
explicit FastFileViewer(QWidget *parent = nullptr);
|
||||||
~FastFileViewer();
|
~FastFileViewer();
|
||||||
|
|
||||||
void SetFastFile(const FastFile *aFastFile);
|
void SetFastFile(std::shared_ptr<FastFile> aFastFile);
|
||||||
private:
|
private:
|
||||||
Ui::FFViewer *ui;
|
Ui::FFViewer *ui;
|
||||||
const FastFile* mFastFile;
|
std::shared_ptr<FastFile> mFastFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FASTFILEVIEWER_H
|
#endif // FASTFILEVIEWER_H
|
||||||
|
|||||||
@ -14,8 +14,8 @@ IWIViewer::~IWIViewer()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWIViewer::SetIWIFile(const IWIFile* aIWIFile) {
|
void IWIViewer::SetIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
|
||||||
mIWIFile = aIWIFile;
|
mIWIFile.swap(aIWIFile);
|
||||||
|
|
||||||
ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
|
ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,10 @@ public:
|
|||||||
|
|
||||||
void MipmapIndexChanged(int aMipmapIndex);
|
void MipmapIndexChanged(int aMipmapIndex);
|
||||||
|
|
||||||
void SetIWIFile(const IWIFile *aIWIFile);
|
void SetIWIFile(std::shared_ptr<IWIFile> aIWIFile);
|
||||||
private:
|
private:
|
||||||
Ui::IWIViewer *ui;
|
Ui::IWIViewer *ui;
|
||||||
const IWIFile* mIWIFile;
|
std::shared_ptr<IWIFile> mIWIFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // IWIVIEWER_H
|
#endif // IWIVIEWER_H
|
||||||
|
|||||||
@ -37,21 +37,21 @@ void LocalStringViewer::SetFileNotes(const QString aFileNotes) {
|
|||||||
ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
|
ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalStringViewer::AddLocalString(XLocalizeEntry aLocalString) {
|
// void LocalStringViewer::AddLocalString(LocalizeEntry aLocalString) {
|
||||||
mLocalStrings.append(aLocalString);
|
// mLocalStrings.append(aLocalString);
|
||||||
ui->tableWidget_Strings->setRowCount(mLocalStrings.size());
|
// ui->tableWidget_Strings->setRowCount(mLocalStrings.size());
|
||||||
ui->groupBox_LocalStrViewer->setTitle(QString("Entries (%1)").arg(mLocalStrings.size()));
|
// ui->groupBox_LocalStrViewer->setTitle(QString("Entries (%1)").arg(mLocalStrings.size()));
|
||||||
QTableWidgetItem *aliasItem = new QTableWidgetItem(aLocalString.GetValue()->GetString());
|
// QTableWidgetItem *aliasItem = new QTableWidgetItem(aLocalString.alias);
|
||||||
QTableWidgetItem *stringItem = new QTableWidgetItem(aLocalString.GetName()->GetString());
|
// QTableWidgetItem *stringItem = new QTableWidgetItem(aLocalString.string);
|
||||||
ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 0, aliasItem);
|
// ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 0, aliasItem);
|
||||||
ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 1, stringItem);
|
// ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 1, stringItem);
|
||||||
}
|
// }
|
||||||
|
|
||||||
void LocalStringViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
void LocalStringViewer::SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile) {
|
||||||
mLocalStrings.clear();
|
// mLocalStrings.clear();
|
||||||
ui->tableWidget_Strings->clear();
|
// ui->tableWidget_Strings->clear();
|
||||||
|
|
||||||
ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
// ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
||||||
// for (const LocalString &localStr : aZoneFile->GetAssetMap().localStrings) {
|
// for (const LocalString &localStr : aZoneFile->GetAssetMap().localStrings) {
|
||||||
// AddLocalString(localStr);
|
// AddLocalString(localStr);
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
#ifndef LOCALSTRINGVIEWER_H
|
#ifndef LOCALSTRINGVIEWER_H
|
||||||
#define LOCALSTRINGVIEWER_H
|
#define LOCALSTRINGVIEWER_H
|
||||||
|
|
||||||
#include "xlocalizeentry.h"
|
|
||||||
#include "zonefile.h"
|
#include "zonefile.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -20,15 +19,15 @@ public:
|
|||||||
void SetVersion(quint32 aVersion);
|
void SetVersion(quint32 aVersion);
|
||||||
void SetConfigPath(const QString aConfigPath);
|
void SetConfigPath(const QString aConfigPath);
|
||||||
void SetFileNotes(const QString aFileNotes);
|
void SetFileNotes(const QString aFileNotes);
|
||||||
void AddLocalString(XLocalizeEntry aLocalString);
|
//void AddLocalString(LocalString aLocalString);
|
||||||
void SetZoneFile(const ZoneFile *aZoneFile);
|
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::LocalStringViewer *ui;
|
Ui::LocalStringViewer *ui;
|
||||||
quint32 mVersion;
|
quint32 mVersion;
|
||||||
QString mConfigPath;
|
QString mConfigPath;
|
||||||
QString mFileNotes;
|
QString mFileNotes;
|
||||||
QVector<XLocalizeEntry> mLocalStrings;
|
//QVector<LocalString> mLocalStrings;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LOCALSTRINGVIEWER_H
|
#endif // LOCALSTRINGVIEWER_H
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "qtimer.h"
|
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include "aboutdialog.h"
|
#include "aboutdialog.h"
|
||||||
@ -11,7 +10,9 @@
|
|||||||
#include "materialviewer.h"
|
#include "materialviewer.h"
|
||||||
#include "preferenceeditor.h"
|
#include "preferenceeditor.h"
|
||||||
#include "reportissuedialog.h"
|
#include "reportissuedialog.h"
|
||||||
|
#include "rumblefileviewer.h"
|
||||||
#include "rumblegraphviewer.h"
|
#include "rumblegraphviewer.h"
|
||||||
|
#include "soundviewer.h"
|
||||||
#include "stringtableviewer.h"
|
#include "stringtableviewer.h"
|
||||||
#include "techsetviewer.h"
|
#include "techsetviewer.h"
|
||||||
#include "fastfile_factory.h"
|
#include "fastfile_factory.h"
|
||||||
@ -23,11 +24,12 @@
|
|||||||
#include "ipak_structs.h"
|
#include "ipak_structs.h"
|
||||||
#include "iwiviewer.h"
|
#include "iwiviewer.h"
|
||||||
#include "localstringviewer.h"
|
#include "localstringviewer.h"
|
||||||
|
#include "imagewidget.h"
|
||||||
#include "zonefileviewer.h"
|
#include "zonefileviewer.h"
|
||||||
#include "techsetviewer.h"
|
#include "techsetviewer.h"
|
||||||
#include "logmanager.h"
|
#include "logmanager.h"
|
||||||
|
|
||||||
#include <QtMath>
|
#include <qmath.h>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: QMainWindow(parent), ui(new Ui::MainWindow) {
|
: QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||||
@ -35,8 +37,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
XAsset::SetDebug(true);
|
|
||||||
|
|
||||||
mTypeMap = QMap<QString, int>();
|
mTypeMap = QMap<QString, int>();
|
||||||
mTypeOrder = QStringList();
|
mTypeOrder = QStringList();
|
||||||
mRawFileMap = QMap<QString, QString>();
|
mRawFileMap = QMap<QString, QString>();
|
||||||
@ -159,7 +159,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
ui->tabWidget->clear();
|
ui->tabWidget->clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::RawFileSelected, this, [this](const XRawFile* rawFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::RawFileSelected, this, [this](std::shared_ptr<RawFile> rawFile, const QString aParentName) {
|
||||||
QTabWidget *rawTabWidget = new QTabWidget(this);
|
QTabWidget *rawTabWidget = new QTabWidget(this);
|
||||||
rawTabWidget->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
rawTabWidget->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
rawTabWidget->addTab(scriptEditor, "Text Editor");
|
rawTabWidget->addTab(scriptEditor, "Text Editor");
|
||||||
|
|
||||||
ui->tabWidget->addTab(rawTabWidget, fileStem);
|
ui->tabWidget->addTab(rawTabWidget, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RUMBLE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RUMBLE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
return;
|
return;
|
||||||
} else if (fileStem.contains(".shock")) {
|
} else if (fileStem.contains(".shock")) {
|
||||||
@ -216,7 +216,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
rawTabWidget->addTab(scriptEditor, "Text Editor");
|
rawTabWidget->addTab(scriptEditor, "Text Editor");
|
||||||
|
|
||||||
ui->tabWidget->addTab(rawTabWidget, fileStem);
|
ui->tabWidget->addTab(rawTabWidget, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RUMBLE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RUMBLE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
return;
|
return;
|
||||||
}*/ else {
|
}*/ else {
|
||||||
@ -224,7 +224,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(scriptEditor, fileStem);
|
ui->tabWidget->addTab(scriptEditor, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RAWFILE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RAWFILE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// ui->tabWidget->addTab(mImageWidget, fileStem);
|
// ui->tabWidget->addTab(mImageWidget, fileStem);
|
||||||
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
|
||||||
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
// Q_UNUSED(menu);
|
// Q_UNUSED(menu);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::MaterialSelected, this, [this](const XMaterial* material, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::MaterialSelected, this, [this](std::shared_ptr<Material> material, const QString aParentName) {
|
||||||
MaterialViewer *matViewer = new MaterialViewer(this);
|
MaterialViewer *matViewer = new MaterialViewer(this);
|
||||||
matViewer->setAcceptDrops(false);
|
matViewer->setAcceptDrops(false);
|
||||||
matViewer->SetMaterial(material);
|
matViewer->SetMaterial(material);
|
||||||
@ -266,11 +266,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//ui->tabWidget->addTab(matViewer, fileStem);
|
//ui->tabWidget->addTab(matViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_MATERIAL));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_MATERIAL));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::DDSFileSelected, this, [this](const DDSFile* ddsFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::DDSFileSelected, this, [this](std::shared_ptr<DDSFile> ddsFile, const QString aParentName) {
|
||||||
DDSViewer *ddsViewer = new DDSViewer(this);
|
DDSViewer *ddsViewer = new DDSViewer(this);
|
||||||
ddsViewer->setAcceptDrops(false);
|
ddsViewer->setAcceptDrops(false);
|
||||||
ddsViewer->SetDDSFile(ddsFile);
|
ddsViewer->SetDDSFile(ddsFile);
|
||||||
@ -285,11 +285,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(ddsViewer, fileStem);
|
ui->tabWidget->addTab(ddsViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::IWIFileSelected, this, [this](const IWIFile* iwiFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::IWIFileSelected, this, [this](std::shared_ptr<IWIFile> iwiFile, const QString aParentName) {
|
||||||
IWIViewer *iwiViewer = new IWIViewer(this);
|
IWIViewer *iwiViewer = new IWIViewer(this);
|
||||||
iwiViewer->setAcceptDrops(false);
|
iwiViewer->setAcceptDrops(false);
|
||||||
iwiViewer->SetIWIFile(iwiFile);
|
iwiViewer->SetIWIFile(iwiFile);
|
||||||
@ -304,11 +304,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(iwiViewer, fileStem);
|
ui->tabWidget->addTab(iwiViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::FastFileSelected, this, [this](const FastFile* aFastFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::FastFileSelected, this, [this](std::shared_ptr<FastFile> aFastFile, const QString aParentName) {
|
||||||
FastFileViewer *fastFileViewer = new FastFileViewer(this);
|
FastFileViewer *fastFileViewer = new FastFileViewer(this);
|
||||||
fastFileViewer->setAcceptDrops(false);
|
fastFileViewer->setAcceptDrops(false);
|
||||||
fastFileViewer->SetFastFile(aFastFile);
|
fastFileViewer->SetFastFile(aFastFile);
|
||||||
@ -323,11 +323,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(fastFileViewer, fileStem);
|
ui->tabWidget->addTab(fastFileViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon("FF"));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_FAST_FILE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::ZoneFileSelected, this, [this](const ZoneFile* aZoneFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::ZoneFileSelected, this, [this](std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName) {
|
||||||
ZoneFileViewer *zoneFileViewer = new ZoneFileViewer(this);
|
ZoneFileViewer *zoneFileViewer = new ZoneFileViewer(this);
|
||||||
zoneFileViewer->setAcceptDrops(false);
|
zoneFileViewer->setAcceptDrops(false);
|
||||||
zoneFileViewer->SetZoneFile(aZoneFile);
|
zoneFileViewer->SetZoneFile(aZoneFile);
|
||||||
@ -354,11 +354,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
scrollArea->setWidget(containerWidget);
|
scrollArea->setWidget(containerWidget);
|
||||||
|
|
||||||
ui->tabWidget->addTab(scrollArea, fileStem);
|
ui->tabWidget->addTab(scrollArea, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon("ZF"));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_ZONE_FILE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::LocalStringSelected, this, [this](const ZoneFile* aZoneFile, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::LocalStringSelected, this, [this](std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName) {
|
||||||
LocalStringViewer *localStrViewer = new LocalStringViewer(this);
|
LocalStringViewer *localStrViewer = new LocalStringViewer(this);
|
||||||
localStrViewer->setAcceptDrops(false);
|
localStrViewer->setAcceptDrops(false);
|
||||||
localStrViewer->SetZoneFile(aZoneFile);
|
localStrViewer->SetZoneFile(aZoneFile);
|
||||||
@ -373,17 +373,17 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(localStrViewer, fileStem);
|
ui->tabWidget->addTab(localStrViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_LOCALIZE_ENTRY));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_LOCALIZE_ENTRY));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::TechSetSelected, this, [this](const XMaterialTechniqueSet* aTechSet, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::TechSetSelected, this, [this](std::shared_ptr<MaterialTechSet> aTechSet, const QString aParentName) {
|
||||||
TechSetViewer *techSetViewer = new TechSetViewer(this);
|
TechSetViewer *techSetViewer = new TechSetViewer(this);
|
||||||
techSetViewer->setAcceptDrops(false);
|
techSetViewer->setAcceptDrops(false);
|
||||||
techSetViewer->SetTechSet(aTechSet);
|
techSetViewer->SetTechSet(aTechSet);
|
||||||
techSetViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
techSetViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
||||||
|
|
||||||
QString fileStem = aTechSet->GetName();
|
QString fileStem = aTechSet->name;
|
||||||
for (int i = 0; i < ui->tabWidget->count(); i++) {
|
for (int i = 0; i < ui->tabWidget->count(); i++) {
|
||||||
if (ui->tabWidget->tabText(i) == fileStem) {
|
if (ui->tabWidget->tabText(i) == fileStem) {
|
||||||
delete techSetViewer;
|
delete techSetViewer;
|
||||||
@ -391,18 +391,18 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(techSetViewer, aTechSet->GetName());
|
ui->tabWidget->addTab(techSetViewer, aTechSet->name);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_TECHNIQUE_SET));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_TECHNIQUE_SET));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mTreeWidget, &XTreeWidget::StrTableSelected, this, [this](const XStringTable* aStrTable, const QString aParentName) {
|
connect(mTreeWidget, &XTreeWidget::StrTableSelected, this, [this](std::shared_ptr<StringTable> aStrTable, const QString aParentName) {
|
||||||
StringTableViewer *strTableViewer = new StringTableViewer(this);
|
StringTableViewer *strTableViewer = new StringTableViewer(this);
|
||||||
strTableViewer->setAcceptDrops(false);
|
strTableViewer->setAcceptDrops(false);
|
||||||
strTableViewer->SetStringTable(aStrTable);
|
strTableViewer->SetStringTable(aStrTable);
|
||||||
strTableViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
strTableViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
|
||||||
|
|
||||||
QString fileStem = aStrTable->GetName()->GetString();
|
QString fileStem = aStrTable->name;
|
||||||
for (int i = 0; i < ui->tabWidget->count(); i++) {
|
for (int i = 0; i < ui->tabWidget->count(); i++) {
|
||||||
if (ui->tabWidget->tabText(i) == fileStem) {
|
if (ui->tabWidget->tabText(i) == fileStem) {
|
||||||
delete strTableViewer;
|
delete strTableViewer;
|
||||||
@ -411,7 +411,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->tabWidget->addTab(strTableViewer, fileStem);
|
ui->tabWidget->addTab(strTableViewer, fileStem);
|
||||||
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_STRINGTABLE));
|
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_STRINGTABLE));
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -430,7 +430,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// ui->tabWidget->addTab(soundViewer, fileStem);
|
// ui->tabWidget->addTab(soundViewer, fileStem);
|
||||||
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_SOUND));
|
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_SOUND));
|
||||||
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -533,22 +533,7 @@ bool MainWindow::OpenFastFile(const QString aFastFilePath) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FastFile* fastFile = FastFile::Open(aFastFilePath);
|
std::shared_ptr<FastFile> fastFile = FastFileFactory::Create(aFastFilePath);
|
||||||
fastFile->SetStem(fastFileStem);
|
|
||||||
mTreeWidget->AddFastFile(fastFile);
|
|
||||||
|
|
||||||
// Open zone file after decompressing ff and writing
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MainWindow::OpenFastFile(const QByteArray& aFastFileData, const QString aFastFilePath) {
|
|
||||||
const QString fastFileStem = aFastFilePath.section("/", -1, -1);
|
|
||||||
if (mTreeWidget->HasFastFile(fastFileStem)) {
|
|
||||||
LogManager::instance().addError("Can't add duplicate file!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
FastFile* fastFile = FastFile::Open(aFastFileData);
|
|
||||||
fastFile->SetStem(fastFileStem);
|
fastFile->SetStem(fastFileStem);
|
||||||
mTreeWidget->AddFastFile(fastFile);
|
mTreeWidget->AddFastFile(fastFile);
|
||||||
|
|
||||||
@ -565,11 +550,18 @@ bool MainWindow::OpenFastFile(const QByteArray& aFastFileData, const QString aFa
|
|||||||
bool MainWindow::OpenFastFile() {
|
bool MainWindow::OpenFastFile() {
|
||||||
// Open file dialog to steam apps
|
// Open file dialog to steam apps
|
||||||
const QString steamPath = "C:/Program Files (x86)/Steam/steamapps/common/Call of Duty World at War/zone/english/";
|
const QString steamPath = "C:/Program Files (x86)/Steam/steamapps/common/Call of Duty World at War/zone/english/";
|
||||||
|
const QString fastFilePath = QFileDialog::getOpenFileName(this, "Open Fast File", steamPath, "Fast File (*.ff);;All Files (*.*)");
|
||||||
QFileDialog::getOpenFileContent(tr("Fast File (*.ff);;All Files (*.*)"), [this](const QString &fileName, const QByteArray &data){
|
if (fastFilePath.isNull()) {
|
||||||
OpenFastFile(data, fileName);
|
// User pressed cancel
|
||||||
});
|
return false;
|
||||||
|
} else if (!QFile::exists(fastFilePath)) {
|
||||||
|
QMessageBox::warning(this, "Warning!", QString("%1 does not exist!.").arg(fastFilePath));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!OpenFastFile(fastFilePath)) {
|
||||||
|
qDebug() << "Failed to open Fast file!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,12 +575,12 @@ bool MainWindow::OpenZoneFile(const QString aZoneFilePath, bool fromFF) {
|
|||||||
Q_UNUSED(aZoneFilePath);
|
Q_UNUSED(aZoneFilePath);
|
||||||
Q_UNUSED(fromFF);
|
Q_UNUSED(fromFF);
|
||||||
|
|
||||||
// ZoneFile* zoneFile = ZoneFile::Create();
|
//ZoneFile zoneFile;
|
||||||
// if (!zoneFile.Load(aZoneFilePath)) {
|
//if (!zoneFile.Load(aZoneFilePath)) {
|
||||||
// qDebug() << "Error: Failed to load zone file!";
|
// qDebug() << "Error: Failed to load zone file!";
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
//}
|
||||||
// mTreeWidget->AddZoneFile(std::make_shared<ZoneFile>(zoneFile));
|
//mTreeWidget->AddZoneFile(std::make_shared<ZoneFile>(zoneFile));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -673,7 +665,7 @@ quint32 DXT3 = 0x33545844; // 'DXT3'
|
|||||||
quint32 DXT5 = 0x35545844; // 'DXT5'
|
quint32 DXT5 = 0x35545844; // 'DXT5'
|
||||||
|
|
||||||
int MainWindow::LoadFile_IWI(const QString aFilePath) {
|
int MainWindow::LoadFile_IWI(const QString aFilePath) {
|
||||||
mTreeWidget->AddIWIFile(new IWIFile(aFilePath));
|
mTreeWidget->AddIWIFile(std::make_shared<IWIFile>(aFilePath));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -684,7 +676,7 @@ int MainWindow::LoadFile_DDSFiles(const QStringList aFilePaths) {
|
|||||||
qDebug() << "Error: Invalid filename " << filePath;
|
qDebug() << "Error: Invalid filename " << filePath;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
mTreeWidget->AddDDSFile(new DDSFile(filePath));
|
mTreeWidget->AddDDSFile(std::make_shared<DDSFile>(filePath));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -716,7 +708,7 @@ int MainWindow::LoadFile_DDS(const QString aFilePath) {
|
|||||||
qDebug() << "Error: Invalid filename " << aFilePath;
|
qDebug() << "Error: Invalid filename " << aFilePath;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
mTreeWidget->AddDDSFile(new DDSFile(aFilePath));
|
mTreeWidget->AddDDSFile(std::make_shared<DDSFile>(aFilePath));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -789,7 +781,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
|
|||||||
|
|
||||||
QVector<IPAKIndexEntry> entries = QVector<IPAKIndexEntry>();
|
QVector<IPAKIndexEntry> entries = QVector<IPAKIndexEntry>();
|
||||||
QVector<IPAKSection> sections = QVector<IPAKSection>(header.sectionCount);
|
QVector<IPAKSection> sections = QVector<IPAKSection>(header.sectionCount);
|
||||||
for (quint32 i = 0; i < header.sectionCount; i++) {
|
for (uint i = 0; i < header.sectionCount; i++) {
|
||||||
IPAKSection currentSection;
|
IPAKSection currentSection;
|
||||||
stream >> currentSection;
|
stream >> currentSection;
|
||||||
sections << currentSection;
|
sections << currentSection;
|
||||||
@ -811,7 +803,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
|
|||||||
<< " - Count: " << chunkHeader.count << "\n"
|
<< " - Count: " << chunkHeader.count << "\n"
|
||||||
<< " - Offset: " << chunkHeader.offset;
|
<< " - Offset: " << chunkHeader.offset;
|
||||||
|
|
||||||
for (quint32 j = 0; j < 31; j++) {
|
for (uint j = 0; j < 31; j++) {
|
||||||
IPAKDataChunkCommand command;
|
IPAKDataChunkCommand command;
|
||||||
stream >> command;
|
stream >> command;
|
||||||
if (!command.size) { continue; }
|
if (!command.size) { continue; }
|
||||||
@ -821,7 +813,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
|
|||||||
<< " - Compressed: " << command.compressed;
|
<< " - Compressed: " << command.compressed;
|
||||||
|
|
||||||
}
|
}
|
||||||
for (quint32 j = 0; j < chunkHeader.count; j++) {
|
for (uint j = 0; j < chunkHeader.count; j++) {
|
||||||
auto command = chunkHeader.commands[j];
|
auto command = chunkHeader.commands[j];
|
||||||
|
|
||||||
qDebug() << "Reading from " << stream.device()->pos();
|
qDebug() << "Reading from " << stream.device()->pos();
|
||||||
@ -846,7 +838,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
|
|||||||
stream.skipRawData(sizeof(quint32) * (31 - chunkHeader.count));
|
stream.skipRawData(sizeof(quint32) * (31 - chunkHeader.count));
|
||||||
qDebug() << stream.device()->pos();
|
qDebug() << stream.device()->pos();
|
||||||
} else if (sectionType == "Index") {
|
} else if (sectionType == "Index") {
|
||||||
for (quint32 j = 0; j < currentSection.itemCount; j++) {
|
for (uint j = 0; j < currentSection.itemCount; j++) {
|
||||||
IPAKIndexEntry entry;
|
IPAKIndexEntry entry;
|
||||||
stream >> entry;
|
stream >> entry;
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@ -33,7 +34,6 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
bool OpenFastFile(const QString aFastFilePath);
|
bool OpenFastFile(const QString aFastFilePath);
|
||||||
bool OpenFastFile(const QByteArray& aFastFileData, const QString aFastFilePath);
|
|
||||||
bool OpenFastFile();
|
bool OpenFastFile();
|
||||||
|
|
||||||
bool OpenZoneFile(const QString aZoneFilePath, bool fromFF = false);
|
bool OpenZoneFile(const QString aZoneFilePath, bool fromFF = false);
|
||||||
|
|||||||
@ -3,27 +3,19 @@
|
|||||||
|
|
||||||
MaterialViewer::MaterialViewer(QWidget *parent)
|
MaterialViewer::MaterialViewer(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, ui(new Ui::MaterialViewer)
|
, ui(new Ui::MaterialViewer) {
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialViewer::~MaterialViewer()
|
MaterialViewer::~MaterialViewer() {
|
||||||
{
|
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ToHexStr(quint32 in)
|
QString ToHexStr(quint32 in) {
|
||||||
{
|
|
||||||
return QString("%1").arg(in, 8, 16, QChar('0')).toUpper();
|
return QString("%1").arg(in, 8, 16, QChar('0')).toUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialViewer::SetMaterial(const XMaterial* aMaterial)
|
void MaterialViewer::SetMaterial(std::shared_ptr<Material> aMaterial) {
|
||||||
{
|
|
||||||
Q_UNUSED(aMaterial);
|
|
||||||
|
|
||||||
// TODO: Fill in MaterialViewer::SetMaterial
|
|
||||||
|
|
||||||
// ui->lineEdit_NamePtr->setText(ToHexStr(aMaterial->namePtr));
|
// ui->lineEdit_NamePtr->setText(ToHexStr(aMaterial->namePtr));
|
||||||
// ui->lineEdit_Name->setText(aMaterial->name);
|
// ui->lineEdit_Name->setText(aMaterial->name);
|
||||||
// ui->lineEdit_RefPtr->setText(ToHexStr(aMaterial->refNamePtr));
|
// ui->lineEdit_RefPtr->setText(ToHexStr(aMaterial->refNamePtr));
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef MATERIALVIEWER_H
|
#ifndef MATERIALVIEWER_H
|
||||||
#define MATERIALVIEWER_H
|
#define MATERIALVIEWER_H
|
||||||
|
|
||||||
#include "xmaterial.h"
|
#include "material.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
@ -18,7 +18,7 @@ public:
|
|||||||
explicit MaterialViewer(QWidget *parent = nullptr);
|
explicit MaterialViewer(QWidget *parent = nullptr);
|
||||||
~MaterialViewer();
|
~MaterialViewer();
|
||||||
|
|
||||||
void SetMaterial(const XMaterial *aMaterial);
|
void SetMaterial(std::shared_ptr<Material> aMaterial);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MaterialViewer *ui;
|
Ui::MaterialViewer *ui;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ RumbleFileViewer::~RumbleFileViewer() {
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RumbleFileViewer::SetRumbleFile(XRawFile *aRumbleFile) {
|
void RumbleFileViewer::SetRumbleFile(std::shared_ptr<RawFile> aRumbleFile) {
|
||||||
mRumbleFile = aRumbleFile;
|
mRumbleFile = aRumbleFile;
|
||||||
|
|
||||||
ui->tableWidget_Properties->clear();
|
ui->tableWidget_Properties->clear();
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef RUMBLEFILEVIEWER_H
|
#ifndef RUMBLEFILEVIEWER_H
|
||||||
#define RUMBLEFILEVIEWER_H
|
#define RUMBLEFILEVIEWER_H
|
||||||
|
|
||||||
#include "xrawfile.h"
|
#include "rawfile.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -17,12 +17,12 @@ public:
|
|||||||
explicit RumbleFileViewer(QWidget *parent = nullptr);
|
explicit RumbleFileViewer(QWidget *parent = nullptr);
|
||||||
~RumbleFileViewer();
|
~RumbleFileViewer();
|
||||||
|
|
||||||
void SetRumbleFile(XRawFile* aRumbleFile);
|
void SetRumbleFile(std::shared_ptr<RawFile> aRumbleFile);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::RumbleFileViewer *ui;
|
Ui::RumbleFileViewer *ui;
|
||||||
quint32 mPropertyCount;
|
quint32 mPropertyCount;
|
||||||
XRawFile* mRumbleFile;
|
std::shared_ptr<RawFile> mRumbleFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RUMBLEFILEVIEWER_H
|
#endif // RUMBLEFILEVIEWER_H
|
||||||
|
|||||||
@ -19,10 +19,10 @@ RumbleGraphViewer::~RumbleGraphViewer() {
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RumbleGraphViewer::SetRumbleGraphFile(const XRawFile* aRawFile) {
|
void RumbleGraphViewer::SetRumbleGraphFile(const std::shared_ptr<RawFile> aRawFile) {
|
||||||
mRumbleGraphFile = aRawFile;
|
mRumbleGraphFile = aRawFile;
|
||||||
|
|
||||||
XDataStream rawFileStream;//(mRumbleGraphFile->contents.toLatin1());
|
QDataStream rawFileStream;//(mRumbleGraphFile->contents.toLatin1());
|
||||||
|
|
||||||
QByteArray magic(15, Qt::Uninitialized);
|
QByteArray magic(15, Qt::Uninitialized);
|
||||||
rawFileStream.readRawData(magic.data(), 15);
|
rawFileStream.readRawData(magic.data(), 15);
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
#ifndef RUMBLEGRAPHVIEWER_H
|
#ifndef RUMBLEGRAPHVIEWER_H
|
||||||
#define RUMBLEGRAPHVIEWER_H
|
#define RUMBLEGRAPHVIEWER_H
|
||||||
|
|
||||||
#include "xrawfile.h"
|
|
||||||
#include "zonefile.h"
|
#include "zonefile.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -18,13 +17,13 @@ public:
|
|||||||
~RumbleGraphViewer();
|
~RumbleGraphViewer();
|
||||||
|
|
||||||
void SetEntryCount(quint32 aCount);
|
void SetEntryCount(quint32 aCount);
|
||||||
void SetRumbleGraphFile(const XRawFile *aRawFile);
|
void SetRumbleGraphFile(const std::shared_ptr<RawFile> aRawFile);
|
||||||
void SetZoneFile(ZoneFile* aZoneFile);
|
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::RumbleGraphViewer *ui;
|
Ui::RumbleGraphViewer *ui;
|
||||||
quint32 mEntryCount;
|
quint32 mEntryCount;
|
||||||
const XRawFile* mRumbleGraphFile;
|
std::shared_ptr<RawFile> mRumbleGraphFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RUMBLEGRAPHVIEWER_H
|
#endif // RUMBLEGRAPHVIEWER_H
|
||||||
|
|||||||
@ -13,23 +13,24 @@ StringTableViewer::~StringTableViewer()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringTableViewer::SetStringTable(const XStringTable *aStringTable) {
|
void StringTableViewer::SetStringTable(std::shared_ptr<StringTable> aStringTable) {
|
||||||
ui->tableWidget_Strings->clear();
|
ui->tableWidget_Strings->clear();
|
||||||
|
|
||||||
ui->tableWidget_Strings->setRowCount(aStringTable->GetRowCount());
|
ui->tableWidget_Strings->setRowCount(aStringTable->rowCount);
|
||||||
ui->tableWidget_Strings->setColumnCount(aStringTable->GetColumnCount());
|
ui->tableWidget_Strings->setColumnCount(aStringTable->columnCount);
|
||||||
|
|
||||||
int currentIndex = 0;
|
// int currentIndex = 0;
|
||||||
for (auto value : *aStringTable->GetValues()) {
|
// for (const QString &key : aStringTable->content.keys()) {
|
||||||
|
// const QString value = aStringTable->content[key];
|
||||||
|
|
||||||
QTableWidgetItem *tableKeyItem = new QTableWidgetItem();
|
// QTableWidgetItem *tableKeyItem = new QTableWidgetItem();
|
||||||
tableKeyItem->setText(value->GetName());
|
// tableKeyItem->setText(key);
|
||||||
ui->tableWidget_Strings->setItem(currentIndex, 0, tableKeyItem);
|
// ui->tableWidget_Strings->setItem(currentIndex, 0, tableKeyItem);
|
||||||
|
|
||||||
QTableWidgetItem *tableValItem = new QTableWidgetItem();
|
// QTableWidgetItem *tableValItem = new QTableWidgetItem();
|
||||||
tableValItem->setText(value->GetString());
|
// tableValItem->setText(value);
|
||||||
ui->tableWidget_Strings->setItem(currentIndex, 1, tableValItem);
|
// ui->tableWidget_Strings->setItem(currentIndex, 1, tableValItem);
|
||||||
|
|
||||||
currentIndex++;
|
// currentIndex++;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef STRINGTABLEVIEWER_H
|
#ifndef STRINGTABLEVIEWER_H
|
||||||
#define STRINGTABLEVIEWER_H
|
#define STRINGTABLEVIEWER_H
|
||||||
|
|
||||||
#include "xstringtable.h"
|
#include "stringtable.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ public:
|
|||||||
explicit StringTableViewer(QWidget *parent = nullptr);
|
explicit StringTableViewer(QWidget *parent = nullptr);
|
||||||
~StringTableViewer();
|
~StringTableViewer();
|
||||||
|
|
||||||
void SetStringTable(const XStringTable *aStringTable);
|
void SetStringTable(std::shared_ptr<StringTable> aStringTable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::StringTableViewer *ui;
|
Ui::StringTableViewer *ui;
|
||||||
|
|||||||
@ -13,9 +13,9 @@ TechSetViewer::~TechSetViewer()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechSetViewer::SetTechSet(const XMaterialTechniqueSet* aTechSet) {
|
void TechSetViewer::SetTechSet(std::shared_ptr<MaterialTechSet> aTechSet) {
|
||||||
//ui->listWidget_Ptrs->clear();
|
//ui->listWidget_Ptrs->clear();
|
||||||
ui->label_Title->setText(aTechSet->GetName());
|
ui->label_Title->setText(aTechSet->name);
|
||||||
|
|
||||||
// int ptrIndex = 1;
|
// int ptrIndex = 1;
|
||||||
//for (auto ptr : aTechSet->pointers) {
|
//for (auto ptr : aTechSet->pointers) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef TECHSETVIEWER_H
|
#ifndef TECHSETVIEWER_H
|
||||||
#define TECHSETVIEWER_H
|
#define TECHSETVIEWER_H
|
||||||
|
|
||||||
#include "xmaterialtechniqueset.h"
|
#include "materialtechset.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ public:
|
|||||||
explicit TechSetViewer(QWidget *parent = nullptr);
|
explicit TechSetViewer(QWidget *parent = nullptr);
|
||||||
~TechSetViewer();
|
~TechSetViewer();
|
||||||
|
|
||||||
void SetTechSet(const XMaterialTechniqueSet *aTechSet);
|
void SetTechSet(std::shared_ptr<MaterialTechSet> aTechSet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::TechSetViewer *ui;
|
Ui::TechSetViewer *ui;
|
||||||
|
|||||||
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
XTreeWidget::XTreeWidget(QWidget *parent)
|
XTreeWidget::XTreeWidget(QWidget *parent)
|
||||||
: QTreeWidget(parent) {
|
: QTreeWidget(parent) {
|
||||||
mFastFiles = QMap<QString, const FastFile*>();
|
mFastFiles = QMap<QString, std::shared_ptr<FastFile>>();
|
||||||
mZoneFiles = QMap<QString, const ZoneFile*>();
|
mZoneFiles = QMap<QString, std::shared_ptr<ZoneFile>>();
|
||||||
mDDSFiles = QMap<QString, const DDSFile*>();
|
mDDSFiles = QMap<QString, std::shared_ptr<DDSFile>>();
|
||||||
mIWIFiles = QMap<QString, const IWIFile*>();
|
mIWIFiles = QMap<QString, std::shared_ptr<IWIFile>>();
|
||||||
|
|
||||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
setSelectionMode(QTreeWidget::SingleSelection);
|
setSelectionMode(QTreeWidget::SingleSelection);
|
||||||
@ -37,7 +37,7 @@ XTreeWidget::~XTreeWidget() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTreeWidget::AddFastFile(FastFile* aFastFile) {
|
void XTreeWidget::AddFastFile(std::shared_ptr<FastFile> aFastFile) {
|
||||||
XTreeWidgetItem *fastFileItem = new XTreeWidgetItem(this);
|
XTreeWidgetItem *fastFileItem = new XTreeWidgetItem(this);
|
||||||
fastFileItem->setText(0, aFastFile->GetStem());
|
fastFileItem->setText(0, aFastFile->GetStem());
|
||||||
fastFileItem->setIcon(0, Utils::CreateAssetIcon("FF"));
|
fastFileItem->setIcon(0, Utils::CreateAssetIcon("FF"));
|
||||||
@ -83,189 +83,176 @@ void XTreeWidget::AddFastFile(FastFile* aFastFile) {
|
|||||||
sortByColumn(0, Qt::AscendingOrder);
|
sortByColumn(0, Qt::AscendingOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTreeWidget::AddZoneFile(const ZoneFile* aZoneFile, XTreeWidgetItem *aParentItem) {
|
void XTreeWidget::AddZoneFile(std::shared_ptr<ZoneFile> aZoneFile, XTreeWidgetItem *aParentItem) {
|
||||||
XTreeWidgetItem *zoneItem;
|
XTreeWidgetItem *zoneItem;
|
||||||
if (aParentItem != nullptr) {
|
if (aParentItem != nullptr) {
|
||||||
zoneItem = new XTreeWidgetItem(aParentItem);
|
zoneItem = new XTreeWidgetItem(aParentItem);
|
||||||
} else {
|
} else {
|
||||||
zoneItem = new XTreeWidgetItem(this);
|
zoneItem = new XTreeWidgetItem(this);
|
||||||
}
|
}
|
||||||
zoneItem->setIcon(0, Utils::CreateAssetIcon("ZF"));
|
zoneItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_ZONE_FILE));
|
||||||
zoneItem->setText(0, aZoneFile->GetBaseStem() + ".zone");
|
zoneItem->setText(0, aZoneFile->GetBaseStem() + ".zone");
|
||||||
|
|
||||||
XAssetList assetList = aZoneFile->GetAssetList();
|
auto assetMap = aZoneFile->GetAssetMap();
|
||||||
QVector<XAsset*> localizeEntries;
|
|
||||||
for (int i = 0; i < assetList.Size(); i++)
|
if (!assetMap.localizeEntries.isEmpty()) {
|
||||||
{
|
QIcon localStrIcon = Utils::CreateAssetIcon(Utils::ASSET_LOCALIZE_ENTRY);
|
||||||
XAsset *currentAsset = assetList.GetAsset(i);
|
|
||||||
if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
|
XTreeWidgetItem *localStrRoot = new XTreeWidgetItem(zoneItem);
|
||||||
{
|
localStrRoot->setText(0, "String Files");
|
||||||
localizeEntries.append(currentAsset);
|
localStrRoot->setIcon(0, localStrIcon);
|
||||||
} else if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
|
localStrRoot->SetCategory(CATEGORY_TYPE);
|
||||||
{
|
|
||||||
localizeEntries.append(currentAsset);
|
XTreeWidgetItem *localStrItem = new XTreeWidgetItem(localStrRoot);
|
||||||
|
localStrItem->setText(0, aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
||||||
|
localStrItem->setIcon(0, localStrIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!assetMap.techSets.isEmpty()) {
|
||||||
|
QIcon techSetIcon = Utils::CreateAssetIcon(Utils::ASSET_TECHNIQUE_SET);
|
||||||
|
|
||||||
|
XTreeWidgetItem *techSetRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
techSetRoot->setText(0, "Tech Sets");
|
||||||
|
techSetRoot->setIcon(0, techSetIcon);
|
||||||
|
techSetRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
for (auto techSet : assetMap.techSets) {
|
||||||
|
XTreeWidgetItem *techSetItem = new XTreeWidgetItem(techSetRoot);
|
||||||
|
techSetItem->setText(0, techSet.name);
|
||||||
|
techSetItem->setIcon(0, techSetIcon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!assetMap.rawFiles.isEmpty()) {
|
||||||
|
QIcon rawFileIcon = Utils::CreateAssetIcon(Utils::ASSET_RAWFILE);
|
||||||
|
|
||||||
// if (!assetMap.localizeEntries.isEmpty()) {
|
XTreeWidgetItem *rawFileRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// QIcon localStrIcon = Utils::CreateAssetIcon(ASSET_TYPE_LOCALIZE_ENTRY);
|
rawFileRoot->setText(0, "Raw Files");
|
||||||
|
rawFileRoot->setIcon(0, rawFileIcon);
|
||||||
|
rawFileRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
for (auto rawFile : assetMap.rawFiles) {
|
||||||
|
if (!rawFile.length) { continue; }
|
||||||
|
|
||||||
// XTreeWidgetItem *localStrRoot = new XTreeWidgetItem(zoneItem);
|
XTreeWidgetItem *tempItem = rawFileRoot;
|
||||||
// localStrRoot->setText(0, "String Files");
|
// const QStringList pathParts = rawFile->path.split('/');
|
||||||
// localStrRoot->setIcon(0, localStrIcon);
|
// for (const QString &pathPart : pathParts) {
|
||||||
// localStrRoot->SetCategory(CATEGORY_TYPE);
|
// bool childFound = false;
|
||||||
|
// for (int i = 0; i < tempItem->childCount(); i++) {
|
||||||
|
// QTreeWidgetItem *rawChildItem = tempItem->child(i);
|
||||||
|
// XTreeWidgetItem *childItem = dynamic_cast<XTreeWidgetItem*>(rawChildItem);
|
||||||
|
// if (childItem->text(0) == pathPart) {
|
||||||
|
// tempItem = childItem;
|
||||||
|
|
||||||
// XTreeWidgetItem *localStrItem = new XTreeWidgetItem(localStrRoot);
|
// childFound = true;
|
||||||
// localStrItem->setText(0, aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
// break;
|
||||||
// localStrItem->setIcon(0, localStrIcon);
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if (!assetMap.techSets.isEmpty()) {
|
// const QString rawFileStr = pathPart;// = QString("%1 [%2-%3]").arg(pathPart).arg(rawFile.startPos).arg(rawFile.endPos);
|
||||||
// QIcon techSetIcon = Utils::CreateAssetIcon(ASSET_TYPE_TECHNIQUE_SET);
|
// if (pathPart == pathParts.last()) {
|
||||||
|
// XTreeWidgetItem *rawFileItem = new XTreeWidgetItem(tempItem);
|
||||||
|
// rawFileItem->setText(0, rawFileStr);
|
||||||
|
|
||||||
// XTreeWidgetItem *techSetRoot = new XTreeWidgetItem(zoneItem);
|
// tempItem = rawFileItem;
|
||||||
// techSetRoot->setText(0, "Tech Sets");
|
// } else if (!childFound) {
|
||||||
// techSetRoot->setIcon(0, techSetIcon);
|
// tempItem = new XTreeWidgetItem(tempItem);
|
||||||
// techSetRoot->SetCategory(CATEGORY_TYPE);
|
// tempItem->setText(0, rawFileStr);
|
||||||
|
// }
|
||||||
|
|
||||||
// for (auto techSet : assetMap.techSets) {
|
// }
|
||||||
// XTreeWidgetItem *techSetItem = new XTreeWidgetItem(techSetRoot);
|
tempItem->setIcon(0, rawFileIcon);
|
||||||
// techSetItem->setText(0, techSet.name);
|
}
|
||||||
// techSetItem->setIcon(0, techSetIcon);
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.rawFiles.isEmpty()) {
|
if (!assetMap.menuDefinitions.isEmpty()) {
|
||||||
// QIcon rawFileIcon = Utils::CreateAssetIcon(ASSET_TYPE_RAWFILE);
|
// QIcon MenuDefIcon = Utils::CreateAssetIcon(Utils::ASSET_MENU);
|
||||||
|
|
||||||
// XTreeWidgetItem *rawFileRoot = new XTreeWidgetItem(zoneItem);
|
// XTreeWidgetItem *menuRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// rawFileRoot->setText(0, "Raw Files");
|
// menuRoot->setText(0, "Menu Files");
|
||||||
// rawFileRoot->setIcon(0, rawFileIcon);
|
// menuRoot->setIcon(0, MenuDefIcon);
|
||||||
// rawFileRoot->SetCategory(CATEGORY_TYPE);
|
// menuRoot->SetCategory(CATEGORY_TYPE);
|
||||||
// for (auto rawFile : assetMap.rawFiles) {
|
|
||||||
// if (!rawFile.length) { continue; }
|
|
||||||
|
|
||||||
// XTreeWidgetItem *tempItem = rawFileRoot;
|
// int menuIndex = 1;
|
||||||
// // const QStringList pathParts = rawFile->path.split('/');
|
// for (MenuDef menuDef : assetMap.menuDefinitions) {
|
||||||
// // for (const QString &pathPart : pathParts) {
|
// XTreeWidgetItem *MenuDefRoot = new XTreeWidgetItem(menuRoot);
|
||||||
// // bool childFound = false;
|
// MenuDefRoot->setText(0, QString("Menu %1").arg(menuIndex));
|
||||||
// // for (int i = 0; i < tempItem->childCount(); i++) {
|
// for (Menu menu : menuDef.men) {
|
||||||
// // QTreeWidgetItem *rawChildItem = tempItem->child(i);
|
// XTreeWidgetItem *menuItem = new XTreeWidgetItem(MenuDefRoot);
|
||||||
// // XTreeWidgetItem *childItem = dynamic_cast<XTreeWidgetItem*>(rawChildItem);
|
// menuItem->setText(0, menu.filePath);
|
||||||
// // if (childItem->text(0) == pathPart) {
|
// menuItem->setIcon(0, MenuDefIcon);
|
||||||
// // tempItem = childItem;
|
// }
|
||||||
|
// menuIndex++;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
// // childFound = true;
|
if (!assetMap.images.isEmpty()) {
|
||||||
// // break;
|
// QIcon imageIcon = Utils::CreateAssetIcon(Utils::ASSET_IMAGE);
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
|
|
||||||
// // const QString rawFileStr = pathPart;// = QString("%1 [%2-%3]").arg(pathPart).arg(rawFile.startPos).arg(rawFile.endPos);
|
// XTreeWidgetItem *imageRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// // if (pathPart == pathParts.last()) {
|
// imageRoot->setText(0, "Images");
|
||||||
// // XTreeWidgetItem *rawFileItem = new XTreeWidgetItem(tempItem);
|
// imageRoot->setIcon(0, imageIcon);
|
||||||
// // rawFileItem->setText(0, rawFileStr);
|
// imageRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
// // tempItem = rawFileItem;
|
// for (Image image : assetMap.images) {
|
||||||
// // } else if (!childFound) {
|
// XTreeWidgetItem *imageItem = new XTreeWidgetItem(imageRoot);
|
||||||
// // tempItem = new XTreeWidgetItem(tempItem);
|
// imageItem->setText(0, image.materialName);
|
||||||
// // tempItem->setText(0, rawFileStr);
|
// imageItem->setIcon(0, imageIcon);
|
||||||
// // }
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
// // }
|
if (!assetMap.models.isEmpty()) {
|
||||||
// tempItem->setIcon(0, rawFileIcon);
|
QIcon modelIcon = Utils::CreateAssetIcon(Utils::ASSET_XMODEL);
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.menuDefinitions.isEmpty()) {
|
XTreeWidgetItem *modelsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// // QIcon MenuDefIcon = Utils::CreateAssetIcon(ASSET_TYPE_MENU);
|
modelsRoot->setText(0, "Models");
|
||||||
|
modelsRoot->setIcon(0, modelIcon);
|
||||||
|
modelsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
// // XTreeWidgetItem *menuRoot = new XTreeWidgetItem(zoneItem);
|
for (auto model: assetMap.models) {
|
||||||
// // menuRoot->setText(0, "Menu Files");
|
XTreeWidgetItem *modelItem = new XTreeWidgetItem(modelsRoot);
|
||||||
// // menuRoot->setIcon(0, MenuDefIcon);
|
modelItem->setText(0, model.name);
|
||||||
// // menuRoot->SetCategory(CATEGORY_TYPE);
|
modelItem->setIcon(0, modelIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// // int menuIndex = 1;
|
if (!assetMap.materials.isEmpty()) {
|
||||||
// // for (MenuDef menuDef : assetMap.menuDefinitions) {
|
QIcon materialIcon = Utils::CreateAssetIcon(Utils::ASSET_MATERIAL);
|
||||||
// // XTreeWidgetItem *MenuDefRoot = new XTreeWidgetItem(menuRoot);
|
|
||||||
// // MenuDefRoot->setText(0, QString("Menu %1").arg(menuIndex));
|
|
||||||
// // for (Menu menu : menuDef.men) {
|
|
||||||
// // XTreeWidgetItem *menuItem = new XTreeWidgetItem(MenuDefRoot);
|
|
||||||
// // menuItem->setText(0, menu.filePath);
|
|
||||||
// // menuItem->setIcon(0, MenuDefIcon);
|
|
||||||
// // }
|
|
||||||
// // menuIndex++;
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.images.isEmpty()) {
|
XTreeWidgetItem *materialsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// // QIcon imageIcon = Utils::CreateAssetIcon(ASSET_TYPE_IMAGE);
|
materialsRoot->setText(0, "Materials");
|
||||||
|
materialsRoot->setIcon(0, materialIcon);
|
||||||
|
materialsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
// // XTreeWidgetItem *imageRoot = new XTreeWidgetItem(zoneItem);
|
for (auto material: assetMap.materials) {
|
||||||
// // imageRoot->setText(0, "Images");
|
XTreeWidgetItem *materialItem = new XTreeWidgetItem(materialsRoot);
|
||||||
// // imageRoot->setIcon(0, imageIcon);
|
//materialItem->setText(0, material.name);
|
||||||
// // imageRoot->SetCategory(CATEGORY_TYPE);
|
materialItem->setIcon(0, materialIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// // for (Image image : assetMap.images) {
|
if (!assetMap.stringTables.isEmpty()) {
|
||||||
// // XTreeWidgetItem *imageItem = new XTreeWidgetItem(imageRoot);
|
QIcon stringTableIcon = Utils::CreateAssetIcon(Utils::ASSET_STRINGTABLE);
|
||||||
// // imageItem->setText(0, image.materialName);
|
|
||||||
// // imageItem->setIcon(0, imageIcon);
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.models.isEmpty()) {
|
XTreeWidgetItem *strTableRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// QIcon modelIcon = Utils::CreateAssetIcon(ASSET_TYPE_XMODEL);
|
strTableRoot->setText(0, "String Tables");
|
||||||
|
strTableRoot->setIcon(0, stringTableIcon);
|
||||||
|
strTableRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
// XTreeWidgetItem *modelsRoot = new XTreeWidgetItem(zoneItem);
|
for (auto strTable: assetMap.stringTables) {
|
||||||
// modelsRoot->setText(0, "Models");
|
XTreeWidgetItem *modelItem = new XTreeWidgetItem(strTableRoot);
|
||||||
// modelsRoot->setIcon(0, modelIcon);
|
modelItem->setText(0, strTable.name);
|
||||||
// modelsRoot->SetCategory(CATEGORY_TYPE);
|
modelItem->setIcon(0, stringTableIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// for (auto model: assetMap.models) {
|
if (!assetMap.sounds.isEmpty()) {
|
||||||
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(modelsRoot);
|
QIcon soundIcon = Utils::CreateAssetIcon(Utils::ASSET_SOUND);
|
||||||
// modelItem->setText(0, model.name);
|
|
||||||
// modelItem->setIcon(0, modelIcon);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.materials.isEmpty()) {
|
XTreeWidgetItem *soundsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
// QIcon materialIcon = Utils::CreateAssetIcon(ASSET_TYPE_MATERIAL);
|
soundsRoot->setText(0, "Sounds");
|
||||||
|
soundsRoot->setIcon(0, soundIcon);
|
||||||
// XTreeWidgetItem *materialsRoot = new XTreeWidgetItem(zoneItem);
|
soundsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
// materialsRoot->setText(0, "Materials");
|
}
|
||||||
// materialsRoot->setIcon(0, materialIcon);
|
|
||||||
// materialsRoot->SetCategory(CATEGORY_TYPE);
|
|
||||||
|
|
||||||
// for (auto material: assetMap.materials) {
|
|
||||||
// XTreeWidgetItem *materialItem = new XTreeWidgetItem(materialsRoot);
|
|
||||||
// //materialItem->setText(0, material.name);
|
|
||||||
// materialItem->setIcon(0, materialIcon);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.stringTables.isEmpty()) {
|
|
||||||
// QIcon stringTableIcon = Utils::CreateAssetIcon(ASSET_TYPE_STRINGTABLE);
|
|
||||||
|
|
||||||
// XTreeWidgetItem *strTableRoot = new XTreeWidgetItem(zoneItem);
|
|
||||||
// strTableRoot->setText(0, "String Tables");
|
|
||||||
// strTableRoot->setIcon(0, stringTableIcon);
|
|
||||||
// strTableRoot->SetCategory(CATEGORY_TYPE);
|
|
||||||
|
|
||||||
// for (auto strTable: assetMap.stringTables) {
|
|
||||||
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(strTableRoot);
|
|
||||||
// modelItem->setText(0, strTable.name);
|
|
||||||
// modelItem->setIcon(0, stringTableIcon);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!assetMap.sounds.isEmpty()) {
|
|
||||||
// QIcon soundIcon = Utils::CreateAssetIcon(ASSET_TYPE_SOUND);
|
|
||||||
|
|
||||||
// XTreeWidgetItem *soundsRoot = new XTreeWidgetItem(zoneItem);
|
|
||||||
// soundsRoot->setText(0, "Sounds");
|
|
||||||
// soundsRoot->setIcon(0, soundIcon);
|
|
||||||
// soundsRoot->SetCategory(CATEGORY_TYPE);
|
|
||||||
// }
|
|
||||||
|
|
||||||
mZoneFiles[aZoneFile->GetBaseStem() + ".zone"] = aZoneFile;
|
mZoneFiles[aZoneFile->GetBaseStem() + ".zone"] = aZoneFile;
|
||||||
}
|
}
|
||||||
@ -302,7 +289,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
QMenu *exportSubmenu = new QMenu("Export...", this);
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
contextMenu->addMenu(exportSubmenu);
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
const DDSFile* ddsFile = mDDSFiles[fileStem];
|
std::shared_ptr<DDSFile> ddsFile = mDDSFiles[fileStem];
|
||||||
|
|
||||||
QAction *exportIWIAction = new QAction("Export as IWI");
|
QAction *exportIWIAction = new QAction("Export as IWI");
|
||||||
exportSubmenu->addAction(exportIWIAction);
|
exportSubmenu->addAction(exportIWIAction);
|
||||||
@ -346,7 +333,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
QMenu *exportSubmenu = new QMenu("Export...", this);
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
contextMenu->addMenu(exportSubmenu);
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
const IWIFile* iwiFile = mIWIFiles[fileStem];
|
std::shared_ptr<IWIFile> iwiFile = mIWIFiles[fileStem];
|
||||||
|
|
||||||
QAction *exportDDSAction = new QAction("Export as DDS");
|
QAction *exportDDSAction = new QAction("Export as DDS");
|
||||||
exportSubmenu->addAction(exportDDSAction);
|
exportSubmenu->addAction(exportDDSAction);
|
||||||
@ -475,7 +462,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
QMenu *exportSubmenu = new QMenu("Export...", this);
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
contextMenu->addMenu(exportSubmenu);
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
const FastFile* fastFile = mFastFiles[fileStem];
|
std::shared_ptr<FastFile> fastFile = mFastFiles[fileStem];
|
||||||
|
|
||||||
QAction *exportFastFileAction = new QAction("Export Fast File");
|
QAction *exportFastFileAction = new QAction("Export Fast File");
|
||||||
exportSubmenu->addAction(exportFastFileAction);
|
exportSubmenu->addAction(exportFastFileAction);
|
||||||
@ -490,12 +477,12 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
});
|
});
|
||||||
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
||||||
exportSubmenu->addAction(exportZoneFileAction);
|
exportSubmenu->addAction(exportZoneFileAction);
|
||||||
connect(exportZoneFileAction, &QAction::triggered, this, [](bool checked) {
|
connect(exportZoneFileAction, &QAction::triggered, this, [fastFile](bool checked) {
|
||||||
Q_UNUSED(checked);
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
// const QString zoneFilePath = QFileDialog::getSaveFileName(
|
const QString zoneFilePath = QFileDialog::getSaveFileName(
|
||||||
// nullptr, "Export Zone File...", QDir::currentPath(),
|
nullptr, "Export Zone File...", QDir::currentPath(),
|
||||||
// "Zone File (*.zone);;All Files(*.*)");
|
"Zone File (*.zone);;All Files(*.*)");
|
||||||
//fastFile->GetZoneFile()->SaveZoneFile(zoneFilePath);
|
//fastFile->GetZoneFile()->SaveZoneFile(zoneFilePath);
|
||||||
});
|
});
|
||||||
} else if (activeText.contains(".zone")) {
|
} else if (activeText.contains(".zone")) {
|
||||||
@ -508,7 +495,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
QMenu *exportSubmenu = new QMenu("Export...", this);
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
contextMenu->addMenu(exportSubmenu);
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
//const ZoneFile* zoneFile = mZoneFiles[fileStem];
|
std::shared_ptr<ZoneFile> zoneFile = mZoneFiles[fileStem];
|
||||||
|
|
||||||
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
||||||
exportSubmenu->addAction(exportZoneFileAction);
|
exportSubmenu->addAction(exportZoneFileAction);
|
||||||
@ -530,7 +517,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
||||||
//const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
||||||
// QVector<LoadedSound> LoadedSounds = mZoneFiles[fileStem]->GetAssetMap().sounds;
|
// QVector<LoadedSound> LoadedSounds = mZoneFiles[fileStem]->GetAssetMap().sounds;
|
||||||
// for (LoadedSound LoadedSound : LoadedSounds) {
|
// for (LoadedSound LoadedSound : LoadedSounds) {
|
||||||
// for (Sound sound : LoadedSound.sounds) {
|
// for (Sound sound : LoadedSound.sounds) {
|
||||||
@ -577,14 +564,14 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
|||||||
}
|
}
|
||||||
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
||||||
const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
||||||
//auto zoneFile = mZoneFiles[fileStem];
|
auto zoneFile = mZoneFiles[fileStem];
|
||||||
|
|
||||||
QMenu *exportSubmenu = new QMenu("Export...", this);
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
contextMenu->addMenu(exportSubmenu);
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
QAction *exportAllWAVAction = new QAction("Export ALL as WAV Files");
|
QAction *exportAllWAVAction = new QAction("Export ALL as WAV Files");
|
||||||
exportSubmenu->addAction(exportAllWAVAction);
|
exportSubmenu->addAction(exportAllWAVAction);
|
||||||
connect(exportAllWAVAction, &QAction::triggered, this, [](bool checked) {
|
connect(exportAllWAVAction, &QAction::triggered, this, [zoneFile](bool checked) {
|
||||||
Q_UNUSED(checked);
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
// for (LoadedSound LoadedSound : zoneFile->GetAssetMap().sounds) {
|
// for (LoadedSound LoadedSound : zoneFile->GetAssetMap().sounds) {
|
||||||
@ -631,19 +618,20 @@ void XTreeWidget::ItemSelectionChanged() {
|
|||||||
|
|
||||||
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(selectedItem->parent());
|
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(selectedItem->parent());
|
||||||
|
|
||||||
/*if (selectedText.contains(".dds")) {
|
if (selectedText.contains(".dds")) {
|
||||||
if (!mDDSFiles.contains(selectedText)) {
|
if (!mDDSFiles.contains(selectedText)) {
|
||||||
LogManager::instance().addError("Could not find " + selectedText + " in DDS map!");
|
LogManager::instance().addError("Could not find " + selectedText + " in DDS map!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit DDSFileSelected(mDDSFiles[selectedText], selectedText);
|
std::shared_ptr<DDSFile> ddsFile = mDDSFiles[selectedText];
|
||||||
|
emit DDSFileSelected(ddsFile, selectedText);
|
||||||
} else if (selectedText.contains(".iwi")) {
|
} else if (selectedText.contains(".iwi")) {
|
||||||
if (!mIWIFiles.contains(selectedText)) {
|
if (!mIWIFiles.contains(selectedText)) {
|
||||||
LogManager::instance().addError("Could not find " + selectedText + " in IWI map!");
|
LogManager::instance().addError("Could not find " + selectedText + " in IWI map!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit IWIFileSelected(mIWIFiles[selectedText], selectedText);
|
emit IWIFileSelected(mIWIFiles[selectedText], selectedText);
|
||||||
} else */if (selectedText.contains(".ff")) {
|
} else if (selectedText.contains(".ff")) {
|
||||||
if (!mFastFiles.contains(selectedText)) {
|
if (!mFastFiles.contains(selectedText)) {
|
||||||
LogManager::instance().addError("Could not find " + selectedText + " in Fast File map!");
|
LogManager::instance().addError("Could not find " + selectedText + " in Fast File map!");
|
||||||
return;
|
return;
|
||||||
@ -673,14 +661,14 @@ void XTreeWidget::ItemSelectionChanged() {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} /*else if (parentItem && (parentItem->text(0) == "Tech Sets")) {
|
} else if (parentItem && (parentItem->text(0) == "Tech Sets")) {
|
||||||
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
|
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
|
||||||
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
||||||
auto techsets = mZoneFiles[fileStem]->GetAssetList().techSets;
|
auto techsets = mZoneFiles[fileStem]->GetAssetMap().techSets;
|
||||||
for (auto techset : techsets) {
|
for (auto techset : techsets) {
|
||||||
if (techset.name == selectedText) {
|
if (techset.name == selectedText) {
|
||||||
emit TechSetSelected(new MaterialTechSet(techset), fileStem);
|
emit TechSetSelected(std::make_shared<MaterialTechSet>(techset), fileStem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -744,10 +732,10 @@ void XTreeWidget::ItemSelectionChanged() {
|
|||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ZoneFile* XTreeWidget::FindZoneFile(const QString aStem) {
|
std::shared_ptr<ZoneFile> XTreeWidget::FindZoneFile(const QString aStem) {
|
||||||
foreach (auto zoneFile, mZoneFiles) {
|
foreach (auto zoneFile, mZoneFiles) {
|
||||||
if (zoneFile->GetStem() == aStem) {
|
if (zoneFile->GetStem() == aStem) {
|
||||||
return zoneFile;
|
return zoneFile;
|
||||||
@ -756,7 +744,7 @@ const ZoneFile* XTreeWidget::FindZoneFile(const QString aStem) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FastFile *XTreeWidget::FindFastFile(const QString aStem) {
|
std::shared_ptr<FastFile> XTreeWidget::FindFastFile(const QString aStem) {
|
||||||
foreach (auto fastFile, mFastFiles) {
|
foreach (auto fastFile, mFastFiles) {
|
||||||
if (fastFile->GetStem() == aStem) {
|
if (fastFile->GetStem() == aStem) {
|
||||||
return fastFile;
|
return fastFile;
|
||||||
@ -773,7 +761,7 @@ bool XTreeWidget::HasFastFile(const QString aStem) {
|
|||||||
return FindFastFile(aStem) != nullptr;
|
return FindFastFile(aStem) != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTreeWidget::AddIWIFile(IWIFile* aIWIFile) {
|
void XTreeWidget::AddIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
|
||||||
const QString iwiFileName = QString(aIWIFile->fileStem + ".iwi");
|
const QString iwiFileName = QString(aIWIFile->fileStem + ".iwi");
|
||||||
|
|
||||||
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
@ -784,12 +772,12 @@ void XTreeWidget::AddIWIFile(IWIFile* aIWIFile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
XTreeWidgetItem *iwiItem = new XTreeWidgetItem(this);
|
XTreeWidgetItem *iwiItem = new XTreeWidgetItem(this);
|
||||||
iwiItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
iwiItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
|
||||||
iwiItem->setText(0, iwiFileName);
|
iwiItem->setText(0, iwiFileName);
|
||||||
mIWIFiles[aIWIFile->fileStem.section(".", 0, 0)] = aIWIFile;
|
mIWIFiles[aIWIFile->fileStem.section(".", 0, 0)] = aIWIFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTreeWidget::AddDDSFile(DDSFile* aDDSFile) {
|
void XTreeWidget::AddDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
|
||||||
const QString ddsFileName = QString(aDDSFile->fileStem + ".dds");
|
const QString ddsFileName = QString(aDDSFile->fileStem + ".dds");
|
||||||
|
|
||||||
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
@ -800,7 +788,7 @@ void XTreeWidget::AddDDSFile(DDSFile* aDDSFile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
XTreeWidgetItem *ddsItem = new XTreeWidgetItem(this);
|
XTreeWidgetItem *ddsItem = new XTreeWidgetItem(this);
|
||||||
ddsItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
ddsItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
|
||||||
ddsItem->setText(0, ddsFileName);
|
ddsItem->setText(0, ddsFileName);
|
||||||
mDDSFiles[aDDSFile->fileStem.section(".", 0, 0)] = aDDSFile;
|
mDDSFiles[aDDSFile->fileStem.section(".", 0, 0)] = aDDSFile;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,13 +5,12 @@
|
|||||||
#include "ddsfile.h"
|
#include "ddsfile.h"
|
||||||
#include "iwifile.h"
|
#include "iwifile.h"
|
||||||
#include "fastfile.h"
|
#include "fastfile.h"
|
||||||
#include "xloadedsound.h"
|
|
||||||
#include "xtreewidgetitem.h"
|
#include "xtreewidgetitem.h"
|
||||||
#include "zonefile.h"
|
#include "zonefile.h"
|
||||||
#include "xrawfile.h"
|
#include "rawfile.h"
|
||||||
#include "xgfximage.h"
|
#include "gfximage.h"
|
||||||
#include "xstringtable.h"
|
#include "stringtable.h"
|
||||||
#include "xmenudef.h"
|
#include "menudef.h"
|
||||||
|
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@ -23,31 +22,31 @@ public:
|
|||||||
explicit XTreeWidget(QWidget *parent = nullptr);
|
explicit XTreeWidget(QWidget *parent = nullptr);
|
||||||
~XTreeWidget();
|
~XTreeWidget();
|
||||||
|
|
||||||
void AddFastFile(FastFile* aFastFile);
|
void AddFastFile(std::shared_ptr<FastFile> aFastFile);
|
||||||
void AddZoneFile(const ZoneFile *aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
|
void AddZoneFile(std::shared_ptr<ZoneFile> aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
|
||||||
void AddIWIFile(IWIFile* aIWIFile);
|
void AddIWIFile(std::shared_ptr<IWIFile> aIWIFile);
|
||||||
void AddDDSFile(DDSFile* aDDSFile);
|
void AddDDSFile(std::shared_ptr<DDSFile> aDDSFile);
|
||||||
|
|
||||||
const ZoneFile *FindZoneFile(const QString aStem);
|
std::shared_ptr<ZoneFile> FindZoneFile(const QString aStem);
|
||||||
const FastFile* FindFastFile(const QString aStem);
|
std::shared_ptr<FastFile> FindFastFile(const QString aStem);
|
||||||
|
|
||||||
bool HasZoneFile(const QString aStem);
|
bool HasZoneFile(const QString aStem);
|
||||||
bool HasFastFile(const QString aStem);
|
bool HasFastFile(const QString aStem);
|
||||||
|
|
||||||
void CloseFastFile(const QString aFFName);
|
void CloseFastFile(const QString aFFName);
|
||||||
signals:
|
signals:
|
||||||
void DDSFileSelected(const DDSFile* aDDSFile, const QString aParentName);
|
void DDSFileSelected(std::shared_ptr<DDSFile> aDDSFile, const QString aParentName);
|
||||||
void IWIFileSelected(const IWIFile* aIWIFile, const QString aParentName);
|
void IWIFileSelected(std::shared_ptr<IWIFile> aIWIFile, const QString aParentName);
|
||||||
void FastFileSelected(const FastFile* aFastFile, const QString aParentName);
|
void FastFileSelected(std::shared_ptr<FastFile> aFastFile, const QString aParentName);
|
||||||
void ZoneFileSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
void ZoneFileSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
|
||||||
void LocalStringSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
void LocalStringSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
|
||||||
void RawFileSelected(const XRawFile* aRawFile, const QString aParentName);
|
void RawFileSelected(std::shared_ptr<RawFile> aRawFile, const QString aParentName);
|
||||||
void ImageSelected(const XGfxImage* aImage, const QString aParentName);
|
void ImageSelected(std::shared_ptr<GfxImage> aImage, const QString aParentName);
|
||||||
void TechSetSelected(const XMaterialTechniqueSet* aZoneFile, const QString aParentName);
|
void TechSetSelected(std::shared_ptr<MaterialTechSet> aZoneFile, const QString aParentName);
|
||||||
void StrTableSelected(const XStringTable* aStrTable, const QString aParentName);
|
void StrTableSelected(std::shared_ptr<StringTable> aStrTable, const QString aParentName);
|
||||||
void MenuSelected(const XMenuDef* aMenu, const QString aParentName);
|
void MenuSelected(std::shared_ptr<MenuDef> aMenu, const QString aParentName);
|
||||||
void SoundSelected(const XLoadedSound* aSound, const QString aParentName);
|
void SoundSelected(std::shared_ptr<LoadedSound> aSound, const QString aParentName);
|
||||||
void MaterialSelected(const XMaterial* aMaterial, const QString aParentName);
|
void MaterialSelected(std::shared_ptr<Material> aMaterial, const QString aParentName);
|
||||||
void ItemSelected(const QString itemText);
|
void ItemSelected(const QString itemText);
|
||||||
|
|
||||||
void ItemClosed(const QString itemText);
|
void ItemClosed(const QString itemText);
|
||||||
@ -58,10 +57,10 @@ protected:
|
|||||||
void PrepareContextMenu(const QPoint &pos);
|
void PrepareContextMenu(const QPoint &pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QString, const FastFile*> mFastFiles;
|
QMap<QString, std::shared_ptr<FastFile>> mFastFiles;
|
||||||
QMap<QString, const ZoneFile*> mZoneFiles;
|
QMap<QString, std::shared_ptr<ZoneFile>> mZoneFiles;
|
||||||
QMap<QString, const DDSFile*> mDDSFiles;
|
QMap<QString, std::shared_ptr<DDSFile>> mDDSFiles;
|
||||||
QMap<QString, const IWIFile*> mIWIFiles;
|
QMap<QString, std::shared_ptr<IWIFile>> mIWIFiles;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // XTREEWIDGET_H
|
#endif // XTREEWIDGET_H
|
||||||
|
|||||||
@ -69,7 +69,7 @@ void ZoneFileViewer::SortTags(const QString &aSearchText) {
|
|||||||
ui->listWidget_Tags->addItems(sortedTags);
|
ui->listWidget_Tags->addItems(sortedTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneFileViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
void ZoneFileViewer::SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile) {
|
||||||
mZoneFile = aZoneFile;
|
mZoneFile = aZoneFile;
|
||||||
|
|
||||||
ui->tableWidget_RecordCounts->clearContents();
|
ui->tableWidget_RecordCounts->clearContents();
|
||||||
@ -88,36 +88,37 @@ void ZoneFileViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
|||||||
ui->groupBox_Tags->show();
|
ui->groupBox_Tags->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<XAssetType, int> recordCounts = QMap<XAssetType, int>();
|
QMap<QString, int> recordCounts = QMap<QString, int>();
|
||||||
QVector<QPair<XAssetType, int>> assetOccurances = QVector<QPair<XAssetType, int>>();
|
QVector<QPair<QString, int>> assetOccurances = QVector<QPair<QString, int>>();
|
||||||
for (XAssetType type : mZoneFile->GetTypes()) {
|
for (const QString &record : mZoneFile->GetRecords()) {
|
||||||
if (!recordCounts.contains(type)) {
|
if (!recordCounts.contains(record)) {
|
||||||
recordCounts[type] = 0;
|
recordCounts[record] = 0;
|
||||||
}
|
}
|
||||||
recordCounts[type]++;
|
recordCounts[record]++;
|
||||||
|
|
||||||
if (!assetOccurances.isEmpty() && assetOccurances.last().first == type) {
|
if (!assetOccurances.isEmpty() && assetOccurances.last().first == record) {
|
||||||
assetOccurances.last().second++;
|
assetOccurances.last().second++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<XAssetType, int> assetOccurance(type, 1);
|
QPair<QString, int> assetOccurance(record, 1);
|
||||||
assetOccurances << assetOccurance;
|
assetOccurances << assetOccurance;
|
||||||
}
|
}
|
||||||
ui->tableWidget_RecordOrder->setRowCount(assetOccurances.size());
|
ui->tableWidget_RecordOrder->setRowCount(assetOccurances.size());
|
||||||
|
|
||||||
int assetIndex = 0;
|
int assetIndex = 0;
|
||||||
foreach (auto assetOccurance, assetOccurances) {
|
foreach (auto assetOccurance, assetOccurances) {
|
||||||
XAssetType assetType = assetOccurance.first;
|
const QString record = assetOccurance.first;
|
||||||
|
Utils::AssetType assetType = mZoneFile->AssetStrToEnum(record);
|
||||||
int assetCount = assetOccurance.second;
|
int assetCount = assetOccurance.second;
|
||||||
|
|
||||||
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
||||||
if (assetIcon.isNull()) {
|
if (assetIcon.isNull()) {
|
||||||
qDebug() << "Icon is null for record: " << assetType;
|
qDebug() << "Icon is null for record: " << record;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
|
QTableWidgetItem *recordItem = new QTableWidgetItem(record.toUpper());
|
||||||
QTableWidgetItem *recordStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
|
QTableWidgetItem *recordStrItem = new QTableWidgetItem(Utils::AssetTypeToStr(assetType));
|
||||||
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(assetCount));
|
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(assetCount));
|
||||||
recordItem->setIcon(assetIcon);
|
recordItem->setIcon(assetIcon);
|
||||||
|
|
||||||
@ -129,18 +130,19 @@ void ZoneFileViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int recordIndex = 0;
|
int recordIndex = 0;
|
||||||
for (XAssetType assetType : recordCounts.keys()) {
|
for (const QString &record : recordCounts.keys()) {
|
||||||
int recordCount = recordCounts[assetType];
|
int recordCount = recordCounts[record];
|
||||||
|
|
||||||
|
Utils::AssetType assetType = mZoneFile->AssetStrToEnum(record);
|
||||||
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
||||||
if (assetIcon.isNull()) {
|
if (assetIcon.isNull()) {
|
||||||
qDebug() << "Icon is null for record: " << assetType;
|
qDebug() << "Icon is null for record: " << record;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->tableWidget_RecordCounts->setRowCount(recordIndex + 1);
|
ui->tableWidget_RecordCounts->setRowCount(recordIndex + 1);
|
||||||
|
|
||||||
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
|
QTableWidgetItem *recordItem = new QTableWidgetItem(record.toUpper());
|
||||||
QTableWidgetItem *recordCountStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
|
QTableWidgetItem *recordCountStrItem = new QTableWidgetItem(Utils::AssetTypeToStr(assetType));
|
||||||
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(recordCount));
|
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(recordCount));
|
||||||
recordItem->setIcon(assetIcon);
|
recordItem->setIcon(assetIcon);
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public:
|
|||||||
explicit ZoneFileViewer(QWidget *parent = nullptr);
|
explicit ZoneFileViewer(QWidget *parent = nullptr);
|
||||||
~ZoneFileViewer();
|
~ZoneFileViewer();
|
||||||
|
|
||||||
void SetZoneFile(const ZoneFile *aZoneFile);
|
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void SortTags(const QString &aSearchText);
|
void SortTags(const QString &aSearchText);
|
||||||
@ -27,7 +27,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ZoneFileViewer *ui;
|
Ui::ZoneFileViewer *ui;
|
||||||
const ZoneFile* mZoneFile;
|
std::shared_ptr<ZoneFile> mZoneFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ZONEFILEVIEWER_H
|
#endif // ZONEFILEVIEWER_H
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
<file>icons/Icon_Editor.png</file>
|
<file>icons/Icon_Editor.png</file>
|
||||||
<file>icons/Icon_Views.png</file>
|
<file>icons/Icon_Views.png</file>
|
||||||
<file>icons/Icon_Tree.png</file>
|
<file>icons/Icon_Tree.png</file>
|
||||||
|
<file>icons/Icon_Copy.png</file>
|
||||||
<file>icons/Icon_Cut.png</file>
|
<file>icons/Icon_Cut.png</file>
|
||||||
<file>icons/Icon_Find.png</file>
|
<file>icons/Icon_Find.png</file>
|
||||||
<file>icons/Icon_NewFile.png</file>
|
<file>icons/Icon_NewFile.png</file>
|
||||||
|
|||||||
BIN
data/icons/Icon_Copy.png
Normal file
BIN
data/icons/Icon_Copy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 316 B |
11
libs/assets/360/assets_cod10_360.cpp
Normal file
11
libs/assets/360/assets_cod10_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod10_360.h"
|
||||||
|
|
||||||
|
Assets_COD10_360::Assets_COD10_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD10_360::~Assets_COD10_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod10_360.h
Normal file
18
libs/assets/360/assets_cod10_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD10_360_H
|
||||||
|
#define ASSETS_COD10_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD10_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD10_360();
|
||||||
|
~Assets_COD10_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD10_360_H
|
||||||
11
libs/assets/360/assets_cod11_360.cpp
Normal file
11
libs/assets/360/assets_cod11_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod11_360.h"
|
||||||
|
|
||||||
|
Assets_COD11_360::Assets_COD11_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD11_360::~Assets_COD11_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod11_360.h
Normal file
18
libs/assets/360/assets_cod11_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD11_360_H
|
||||||
|
#define ASSETS_COD11_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD11_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD11_360();
|
||||||
|
~Assets_COD11_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD11_360_H
|
||||||
11
libs/assets/360/assets_cod12_360.cpp
Normal file
11
libs/assets/360/assets_cod12_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod12_360.h"
|
||||||
|
|
||||||
|
Assets_COD12_360::Assets_COD12_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD12_360::~Assets_COD12_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod12_360.h
Normal file
18
libs/assets/360/assets_cod12_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD12_360_H
|
||||||
|
#define ASSETS_COD12_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD12_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD12_360();
|
||||||
|
~Assets_COD12_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD12_360_H
|
||||||
11
libs/assets/360/assets_cod2_360.cpp
Normal file
11
libs/assets/360/assets_cod2_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod2_360.h"
|
||||||
|
|
||||||
|
Assets_COD2_360::Assets_COD2_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD2_360::~Assets_COD2_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod2_360.h
Normal file
18
libs/assets/360/assets_cod2_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD2_360_H
|
||||||
|
#define ASSETS_COD2_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD2_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD2_360();
|
||||||
|
~Assets_COD2_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD2_360_H
|
||||||
12
libs/assets/360/assets_cod4_360.cpp
Normal file
12
libs/assets/360/assets_cod4_360.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include "assets_cod4_360.h"
|
||||||
|
|
||||||
|
Assets_COD4_360::Assets_COD4_360(QObject *parent)
|
||||||
|
: Assets(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD4_360::~Assets_COD4_360() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
15
libs/assets/360/assets_cod4_360.h
Normal file
15
libs/assets/360/assets_cod4_360.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef ASSETS_COD4_360_H
|
||||||
|
#define ASSETS_COD4_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD4_360 : public Assets
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Assets_COD4_360(QObject *parent = nullptr);
|
||||||
|
~Assets_COD4_360();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD4_360_H
|
||||||
11
libs/assets/360/assets_cod5_360.cpp
Normal file
11
libs/assets/360/assets_cod5_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod5_360.h"
|
||||||
|
|
||||||
|
Assets_COD5_360::Assets_COD5_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD5_360::~Assets_COD5_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod5_360.h
Normal file
18
libs/assets/360/assets_cod5_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD5_360_H
|
||||||
|
#define ASSETS_COD5_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD5_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD5_360();
|
||||||
|
~Assets_COD5_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD5_360_H
|
||||||
11
libs/assets/360/assets_cod6_360.cpp
Normal file
11
libs/assets/360/assets_cod6_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod6_360.h"
|
||||||
|
|
||||||
|
Assets_COD6_360::Assets_COD6_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD6_360::~Assets_COD6_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod6_360.h
Normal file
18
libs/assets/360/assets_cod6_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD6_360_H
|
||||||
|
#define ASSETS_COD6_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD6_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD6_360();
|
||||||
|
~Assets_COD6_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD6_360_H
|
||||||
11
libs/assets/360/assets_cod7_360.cpp
Normal file
11
libs/assets/360/assets_cod7_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod7_360.h"
|
||||||
|
|
||||||
|
Assets_COD7_360::Assets_COD7_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD7_360::~Assets_COD7_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod7_360.h
Normal file
18
libs/assets/360/assets_cod7_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD7_360_H
|
||||||
|
#define ASSETS_COD7_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD7_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD7_360();
|
||||||
|
~Assets_COD7_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD7_360_H
|
||||||
11
libs/assets/360/assets_cod8_360.cpp
Normal file
11
libs/assets/360/assets_cod8_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod8_360.h"
|
||||||
|
|
||||||
|
Assets_COD8_360::Assets_COD8_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD8_360::~Assets_COD8_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod8_360.h
Normal file
18
libs/assets/360/assets_cod8_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD8_360_H
|
||||||
|
#define ASSETS_COD8_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD8_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD8_360();
|
||||||
|
~Assets_COD8_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD8_360_H
|
||||||
11
libs/assets/360/assets_cod9_360.cpp
Normal file
11
libs/assets/360/assets_cod9_360.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod9_360.h"
|
||||||
|
|
||||||
|
Assets_COD9_360::Assets_COD9_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD9_360::~Assets_COD9_360()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/360/assets_cod9_360.h
Normal file
18
libs/assets/360/assets_cod9_360.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD9_360_H
|
||||||
|
#define ASSETS_COD9_360_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD9_360 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD9_360();
|
||||||
|
~Assets_COD9_360();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD9_360_H
|
||||||
11
libs/assets/PC/assets_cod10_pc.cpp
Normal file
11
libs/assets/PC/assets_cod10_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod10_pc.h"
|
||||||
|
|
||||||
|
Assets_COD10_PC::Assets_COD10_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD10_PC::~Assets_COD10_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod10_pc.h
Normal file
18
libs/assets/PC/assets_cod10_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD10_PC_H
|
||||||
|
#define ASSETS_COD10_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD10_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD10_PC();
|
||||||
|
~Assets_COD10_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD10_PC_H
|
||||||
11
libs/assets/PC/assets_cod11_pc.cpp
Normal file
11
libs/assets/PC/assets_cod11_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod11_pc.h"
|
||||||
|
|
||||||
|
Assets_COD11_PC::Assets_COD11_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD11_PC::~Assets_COD11_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod11_pc.h
Normal file
18
libs/assets/PC/assets_cod11_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD11_PC_H
|
||||||
|
#define ASSETS_COD11_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD11_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD11_PC();
|
||||||
|
~Assets_COD11_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD11_PC_H
|
||||||
11
libs/assets/PC/assets_cod12_pc.cpp
Normal file
11
libs/assets/PC/assets_cod12_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod12_pc.h"
|
||||||
|
|
||||||
|
Assets_COD12_PC::Assets_COD12_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD12_PC::~Assets_COD12_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod12_pc.h
Normal file
18
libs/assets/PC/assets_cod12_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD12_PC_H
|
||||||
|
#define ASSETS_COD12_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD12_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD12_PC();
|
||||||
|
~Assets_COD12_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD12_PC_H
|
||||||
11
libs/assets/PC/assets_cod4_pc.cpp
Normal file
11
libs/assets/PC/assets_cod4_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod4_pc.h"
|
||||||
|
|
||||||
|
Assets_COD4_PC::Assets_COD4_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD4_PC::~Assets_COD4_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod4_pc.h
Normal file
18
libs/assets/PC/assets_cod4_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD4_PC_H
|
||||||
|
#define ASSETS_COD4_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD4_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD4_PC();
|
||||||
|
~Assets_COD4_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD4_PC_H
|
||||||
11
libs/assets/PC/assets_cod5_pc.cpp
Normal file
11
libs/assets/PC/assets_cod5_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod5_pc.h"
|
||||||
|
|
||||||
|
Assets_COD5_PC::Assets_COD5_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD5_PC::~Assets_COD5_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod5_pc.h
Normal file
18
libs/assets/PC/assets_cod5_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD5_PC_H
|
||||||
|
#define ASSETS_COD5_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD5_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD5_PC();
|
||||||
|
~Assets_COD5_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD5_PC_H
|
||||||
11
libs/assets/PC/assets_cod6_pc.cpp
Normal file
11
libs/assets/PC/assets_cod6_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod6_pc.h"
|
||||||
|
|
||||||
|
Assets_COD6_PC::Assets_COD6_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD6_PC::~Assets_COD6_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod6_pc.h
Normal file
18
libs/assets/PC/assets_cod6_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD6_PC_H
|
||||||
|
#define ASSETS_COD6_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD6_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD6_PC();
|
||||||
|
~Assets_COD6_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD6_PC_H
|
||||||
11
libs/assets/PC/assets_cod7_pc.cpp
Normal file
11
libs/assets/PC/assets_cod7_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod7_pc.h"
|
||||||
|
|
||||||
|
Assets_COD7_PC::Assets_COD7_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD7_PC::~Assets_COD7_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod7_pc.h
Normal file
18
libs/assets/PC/assets_cod7_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD7_PC_H
|
||||||
|
#define ASSETS_COD7_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD7_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD7_PC();
|
||||||
|
~Assets_COD7_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD7_PC_H
|
||||||
11
libs/assets/PC/assets_cod8_pc.cpp
Normal file
11
libs/assets/PC/assets_cod8_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod8_pc.h"
|
||||||
|
|
||||||
|
Assets_COD8_PC::Assets_COD8_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD8_PC::~Assets_COD8_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod8_pc.h
Normal file
18
libs/assets/PC/assets_cod8_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD8_PC_H
|
||||||
|
#define ASSETS_COD8_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD8_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD8_PC();
|
||||||
|
~Assets_COD8_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD8_PC_H
|
||||||
11
libs/assets/PC/assets_cod9_pc.cpp
Normal file
11
libs/assets/PC/assets_cod9_pc.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod9_pc.h"
|
||||||
|
|
||||||
|
Assets_COD9_PC::Assets_COD9_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD9_PC::~Assets_COD9_PC()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PC/assets_cod9_pc.h
Normal file
18
libs/assets/PC/assets_cod9_pc.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD9_PC_H
|
||||||
|
#define ASSETS_COD9_PC_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD9_PC : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD9_PC();
|
||||||
|
~Assets_COD9_PC();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD9_PC_H
|
||||||
11
libs/assets/PS3/assets_cod10_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod10_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod10_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD10_PS3::Assets_COD10_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD10_PS3::~Assets_COD10_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod10_ps3.h
Normal file
18
libs/assets/PS3/assets_cod10_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD10_PS3_H
|
||||||
|
#define ASSETS_COD10_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD10_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD10_PS3();
|
||||||
|
~Assets_COD10_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD10_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod11_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod11_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod11_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD11_PS3::Assets_COD11_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD11_PS3::~Assets_COD11_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod11_ps3.h
Normal file
18
libs/assets/PS3/assets_cod11_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD11_PS3_H
|
||||||
|
#define ASSETS_COD11_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD11_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD11_PS3();
|
||||||
|
~Assets_COD11_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD11_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod12_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod12_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod12_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD12_PS3::Assets_COD12_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD12_PS3::~Assets_COD12_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod12_ps3.h
Normal file
18
libs/assets/PS3/assets_cod12_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD12_PS3_H
|
||||||
|
#define ASSETS_COD12_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD12_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD12_PS3();
|
||||||
|
~Assets_COD12_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD12_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod4_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod4_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod4_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD4_PS3::Assets_COD4_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD4_PS3::~Assets_COD4_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod4_ps3.h
Normal file
18
libs/assets/PS3/assets_cod4_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD4_PS3_H
|
||||||
|
#define ASSETS_COD4_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD4_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD4_PS3();
|
||||||
|
~Assets_COD4_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD4_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod5_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod5_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod5_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD5_PS3::Assets_COD5_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD5_PS3::~Assets_COD5_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod5_ps3.h
Normal file
18
libs/assets/PS3/assets_cod5_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD5_PS3_H
|
||||||
|
#define ASSETS_COD5_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD5_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD5_PS3();
|
||||||
|
~Assets_COD5_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD5_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod6_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod6_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod6_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD6_PS3::Assets_COD6_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD6_PS3::~Assets_COD6_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod6_ps3.h
Normal file
18
libs/assets/PS3/assets_cod6_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD6_PS3_H
|
||||||
|
#define ASSETS_COD6_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD6_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD6_PS3();
|
||||||
|
~Assets_COD6_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD6_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod7_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod7_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod7_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD7_PS3::Assets_COD7_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD7_PS3::~Assets_COD7_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod7_ps3.h
Normal file
18
libs/assets/PS3/assets_cod7_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD7_PS3_H
|
||||||
|
#define ASSETS_COD7_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD7_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD7_PS3();
|
||||||
|
~Assets_COD7_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD7_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod8_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod8_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod8_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD8_PS3::Assets_COD8_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD8_PS3::~Assets_COD8_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod8_ps3.h
Normal file
18
libs/assets/PS3/assets_cod8_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD8_PS3_H
|
||||||
|
#define ASSETS_COD8_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD8_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD8_PS3();
|
||||||
|
~Assets_COD8_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD8_PS3_H
|
||||||
11
libs/assets/PS3/assets_cod9_ps3.cpp
Normal file
11
libs/assets/PS3/assets_cod9_ps3.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod9_ps3.h"
|
||||||
|
|
||||||
|
Assets_COD9_PS3::Assets_COD9_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD9_PS3::~Assets_COD9_PS3()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/PS3/assets_cod9_ps3.h
Normal file
18
libs/assets/PS3/assets_cod9_ps3.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD9_PS3_H
|
||||||
|
#define ASSETS_COD9_PS3_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD9_PS3 : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD9_PS3();
|
||||||
|
~Assets_COD9_PS3();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD9_PS3_H
|
||||||
11
libs/assets/Wii/assets_cod4_wii.cpp
Normal file
11
libs/assets/Wii/assets_cod4_wii.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod4_wii.h"
|
||||||
|
|
||||||
|
Assets_COD4_Wii::Assets_COD4_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD4_Wii::~Assets_COD4_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/Wii/assets_cod4_wii.h
Normal file
18
libs/assets/Wii/assets_cod4_wii.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD4_WII_H
|
||||||
|
#define ASSETS_COD4_WII_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD4_Wii : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD4_Wii();
|
||||||
|
~Assets_COD4_Wii();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD4_WII_H
|
||||||
11
libs/assets/Wii/assets_cod7_wii.cpp
Normal file
11
libs/assets/Wii/assets_cod7_wii.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod7_wii.h"
|
||||||
|
|
||||||
|
Assets_COD7_Wii::Assets_COD7_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD7_Wii::~Assets_COD7_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/Wii/assets_cod7_wii.h
Normal file
18
libs/assets/Wii/assets_cod7_wii.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD7_WII_H
|
||||||
|
#define ASSETS_COD7_WII_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD7_Wii : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD7_Wii();
|
||||||
|
~Assets_COD7_Wii();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD7_WII_H
|
||||||
11
libs/assets/Wii/assets_cod8_wii.cpp
Normal file
11
libs/assets/Wii/assets_cod8_wii.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod8_wii.h"
|
||||||
|
|
||||||
|
Assets_COD8_Wii::Assets_COD8_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD8_Wii::~Assets_COD8_Wii()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/Wii/assets_cod8_wii.h
Normal file
18
libs/assets/Wii/assets_cod8_wii.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD8_WII_H
|
||||||
|
#define ASSETS_COD8_WII_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD8_Wii : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD8_Wii();
|
||||||
|
~Assets_COD8_Wii();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD8_WII_H
|
||||||
11
libs/assets/WiiU/assets_cod10_wiiu.cpp
Normal file
11
libs/assets/WiiU/assets_cod10_wiiu.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod10_wiiu.h"
|
||||||
|
|
||||||
|
Assets_COD10_WiiU::Assets_COD10_WiiU()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD10_WiiU::~Assets_COD10_WiiU()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/WiiU/assets_cod10_wiiu.h
Normal file
18
libs/assets/WiiU/assets_cod10_wiiu.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD10_WIIU_H
|
||||||
|
#define ASSETS_COD10_WIIU_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD10_WiiU : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD10_WiiU();
|
||||||
|
~Assets_COD10_WiiU();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD10_WIIU_H
|
||||||
11
libs/assets/WiiU/assets_cod9_wiiu.cpp
Normal file
11
libs/assets/WiiU/assets_cod9_wiiu.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "assets_cod9_wiiu.h"
|
||||||
|
|
||||||
|
Assets_COD9_WiiU::Assets_COD9_WiiU()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Assets_COD9_WiiU::~Assets_COD9_WiiU()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
18
libs/assets/WiiU/assets_cod9_wiiu.h
Normal file
18
libs/assets/WiiU/assets_cod9_wiiu.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ASSETS_COD9_WIIU_H
|
||||||
|
#define ASSETS_COD9_WIIU_H
|
||||||
|
|
||||||
|
#include "assets.h"
|
||||||
|
|
||||||
|
class Assets_COD9_WiiU : public Assets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Assets_COD9_WiiU();
|
||||||
|
~Assets_COD9_WiiU();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSETS_COD9_WIIU_H
|
||||||
648
libs/assets/animparts.cpp
Normal file
648
libs/assets/animparts.cpp
Normal file
@ -0,0 +1,648 @@
|
|||||||
|
#include "animparts.h"
|
||||||
|
|
||||||
|
#include <QIODevice>
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicFrames &aAnimDynamicFramesIn)
|
||||||
|
{
|
||||||
|
aDataStream << aAnimDynamicFramesIn.framesPtr;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicFrames &aAnimDynamicFramesOut)
|
||||||
|
{
|
||||||
|
aDataStream >> aAnimDynamicFramesOut.framesPtr;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDynamicFramesToString(const XAnimDynamicFrames &aAnimDynamicFrames) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDynamicFrames(");
|
||||||
|
|
||||||
|
debug.append(QString("\n framesPtr: %1").arg(aAnimDynamicFrames.framesPtr));
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
debug.append(QString("\n frames %1: %2").arg(i).arg(aAnimDynamicFrames.frames[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicIndices &aAnimDynamicIndicesIn)
|
||||||
|
{
|
||||||
|
aDataStream << aAnimDynamicIndicesIn.indices[0];
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicIndices &aAnimDynamicIndicesOut)
|
||||||
|
{
|
||||||
|
aDataStream >> aAnimDynamicIndicesOut.indices[0];
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDynamicIndicesToString(const XAnimDynamicIndices &aAnimDynamicIndices) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDynamicIndices(");
|
||||||
|
|
||||||
|
debug.append(QString("\n indices: %1").arg(aAnimDynamicIndices.indices[0]));
|
||||||
|
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransFrames &aAnimPartTransFramesIn)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream << aAnimPartTransFramesIn.mins[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream << aAnimPartTransFramesIn.size[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
aDataStream
|
||||||
|
<< aAnimPartTransFramesIn.frames
|
||||||
|
<< aAnimPartTransFramesIn.indices;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransFrames &aAnimPartTransFramesOut)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream >> aAnimPartTransFramesOut.mins[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream >> aAnimPartTransFramesOut.size[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartTransFramesOut.frames
|
||||||
|
>> aAnimPartTransFramesOut.indices;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimPartTransFramesToString(const XAnimPartTransFrames &aAnimPartTransFrames) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimPartTransFrames(");
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
debug.append(QString("\n mins %1: %2").arg(i).arg(aAnimPartTransFrames.mins[i]));
|
||||||
|
}
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
debug.append(QString("\n size %1: %2").arg(i).arg(aAnimPartTransFrames.size[i]));
|
||||||
|
}
|
||||||
|
debug.append(QString("\n frames: %1").arg(XAnimDynamicFramesToString(aAnimPartTransFrames.frames)));
|
||||||
|
debug.append(QString("\n frames: %1").arg(XAnimDynamicIndicesToString(aAnimPartTransFrames.indices)));
|
||||||
|
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransData &aAnimPartTransDataIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimPartTransDataIn.frames;
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream << aAnimPartTransDataIn.frame0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransData &aAnimPartTransDataOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartTransDataOut.frames;
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
aDataStream >> aAnimPartTransDataOut.frame0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimPartTransDataToString(const XAnimPartTransData &aAnimPartTransData) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimPartTransData(");
|
||||||
|
|
||||||
|
debug.append(QString("\n frames: %1").arg(XAnimPartTransFramesToString(aAnimPartTransData.frames)));
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
debug.append(QString("\n smallTrans: %1").arg(aAnimPartTransData.frame0[i]));
|
||||||
|
}
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTrans &aAnimPartTransIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimPartTransIn.size
|
||||||
|
<< aAnimPartTransIn.smallTrans
|
||||||
|
<< aAnimPartTransIn.data;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTrans &aAnimPartTransOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartTransOut.size
|
||||||
|
>> aAnimPartTransOut.smallTrans
|
||||||
|
>> aAnimPartTransOut.data;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimPartTransToString(const XAnimPartTrans &aAnimPartTrans) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimPartTrans(");
|
||||||
|
|
||||||
|
debug.append(QString("\n size: %1").arg(aAnimPartTrans.size));
|
||||||
|
debug.append(QString("\n smallTrans: %1").arg(aAnimPartTrans.smallTrans));
|
||||||
|
debug.append(QString("\n data: %1").arg(XAnimPartTransDataToString(aAnimPartTrans.data)));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimDeltaPartQuatDataFramesIn.framesPtr
|
||||||
|
<< aAnimDeltaPartQuatDataFramesIn.indices;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimDeltaPartQuatDataFramesOut.framesPtr
|
||||||
|
>> aAnimDeltaPartQuatDataFramesOut.indices;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDeltaPartQuatDataFramesToString(const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFrames) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDeltaPartQuatDataFrames(");
|
||||||
|
|
||||||
|
debug.append(QString("\n framesPtr: %1").arg(aAnimDeltaPartQuatDataFrames.framesPtr));
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
debug.append(QString("\n frames %1: %2").arg(i).arg(aAnimDeltaPartQuatDataFrames.frames[i]));
|
||||||
|
}
|
||||||
|
debug.append(QString("\n indices: %1").arg(XAnimDynamicIndicesToString(aAnimDeltaPartQuatDataFrames.indices)));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimDeltaPartQuatDataIn.frames;
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
aDataStream << aAnimDeltaPartQuatDataIn.frame0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimDeltaPartQuatDataOut.frames;
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
aDataStream >> aAnimDeltaPartQuatDataOut.frame0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDeltaPartQuatDataToString(const XAnimDeltaPartQuatData &aAnimDeltaPartQuatData) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDeltaPartQuatData(");
|
||||||
|
|
||||||
|
debug.append(QString("\n frames: %1").arg(XAnimDeltaPartQuatDataFramesToString(aAnimDeltaPartQuatData.frames)));
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
debug.append(QString("\n frame0 %1: %2").arg(i).arg(aAnimDeltaPartQuatData.frame0[i]));
|
||||||
|
}
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuat &aAnimDeltaPartQuatIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimDeltaPartQuatIn.size
|
||||||
|
<< aAnimDeltaPartQuatIn.data;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuat &aAnimDeltaPartQuatOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimDeltaPartQuatOut.size
|
||||||
|
>> aAnimDeltaPartQuatOut.data;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDeltaPartQuatToString(const XAnimDeltaPartQuat &aAnimDeltaPartQuat) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDeltaPartQuat(");
|
||||||
|
|
||||||
|
debug.append(QString("\n size: %1").arg(aAnimDeltaPartQuat.size));
|
||||||
|
debug.append(QString("\n data: %1").arg(XAnimDeltaPartQuatDataToString(aAnimDeltaPartQuat.data)));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPart &aAnimDeltaPartIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimDeltaPartIn.transPtr
|
||||||
|
<< aAnimDeltaPartIn.quatPtr;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPart &aAnimDeltaPartOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimDeltaPartOut.transPtr
|
||||||
|
>> aAnimDeltaPartOut.quatPtr;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QString XAnimDeltaPartToString(const XAnimDeltaPart &aAnimDeltaPart) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimDeltaPart(");
|
||||||
|
|
||||||
|
debug.append(QString("\n transPtr: %1").arg(aAnimDeltaPart.transPtr));
|
||||||
|
debug.append(QString("\n trans: %1").arg(XAnimPartTransToString(aAnimDeltaPart.trans)));
|
||||||
|
debug.append(QString("\n quatPtr: %1").arg(aAnimDeltaPart.quatPtr));
|
||||||
|
debug.append(QString("\n quat: %1").arg(XAnimDeltaPartQuatToString(aAnimDeltaPart.quat)));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimNotifyInfo &aAnimNotifyInfoIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimNotifyInfoIn.name
|
||||||
|
<< aAnimNotifyInfoIn.time;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimNotifyInfo &aAnimNotifyInfo) {
|
||||||
|
QDebugStateSaver saver(debug);
|
||||||
|
debug.noquote().nospace();
|
||||||
|
|
||||||
|
debug << "XAnimNotifyInfo(";
|
||||||
|
|
||||||
|
debug << "\n name: " << aAnimNotifyInfo.name;
|
||||||
|
debug << "\n time: " << aAnimNotifyInfo.time;
|
||||||
|
debug << "\n)";
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
QString XAnimNotifyInfoToString(const XAnimNotifyInfo &aAnimNotifyInfo) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimNotifyInfo(");
|
||||||
|
|
||||||
|
debug.append(QString("\n name: %1").arg(aAnimNotifyInfo.name));
|
||||||
|
debug.append(QString("\n time: %1").arg(aAnimNotifyInfo.time));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimNotifyInfo &aAnimNotifyInfoOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimNotifyInfoOut.name
|
||||||
|
>> aAnimNotifyInfoOut.time;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimIndices &aAnimIndicesIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimIndicesIn.indexPtr
|
||||||
|
<< aAnimIndicesIn.index;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimIndices &aAnimIndices) {
|
||||||
|
QDebugStateSaver saver(debug);
|
||||||
|
debug.noquote().nospace();
|
||||||
|
|
||||||
|
debug << "XAnimIndices(";
|
||||||
|
|
||||||
|
debug << "\n name: " << aAnimIndices.indexPtr;
|
||||||
|
debug << "\n namePtr: " << aAnimIndices.index;
|
||||||
|
debug << "\n)";
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
QString XAnimIndicesToString(const XAnimIndices &aAnimIndices) {
|
||||||
|
QString debug;
|
||||||
|
|
||||||
|
debug.append("XAnimIndices(");
|
||||||
|
|
||||||
|
debug.append(QString("\n name: %1").arg(aAnimIndices.indexPtr));
|
||||||
|
debug.append(QString("\n namePtr: %1").arg(aAnimIndices.index));
|
||||||
|
debug.append("\n)");
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimIndices &aAnimIndicesOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimIndicesOut.indexPtr
|
||||||
|
>> aAnimIndicesOut.index;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimParts &aAnimPartIn)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
<< aAnimPartIn.name
|
||||||
|
<< aAnimPartIn.dataByteCount
|
||||||
|
<< aAnimPartIn.dataShortCount
|
||||||
|
<< aAnimPartIn.dataIntCount
|
||||||
|
<< aAnimPartIn.randomDataByteCount
|
||||||
|
<< aAnimPartIn.randomDataIntCount
|
||||||
|
<< aAnimPartIn.numframes
|
||||||
|
<< aAnimPartIn.bLoop
|
||||||
|
<< aAnimPartIn.bDelta;
|
||||||
|
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
aDataStream << aAnimPartIn.boneCount[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
aDataStream
|
||||||
|
<< aAnimPartIn.notifyCount
|
||||||
|
<< aAnimPartIn.pad
|
||||||
|
<< aAnimPartIn.randomDataShortCount
|
||||||
|
<< aAnimPartIn.indexCount
|
||||||
|
<< aAnimPartIn.framerate
|
||||||
|
<< aAnimPartIn.frequency
|
||||||
|
<< aAnimPartIn.namesPtr
|
||||||
|
<< aAnimPartIn.dataBytePtr
|
||||||
|
<< aAnimPartIn.dataShortPtr
|
||||||
|
<< aAnimPartIn.dataIntPtr
|
||||||
|
<< aAnimPartIn.randomDataShortPtr
|
||||||
|
<< aAnimPartIn.randomDataBytePtr
|
||||||
|
<< aAnimPartIn.randomDataIntPtr
|
||||||
|
<< aAnimPartIn.indices
|
||||||
|
<< aAnimPartIn.notifyPtr
|
||||||
|
<< aAnimPartIn.deltaPartPtr;
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
quint32 ROL4(quint32 value, int positions) {
|
||||||
|
return (value << positions) | (value >> (32 - positions));
|
||||||
|
}
|
||||||
|
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimParts &aAnimPartOut)
|
||||||
|
{
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartOut.namePtr
|
||||||
|
>> aAnimPartOut.dataByteCount
|
||||||
|
>> aAnimPartOut.dataShortCount
|
||||||
|
>> aAnimPartOut.dataIntCount
|
||||||
|
>> aAnimPartOut.randomDataByteCount
|
||||||
|
>> aAnimPartOut.randomDataIntCount
|
||||||
|
>> aAnimPartOut.numframes
|
||||||
|
>> aAnimPartOut.bLoop
|
||||||
|
>> aAnimPartOut.bDelta;
|
||||||
|
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
aDataStream >> aAnimPartOut.boneCount[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartOut.notifyCount
|
||||||
|
>> aAnimPartOut.assetType
|
||||||
|
>> aAnimPartOut.pad;
|
||||||
|
|
||||||
|
aDataStream.skipRawData(3);
|
||||||
|
|
||||||
|
aDataStream
|
||||||
|
>> aAnimPartOut.randomDataShortCount
|
||||||
|
>> aAnimPartOut.indexCount;
|
||||||
|
|
||||||
|
quint32 framerateInt, frequencyInt;
|
||||||
|
aDataStream
|
||||||
|
>> framerateInt
|
||||||
|
>> frequencyInt
|
||||||
|
>> aAnimPartOut.namesPtr
|
||||||
|
>> aAnimPartOut.dataBytePtr
|
||||||
|
>> aAnimPartOut.dataShortPtr
|
||||||
|
>> aAnimPartOut.dataIntPtr
|
||||||
|
>> aAnimPartOut.randomDataShortPtr
|
||||||
|
>> aAnimPartOut.randomDataBytePtr
|
||||||
|
>> aAnimPartOut.randomDataIntPtr
|
||||||
|
>> aAnimPartOut.indices
|
||||||
|
>> aAnimPartOut.notifyPtr
|
||||||
|
>> aAnimPartOut.deltaPartPtr;
|
||||||
|
|
||||||
|
aAnimPartOut.framerate = *reinterpret_cast<float*>(&framerateInt);
|
||||||
|
aAnimPartOut.frequency = *reinterpret_cast<float*>(&frequencyInt);
|
||||||
|
|
||||||
|
if (aAnimPartOut.namePtr) {
|
||||||
|
aAnimPartOut.name = "";
|
||||||
|
|
||||||
|
char animNameChar;
|
||||||
|
aDataStream >> animNameChar;
|
||||||
|
while (animNameChar != '\0') {
|
||||||
|
aAnimPartOut.name += animNameChar;
|
||||||
|
|
||||||
|
aDataStream >> animNameChar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.namesPtr) {
|
||||||
|
int nameCount = aAnimPartOut.boneCount[11];
|
||||||
|
aDataStream.skipRawData(2 * nameCount);
|
||||||
|
|
||||||
|
for (int i = 0; i < nameCount; i++) {
|
||||||
|
aDataStream.skipRawData(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.notifyPtr) {
|
||||||
|
int notifyCount = aAnimPartOut.notifyCount;
|
||||||
|
aDataStream.skipRawData(8 * notifyCount);
|
||||||
|
|
||||||
|
for (int i = 0; i < notifyCount; i++) {
|
||||||
|
aDataStream.skipRawData(8);
|
||||||
|
aDataStream >> aAnimPartOut.notify;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.deltaPartPtr) {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart;
|
||||||
|
if (aAnimPartOut.deltaPart.transPtr) {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.trans;
|
||||||
|
|
||||||
|
if (aAnimPartOut.deltaPart.trans.size) {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.trans.data.frames;
|
||||||
|
quint32 size = aAnimPartOut.deltaPart.trans.size;
|
||||||
|
quint32 readSize;
|
||||||
|
if (aAnimPartOut.numframes >= 0x100) {
|
||||||
|
readSize = 2 * (size + 1);
|
||||||
|
} else {
|
||||||
|
readSize = size + 1;
|
||||||
|
}
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.trans.data.frames.indices;
|
||||||
|
|
||||||
|
if (aAnimPartOut.deltaPart.trans.smallTrans) {
|
||||||
|
if (aAnimPartOut.deltaPart.trans.data.frames.frames.framesPtr) {
|
||||||
|
aDataStream.skipRawData(3 * (aAnimPartOut.deltaPart.trans.size + 1));
|
||||||
|
}
|
||||||
|
} else if (aAnimPartOut.deltaPart.trans.data.frames.frames.framesPtr) {
|
||||||
|
aDataStream.skipRawData(6 * (aAnimPartOut.deltaPart.trans.size + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.deltaPart.quatPtr) {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.quat;
|
||||||
|
|
||||||
|
if (aAnimPartOut.deltaPart.quat.size) {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.quat.data.frames;
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.quat.data.frames.indices;
|
||||||
|
|
||||||
|
if (aAnimPartOut.deltaPart.quat.data.frames.framesPtr) {
|
||||||
|
aDataStream.skipRawData(4 * (aAnimPartOut.deltaPart.quat.size + 1));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aDataStream >> aAnimPartOut.deltaPart.quat.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.dataBytePtr) {
|
||||||
|
aDataStream.skipRawData(aAnimPartOut.dataByteCount);
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.dataShortPtr) {
|
||||||
|
aDataStream.skipRawData(ROL4(aAnimPartOut.dataShortCount, 1));
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.dataIntPtr) {
|
||||||
|
aDataStream.skipRawData(ROL4(aAnimPartOut.dataIntCount, 2));
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.randomDataShortPtr) {
|
||||||
|
aDataStream.skipRawData(2 * aAnimPartOut.randomDataShortCount);
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.randomDataBytePtr) {
|
||||||
|
aDataStream.skipRawData(2 * aAnimPartOut.randomDataByteCount);
|
||||||
|
}
|
||||||
|
if (aAnimPartOut.randomDataIntPtr) {
|
||||||
|
aDataStream.skipRawData(ROL4(aAnimPartOut.randomDataIntCount, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << aDataStream.device()->pos();
|
||||||
|
|
||||||
|
return aDataStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString XAnimPartsToString(const XAnimParts &xAnimParts) {
|
||||||
|
QString debug = "";
|
||||||
|
|
||||||
|
debug.append(QString("XAnimParts("));
|
||||||
|
|
||||||
|
debug.append(QString("\n name: %1").arg(xAnimParts.name));
|
||||||
|
debug.append(QString("\n namePtr: %1").arg(QString::number(xAnimParts.namePtr, 16)));
|
||||||
|
|
||||||
|
debug.append(QString("\n dataByteCount: %1").arg(xAnimParts.dataByteCount));
|
||||||
|
debug.append(QString("\n dataShortCount: %1").arg(xAnimParts.dataShortCount));
|
||||||
|
debug.append(QString("\n dataIntCount: %1").arg(xAnimParts.dataIntCount));
|
||||||
|
debug.append(QString("\n randomDataByteCount: %1").arg(xAnimParts.randomDataByteCount));
|
||||||
|
debug.append(QString("\n randomDataIntCount: %1").arg(xAnimParts.randomDataIntCount));
|
||||||
|
debug.append(QString("\n numframes: %1").arg(xAnimParts.numframes));
|
||||||
|
|
||||||
|
debug.append(QString("\n bLoop: %1").arg(xAnimParts.bLoop));
|
||||||
|
debug.append(QString("\n bDelta: %1").arg(xAnimParts.bDelta));
|
||||||
|
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
debug.append(QString("\n boneCount %1: %2").arg(i).arg(xAnimParts.boneCount[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
debug.append(QString("\n notifyCount: %1").arg(xAnimParts.notifyCount));
|
||||||
|
debug.append(QString("\n assetType: %1").arg(xAnimParts.assetType));
|
||||||
|
|
||||||
|
debug.append(QString("\n pad: %1").arg(xAnimParts.pad));
|
||||||
|
|
||||||
|
debug.append(QString("\n randomDataShortCount: %1").arg(xAnimParts.randomDataShortCount));
|
||||||
|
debug.append(QString("\n indexCount: %1").arg(xAnimParts.indexCount));
|
||||||
|
|
||||||
|
debug.append(QString("\n framerate: %1").arg(xAnimParts.framerate));
|
||||||
|
debug.append(QString("\n frequency: %1").arg(xAnimParts.frequency));
|
||||||
|
|
||||||
|
debug.append(QString("\n namesPtr: %1").arg(QString::number(xAnimParts.namesPtr, 16)));
|
||||||
|
debug.append(QString("\n names: %1").arg(xAnimParts.names));
|
||||||
|
|
||||||
|
debug.append(QString("\n dataBytePtr: %1").arg(QString::number(xAnimParts.dataBytePtr, 16)));
|
||||||
|
debug.append(QString("\n dataByte: %1").arg(xAnimParts.dataByte));
|
||||||
|
|
||||||
|
debug.append(QString("\n dataShortPtr: %1").arg(QString::number(xAnimParts.dataShortPtr, 16)));
|
||||||
|
debug.append(QString("\n dataShort: %1").arg(xAnimParts.dataShort));
|
||||||
|
|
||||||
|
debug.append(QString("\n dataIntPtr: %1").arg(QString::number(xAnimParts.dataIntPtr, 16)));
|
||||||
|
debug.append(QString("\n dataInt: %1").arg(xAnimParts.dataInt));
|
||||||
|
|
||||||
|
debug.append(QString("\n randomDataShortPtr: %1").arg(QString::number(xAnimParts.randomDataShortPtr, 16)));
|
||||||
|
debug.append(QString("\n randomDataShort: %1").arg(xAnimParts.randomDataShort));
|
||||||
|
|
||||||
|
debug.append(QString("\n randomDataBytePtr: %1").arg(QString::number(xAnimParts.randomDataBytePtr, 16)));
|
||||||
|
debug.append(QString("\n randomDataByte: %1").arg(xAnimParts.randomDataByte));
|
||||||
|
|
||||||
|
debug.append(QString("\n randomDataIntPtr: %1").arg(QString::number(xAnimParts.randomDataIntPtr, 16)));
|
||||||
|
debug.append(QString("\n randomDataInt: %1").arg(xAnimParts.randomDataInt));
|
||||||
|
|
||||||
|
debug.append(QString("\n indices: %1").arg(XAnimIndicesToString(xAnimParts.indices)));
|
||||||
|
|
||||||
|
debug.append(QString("\n notifyPtr: %1").arg(QString::number(xAnimParts.notifyPtr, 16)));
|
||||||
|
debug.append(QString("\n notify: %1").arg(XAnimNotifyInfoToString(xAnimParts.notify)));
|
||||||
|
|
||||||
|
debug.append(QString("\n deltaPartPtr: %1").arg(QString::number(xAnimParts.deltaPartPtr, 16)));
|
||||||
|
debug.append(QString("\n deltaPart: %1").arg(XAnimDeltaPartToString(xAnimParts.deltaPart)));
|
||||||
|
|
||||||
|
debug.append(QString("\n)"));
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimParts &xanimParts) {
|
||||||
|
QDebugStateSaver saver(debug);
|
||||||
|
debug.noquote().nospace();
|
||||||
|
|
||||||
|
debug << XAnimPartsToString(xanimParts);
|
||||||
|
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
173
libs/assets/animparts.h
Normal file
173
libs/assets/animparts.h
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
#ifndef ANIMPARTS_H
|
||||||
|
#define ANIMPARTS_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QDataStream>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
struct XAnimDynamicFrames
|
||||||
|
{
|
||||||
|
quint32 framesPtr;
|
||||||
|
quint8 frames[3];
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicFrames &aAnimDynamicFramesIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicFrames &aAnimDynamicFramesOut);
|
||||||
|
|
||||||
|
struct XAnimDynamicIndices
|
||||||
|
{
|
||||||
|
quint8 indices[1];
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicIndices &aAnimDynamicIndicesIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicIndices &aAnimDynamicIndicesOut);
|
||||||
|
|
||||||
|
struct XAnimPartTransFrames
|
||||||
|
{
|
||||||
|
float mins[3];
|
||||||
|
float size[3];
|
||||||
|
XAnimDynamicFrames frames;
|
||||||
|
XAnimDynamicIndices indices;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransFrames &aAnimPartTransFramesIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransFrames &aAnimPartTransFramesOut);
|
||||||
|
|
||||||
|
union XAnimPartTransData
|
||||||
|
{
|
||||||
|
XAnimPartTransFrames frames;
|
||||||
|
float frame0[3];
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransData &aAnimPartTransDataIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransData &aAnimPartTransDataOut);
|
||||||
|
|
||||||
|
struct XAnimPartTrans
|
||||||
|
{
|
||||||
|
quint16 size;
|
||||||
|
quint8 smallTrans;
|
||||||
|
XAnimPartTransData data;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTrans &aAnimPartTransIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTrans &aAnimPartTransOut);
|
||||||
|
|
||||||
|
struct XAnimDeltaPartQuatDataFrames
|
||||||
|
{
|
||||||
|
quint32 framesPtr;
|
||||||
|
qint16 frames[2];
|
||||||
|
|
||||||
|
XAnimDynamicIndices indices;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesOut);
|
||||||
|
|
||||||
|
struct XAnimDeltaPartQuatData
|
||||||
|
{
|
||||||
|
XAnimDeltaPartQuatDataFrames frames;
|
||||||
|
qint16 frame0[2];
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataOut);
|
||||||
|
|
||||||
|
struct XAnimDeltaPartQuat
|
||||||
|
{
|
||||||
|
quint16 size;
|
||||||
|
XAnimDeltaPartQuatData data;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuat &aAnimDeltaPartQuatIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuat &aAnimDeltaPartQuatOut);
|
||||||
|
|
||||||
|
struct XAnimDeltaPart
|
||||||
|
{
|
||||||
|
quint32 transPtr;
|
||||||
|
XAnimPartTrans trans;
|
||||||
|
|
||||||
|
quint32 quatPtr;
|
||||||
|
XAnimDeltaPartQuat quat;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPart &aAnimDeltaPartIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPart &aAnimDeltaPartOut);
|
||||||
|
|
||||||
|
struct XAnimNotifyInfo
|
||||||
|
{
|
||||||
|
quint16 name;
|
||||||
|
float time;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimNotifyInfo &aAnimNotifyInfoIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimNotifyInfo &aAnimNotifyInfoOut);
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimNotifyInfo &aAnimNotifyInfo);
|
||||||
|
QString XAnimNotifyInfoToString(const XAnimNotifyInfo &aAnimNotifyInfo);
|
||||||
|
|
||||||
|
struct XAnimIndices
|
||||||
|
{
|
||||||
|
quint32 indexPtr;
|
||||||
|
quint16 index;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimIndices &aAnimIndicesIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimIndices &aAnimIndicesOut);
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimIndices &aAnimIndices);
|
||||||
|
QString XAnimIndicesToString(const XAnimIndices &aAnimIndices);
|
||||||
|
|
||||||
|
struct XAnimParts
|
||||||
|
{
|
||||||
|
QString name;
|
||||||
|
quint32 namePtr;
|
||||||
|
|
||||||
|
quint16 dataByteCount;
|
||||||
|
quint16 dataShortCount;
|
||||||
|
quint16 dataIntCount;
|
||||||
|
quint16 randomDataByteCount;
|
||||||
|
quint16 randomDataIntCount;
|
||||||
|
quint16 numframes;
|
||||||
|
|
||||||
|
bool bLoop;
|
||||||
|
bool bDelta;
|
||||||
|
|
||||||
|
quint8 boneCount[12];
|
||||||
|
quint8 notifyCount;
|
||||||
|
quint8 assetType;
|
||||||
|
|
||||||
|
bool pad;
|
||||||
|
|
||||||
|
quint16 randomDataShortCount;
|
||||||
|
quint16 indexCount;
|
||||||
|
|
||||||
|
float framerate;
|
||||||
|
float frequency;
|
||||||
|
|
||||||
|
quint32 namesPtr;
|
||||||
|
quint16 names;
|
||||||
|
|
||||||
|
quint32 dataBytePtr;
|
||||||
|
quint8 dataByte;
|
||||||
|
|
||||||
|
quint32 dataShortPtr;
|
||||||
|
qint16 dataShort;
|
||||||
|
|
||||||
|
quint32 dataIntPtr;
|
||||||
|
int dataInt;
|
||||||
|
|
||||||
|
quint32 randomDataShortPtr;
|
||||||
|
qint16 randomDataShort;
|
||||||
|
|
||||||
|
quint32 randomDataBytePtr;
|
||||||
|
quint8 randomDataByte;
|
||||||
|
|
||||||
|
quint32 randomDataIntPtr;
|
||||||
|
int randomDataInt;
|
||||||
|
|
||||||
|
XAnimIndices indices;
|
||||||
|
|
||||||
|
qint32 notifyPtr;
|
||||||
|
XAnimNotifyInfo notify;
|
||||||
|
|
||||||
|
qint32 deltaPartPtr;
|
||||||
|
XAnimDeltaPart deltaPart;
|
||||||
|
};
|
||||||
|
QDataStream &operator<<(QDataStream &aDataStream, const XAnimParts &aAnimPartIn);
|
||||||
|
QDataStream &operator>>(QDataStream &aDataStream, XAnimParts &aAnimPartOut);
|
||||||
|
QDebug operator<<(QDebug debug, const XAnimParts &xanimParts);
|
||||||
|
QString XAnimPartsToString(const XAnimParts &xAnimParts);
|
||||||
|
|
||||||
|
struct Animation {
|
||||||
|
QString name;
|
||||||
|
XAnimParts animParts;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ANIMPARTS_H
|
||||||
1
libs/assets/asset.cpp
Normal file
1
libs/assets/asset.cpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "asset.h"
|
||||||
112
libs/assets/asset.h
Normal file
112
libs/assets/asset.h
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
#ifndef ASSET_H
|
||||||
|
#define ASSET_H
|
||||||
|
|
||||||
|
#include "animparts.h"
|
||||||
|
#include "model.h"
|
||||||
|
#include "material.h"
|
||||||
|
#include "materialpixelshader.h"
|
||||||
|
#include "materialtechset.h"
|
||||||
|
#include "gfximage.h"
|
||||||
|
#include "soundalias.h"
|
||||||
|
#include "soundcurve.h"
|
||||||
|
#include "loadedsound.h"
|
||||||
|
#include "clipmap.h"
|
||||||
|
#include "comworld.h"
|
||||||
|
#include "gameworld.h"
|
||||||
|
#include "mapent.h"
|
||||||
|
#include "gfxworld.h"
|
||||||
|
#include "gfxlightdef.h"
|
||||||
|
#include "gfximage.h"
|
||||||
|
#include "font.h"
|
||||||
|
#include "menulist.h"
|
||||||
|
#include "menudef.h"
|
||||||
|
#include "localizeentry.h"
|
||||||
|
#include "weapondef.h"
|
||||||
|
#include "sounddriver.h"
|
||||||
|
#include "effectdef.h"
|
||||||
|
#include "effecttable.h"
|
||||||
|
#include "rawfile.h"
|
||||||
|
#include "stringtable.h"
|
||||||
|
|
||||||
|
enum XAssetType : qint32
|
||||||
|
{
|
||||||
|
ASSET_TYPE_XMODELPIECES = 0x0,
|
||||||
|
ASSET_TYPE_PHYSPRESET = 0x1,
|
||||||
|
ASSET_TYPE_XANIMPARTS = 0x2,
|
||||||
|
ASSET_TYPE_XMODEL = 0x3,
|
||||||
|
ASSET_TYPE_MATERIAL = 0x4,
|
||||||
|
ASSET_TYPE_PIXELSHADER = 0x5,
|
||||||
|
ASSET_TYPE_TECHNIQUE_SET = 0x6,
|
||||||
|
ASSET_TYPE_IMAGE = 0x7,
|
||||||
|
ASSET_TYPE_SOUND = 0x8,
|
||||||
|
ASSET_TYPE_SOUND_CURVE = 0x9,
|
||||||
|
ASSET_TYPE_LOADED_SOUND = 0xA,
|
||||||
|
ASSET_TYPE_CLIPMAP = 0xB,
|
||||||
|
ASSET_TYPE_CLIPMAP_PVS = 0xC,
|
||||||
|
ASSET_TYPE_COMWORLD = 0xD,
|
||||||
|
ASSET_TYPE_GAMEWORLD_SP = 0xE,
|
||||||
|
ASSET_TYPE_GAMEWORLD_MP = 0xF,
|
||||||
|
ASSET_TYPE_MAP_ENTS = 0x10,
|
||||||
|
ASSET_TYPE_GFXWORLD = 0x11,
|
||||||
|
ASSET_TYPE_LIGHT_DEF = 0x12,
|
||||||
|
ASSET_TYPE_UI_MAP = 0x13,
|
||||||
|
ASSET_TYPE_FONT = 0x14,
|
||||||
|
ASSET_TYPE_MENULIST = 0x15,
|
||||||
|
ASSET_TYPE_MENU = 0x16,
|
||||||
|
ASSET_TYPE_LOCALIZE_ENTRY = 0x17,
|
||||||
|
ASSET_TYPE_WEAPON = 0x18,
|
||||||
|
ASSET_TYPE_SNDDRIVER_GLOBALS = 0x19,
|
||||||
|
ASSET_TYPE_FX = 0x1A,
|
||||||
|
ASSET_TYPE_IMPACT_FX = 0x1B,
|
||||||
|
ASSET_TYPE_AITYPE = 0x1C,
|
||||||
|
ASSET_TYPE_MPTYPE = 0x1D,
|
||||||
|
ASSET_TYPE_CHARACTER = 0x1E,
|
||||||
|
ASSET_TYPE_XMODELALIAS = 0x1F,
|
||||||
|
ASSET_TYPE_RAWFILE = 0x20,
|
||||||
|
ASSET_TYPE_STRINGTABLE = 0x21,
|
||||||
|
ASSET_TYPE_COUNT = 0x22,
|
||||||
|
ASSET_TYPE_STRING = 0x22,
|
||||||
|
ASSET_TYPE_ASSETLIST = 0x23,
|
||||||
|
};
|
||||||
|
|
||||||
|
union XAssetHeader
|
||||||
|
{
|
||||||
|
XModelPieces *xmodelPieces;
|
||||||
|
PhysPreset *physPreset;
|
||||||
|
XAnimParts *parts;
|
||||||
|
Model *model;
|
||||||
|
Material *material;
|
||||||
|
MaterialPixelShader *pixelShader;
|
||||||
|
MaterialVertexShader *vertexShader;
|
||||||
|
MaterialTechSet *techniqueSet;
|
||||||
|
GfxImage *image;
|
||||||
|
SoundAliasList *sound;
|
||||||
|
SoundCurve *sndCurve;
|
||||||
|
LoadedSound *loadSnd;
|
||||||
|
ClipMap *clipMap;
|
||||||
|
ComWorld *comWorld;
|
||||||
|
GameWorldSp *gameWorldSp;
|
||||||
|
GameWorldMp *gameWorldMp;
|
||||||
|
MapEnts *mapEnts;
|
||||||
|
GfxWorld *gfxWorld;
|
||||||
|
GfxLightDef *lightDef;
|
||||||
|
GameFont *font;
|
||||||
|
MenuList *menuList;
|
||||||
|
MenuDef *menu;
|
||||||
|
LocalizeEntry *localize;
|
||||||
|
WeaponDef *weapon;
|
||||||
|
SoundDriver *sndDriverGlobals;
|
||||||
|
const EffectDef *fx;
|
||||||
|
ImpactTable *impactFx;
|
||||||
|
RawFile *rawfile;
|
||||||
|
StringTable *stringTable;
|
||||||
|
void *data;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct XAsset
|
||||||
|
{
|
||||||
|
XAssetType type;
|
||||||
|
XAssetHeader header;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ASSET_H
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user