Compare commits
80 Commits
0ea4a7ad6f
...
e7455256a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7455256a7 | ||
|
|
2a026947c4 | ||
|
|
12795451e6 | ||
|
|
c9802401fb | ||
|
|
5a12e3c967 | ||
|
|
a02e3714d0 | ||
|
|
84f99dc919 | ||
|
|
163f46b4cf | ||
|
|
7b1d269986 | ||
|
|
386d0793aa | ||
|
|
dc3360a97d | ||
|
|
6ab9a9b350 | ||
|
|
e3f971f62c | ||
|
|
3a718acb50 | ||
|
|
2e09f532b9 | ||
|
|
c39185e35c | ||
|
|
eee271278a | ||
|
|
e7077aae63 | ||
|
|
78a6efd02f | ||
|
|
73b3cc9e75 | ||
|
|
ef6f75c8a8 | ||
|
|
3bed978b89 | ||
|
|
dcab86b1ed | ||
|
|
7cf9ac8d4c | ||
|
|
e63cf8554e | ||
|
|
d7e4dfda41 | ||
|
|
9c92fcd854 | ||
|
|
7768c5f7f5 | ||
|
|
58e87e8787 | ||
|
|
b176bc3d00 | ||
|
|
3c13462618 | ||
|
|
68a41d4582 | ||
|
|
60e93e0ab3 | ||
|
|
9fb5c62b75 | ||
|
|
352e51170d | ||
|
|
fc64762bfe | ||
|
|
fe34c63697 | ||
|
|
02d96741e8 | ||
|
|
d8b27a31d2 | ||
|
|
4fcd3a4c60 | ||
|
|
fd1868ed46 | ||
|
|
7250e1f460 | ||
|
|
1e0a490a69 | ||
|
|
bfedb389b8 | ||
|
|
0a2fdd0b74 | ||
|
|
a2959f9b29 | ||
|
|
cd99390ba7 | ||
|
|
388e2dfc52 | ||
|
|
47e09afa73 | ||
|
|
cdef686ec4 | ||
|
|
be21cf40cb | ||
|
|
4eb817375c | ||
|
|
5a623c18d0 | ||
|
|
63ca1074fc | ||
|
|
9a70b774ab | ||
|
|
ea385c2853 | ||
|
|
f9604bc858 | ||
|
|
65a37363e6 | ||
|
|
2879a89594 | ||
|
|
6bc88394cd | ||
|
|
f17d56c603 | ||
|
|
2253db1abb | ||
|
|
c362953775 | ||
|
|
6ea2989d69 | ||
|
|
ea90db4fe6 | ||
|
|
2b1a18be6a | ||
|
|
40ad7470aa | ||
|
|
89d1d0944a | ||
|
|
73e13263fc | ||
|
|
60ddd31101 | ||
|
|
ee4a680d6d | ||
|
|
2f61367fcb | ||
|
|
c7b1c97d68 | ||
|
|
ed30f6b861 | ||
|
|
5ea8c5f09a | ||
|
|
d1cf5ecc52 | ||
|
|
a85abf0ecd | ||
|
|
caca3dd489 | ||
|
|
39853c77fe | ||
|
|
f149b66322 |
@ -1,648 +0,0 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,173 +0,0 @@
|
||||
#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 +0,0 @@
|
||||
#include "assetlist.h"
|
||||
@ -1,14 +0,0 @@
|
||||
#ifndef ASSETLIST_H
|
||||
#define ASSETLIST_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "scriptstringlist.h"
|
||||
|
||||
struct XAssetList
|
||||
{
|
||||
ScriptStringList stringList;
|
||||
int assetCount;
|
||||
QVector<XAsset> assets;
|
||||
};
|
||||
|
||||
#endif // ASSETLIST_H
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef ASSETS_H
|
||||
#define ASSETS_H
|
||||
|
||||
#include "xgfxpixelshaderloaddef.h"
|
||||
#include "xmodel.h"
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
@ -211,69 +212,13 @@ struct _XGTEXTURE_DESC
|
||||
_D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
};
|
||||
|
||||
struct GfxImageLoadDef;
|
||||
|
||||
struct GfxTexture
|
||||
{
|
||||
qint32 basemapPtr;
|
||||
D3DBaseTexture *basemap;
|
||||
qint32 mapPtr;
|
||||
D3DTexture *map;
|
||||
qint32 volmapPtr;
|
||||
D3DVolumeTexture *volmap;
|
||||
qint32 cubemapPtr;
|
||||
D3DCubeTexture *cubemap;
|
||||
qint32 loadDefPtr;
|
||||
GfxImageLoadDef *loadDef;
|
||||
};
|
||||
|
||||
struct GfxImageLoadDef
|
||||
{
|
||||
quint8 levelCount;
|
||||
quint8 flags;
|
||||
qint16 dimensions[3];
|
||||
int format;
|
||||
GfxTexture texture;
|
||||
};
|
||||
|
||||
struct CardMemory
|
||||
{
|
||||
int platform[1];
|
||||
};
|
||||
|
||||
struct GfxImage
|
||||
{
|
||||
MapType mapType;
|
||||
GfxTexture texture;
|
||||
quint8 semantic;
|
||||
CardMemory cardMemory;
|
||||
quint16 width;
|
||||
quint16 height;
|
||||
quint16 depth;
|
||||
quint8 category;
|
||||
bool delayLoadPixels;
|
||||
qint32 pixelsPtr;
|
||||
QVector<quint8> pixels;
|
||||
uint baseSize;
|
||||
quint16 streamSlot;
|
||||
bool streaming;
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
};
|
||||
|
||||
|
||||
union MaterialPixelShaderProgram
|
||||
{
|
||||
qint32 psPtr;
|
||||
D3DPixelShader ps;
|
||||
GfxPixelShaderLoadDef loadDef;
|
||||
};
|
||||
|
||||
struct stream_source_info_t
|
||||
{
|
||||
quint16 Stream;
|
||||
quint16 Offset;
|
||||
uint Type;
|
||||
XD3DPixelShader ps;
|
||||
XGfxPixelShaderLoadDef loadDef;
|
||||
};
|
||||
|
||||
struct __declspec(align(4)) XMALOOPREGION
|
||||
@ -511,38 +456,6 @@ struct MaterialTechniqueSet
|
||||
MaterialTechnique *techniques[26];
|
||||
};
|
||||
|
||||
struct XModel
|
||||
{
|
||||
const char *name;
|
||||
quint8 numBones;
|
||||
quint8 numRootBones;
|
||||
quint8 numsurfs;
|
||||
quint8 lodRampType;
|
||||
quint16 *boneNames;
|
||||
quint8 *parentList;
|
||||
qint16 *quats;
|
||||
float *trans;
|
||||
quint8 *partClassification;
|
||||
DObjAnimMat *baseMat;
|
||||
XSurface *surfs;
|
||||
Material **materialHandles;
|
||||
XModelLodInfo lodInfo[4];
|
||||
XModelCollSurf *collSurfs;
|
||||
int numCollSurfs;
|
||||
int contents;
|
||||
XBoneInfo *boneInfo;
|
||||
float radius;
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
qint16 numLods;
|
||||
qint16 collLod;
|
||||
XModelStreamInfo streamInfo;
|
||||
int memUsage;
|
||||
quint8 flags;
|
||||
PhysPreset *physPreset;
|
||||
PhysGeomList *physGeoms;
|
||||
};
|
||||
|
||||
struct XModelPiece
|
||||
{
|
||||
XModel *model;
|
||||
@ -762,7 +675,7 @@ struct CollisionAabbTree
|
||||
CollisionAabbTreeIndex u;
|
||||
};
|
||||
|
||||
struct CModel
|
||||
struct XCModel
|
||||
{
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
@ -770,14 +683,14 @@ struct CModel
|
||||
CLeaf leaf;
|
||||
};
|
||||
|
||||
struct CBrush
|
||||
struct XCBrush
|
||||
{
|
||||
float mins[3];
|
||||
int contents;
|
||||
float maxs[3];
|
||||
uint numsides;
|
||||
qint32 sidesPtr;
|
||||
QVector<CBrushSide> sides;
|
||||
QVector<XCBrushSide> sides;
|
||||
qint16 axialMaterialNum[2][3];
|
||||
qint32 baseAdjacentSidePtr;
|
||||
quint8 baseAdjacentSide;
|
||||
@ -2872,36 +2785,17 @@ struct FxImpactTable
|
||||
QVector<FxImpactEntry> table;
|
||||
};
|
||||
|
||||
struct RawFile
|
||||
{
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
int len;
|
||||
qint32 bufferPtr;
|
||||
QString buffer;
|
||||
};
|
||||
|
||||
struct StringTable
|
||||
{
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
int columnCount;
|
||||
int rowCount;
|
||||
qint32 valuesPtr;
|
||||
QStringList values;
|
||||
};
|
||||
|
||||
union XAssetHeader
|
||||
{
|
||||
XModelPieces *xmodelPieces;
|
||||
PhysPreset *physPreset;
|
||||
XPhysPreset *physPreset;
|
||||
XAnimParts *parts;
|
||||
XModel *model;
|
||||
Material *material;
|
||||
MaterialPixelShader *pixelShader;
|
||||
MaterialVertexShader *vertexShader;
|
||||
XMaterial *material;
|
||||
XMaterialPixelShader *pixelShader;
|
||||
XMaterialVertexShader *vertexShader;
|
||||
MaterialTechniqueSet *techniqueSet;
|
||||
GfxImage *image;
|
||||
XGfxImage *image;
|
||||
SoundAliasList *sound;
|
||||
SndCurve *sndCurve;
|
||||
LoadedSound *loadSnd;
|
||||
@ -2920,300 +2814,9 @@ union XAssetHeader
|
||||
XSoundDriverGlobals *sndDriverGlobals;
|
||||
const FxEffectDef *fx;
|
||||
FxImpactTable *impactFx;
|
||||
RawFile *rawfile;
|
||||
StringTable *stringTable;
|
||||
XRawFile *rawfile;
|
||||
XStringTable *stringTable;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct StreamDelayInfo
|
||||
{
|
||||
const void *ptr;
|
||||
int size;
|
||||
};
|
||||
|
||||
class Assets : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Assets(QObject *parent = nullptr);
|
||||
~Assets();
|
||||
|
||||
private:
|
||||
QVector<Glyph> Load_GlyphArray(QDataStream *aStream, int count);
|
||||
QVector<GfxLightRegionAxis> Load_GfxLightRegionAxisArray(QDataStream *aStream, int count);
|
||||
QVector<GfxDrawSurf> Load_GfxDrawSurfArray(QDataStream *aStream, int count);
|
||||
QVector<GfxSceneDynBrush> Load_GfxSceneDynBrushArray(QDataStream *aStream, int count);
|
||||
QVector<GfxSceneDynModel> Load_GfxSceneDynModelArray(QDataStream *aStream, int count);
|
||||
QVector<GfxStreamingAabbTree> Load_GfxStreamingAabbTreeArray(QDataStream *aStream, int count);
|
||||
GfxLightGridColors Load_GfxLightGridColors(QDataStream *aStream);
|
||||
QVector<GfxLightGridColors> Load_GfxLightGridColorsArray(QDataStream *aStream, int count);
|
||||
QVector<GfxLightGridEntry> Load_GfxLightGridEntryArray(QDataStream *aStream, int count);
|
||||
QVector<GfxCullGroup> Load_GfxCullGroupArray(QDataStream *aStream, int count);
|
||||
QVector<quint16> Load_StaticModelIndexArray(QDataStream *aStream, int count);
|
||||
QVector<GfxStaticModelInst> Load_GfxStaticModelInstArray(QDataStream *aStream, int count);
|
||||
XItemKeyHandler Load_ItemKeyHandler(QDataStream *aStream);
|
||||
XItemKeyHandler Load_ItemKeyHandlerNext(QDataStream *aStream);
|
||||
XEditFieldDef Load_EditFieldDef(QDataStream *aStream);
|
||||
OperationEnum Load_Operator(QDataStream *aStream);
|
||||
QVector<quint16> Load_LeafBrushArray(QDataStream *aStream, int count);
|
||||
CLeaf Load_CLeaf(QDataStream *aStream);
|
||||
QVector<CModel> Load_CModelArray(QDataStream *aStream, int count);
|
||||
QVector<CollisionAabbTree> Load_CollisionAabbTreeArray(QDataStream *aStream, int count);
|
||||
CollisionBorder Load_CollisionBorder(QDataStream *aStream);
|
||||
QVector<CollisionBorder> Load_CollisionBorderArray(QDataStream *aStream, int count);
|
||||
CLeafBrushNodeChildren Load_cLeafBrushNodeChildren_t(QDataStream *aStream);
|
||||
QVector<CLeaf> Load_cLeaf_tArray(QDataStream *aStream, int count);
|
||||
QVector<DynEntityClient> Load_DynEntityClientArray(QDataStream *aStream, int count);
|
||||
QVector<DynEntityPose> Load_DynEntityPoseArray(QDataStream *aStream, int count);
|
||||
QVector<DynEntityColl> Load_DynEntityCollArray(QDataStream *aStream, int count);
|
||||
QVector<FxTrailVertex> Load_FxTrailVertexArray(QDataStream *aStream, int count);
|
||||
QVector<FxElemVelStateSample> Load_FxElemVelStateSampleArray(QDataStream *aStream, int count);
|
||||
QVector<FxElemVisStateSample> Load_FxElemVisStateSampleArray(QDataStream *aStream, int count);
|
||||
QVector<PathBaseNode> Load_pathbasenode_tArray(QDataStream *aStream, int count);
|
||||
QVector<PathLink> Load_pathlink_tArray(QDataStream *aStream, int count);
|
||||
QVector<XModelHighMipBounds> Load_XModelHighMipBoundsArray(QDataStream *aStream, int count);
|
||||
XModelCollSurf Load_XModelCollSurf(QDataStream *aStream);
|
||||
quint8 Load_cbrushedge_t(QDataStream *aStream);
|
||||
QVector<quint8> Load_cbrushedge_tArray(QDataStream *aStream, size_t count);
|
||||
CPlane Load_cplane_t(QDataStream *aStream);
|
||||
CPlane Load_CPlane(QDataStream *aStream);
|
||||
QVector<CPlane> Load_cplane_tArray(QDataStream *aStream, int count);
|
||||
QVector<MaterialConstantDef> Load_MaterialConstantDefArray(QDataStream *aStream, int count);
|
||||
QVector<GfxStateBits> Load_GfxStateBitsArray(QDataStream *aStream, int count);
|
||||
MaterialArgumentCodeConst Load_MaterialArgumentCodeConst(QDataStream *aStream);
|
||||
MaterialVertexDeclaration Load_MaterialVertexDeclaration(QDataStream *aStream);
|
||||
QVector<quint8> Load_byteShaderArray(QDataStream *aStream, size_t count);
|
||||
QVector<quint8> Load_byte4Array(QDataStream *aStream, size_t count);
|
||||
QVector<GfxTexture> Load_GfxRawTextureArray(QDataStream *aStream, int count);
|
||||
D3DCubeTexture Load_IDirect3DCubeTexture9(QDataStream *aStream);
|
||||
D3DVolumeTexture Load_IDirect3DVolumeTexture9(QDataStream *aStream);
|
||||
D3DTexture Load_IDirect3DTexture9(QDataStream *aStream);
|
||||
QVector<quint16> Load_r_index16_tArray(QDataStream *aStream, int count);
|
||||
QVector<quint16> Load_r_index_tArray(QDataStream *aStream, int count);
|
||||
D3DIndexBuffer Load_GfxIndexBuffer(QDataStream *aStream);
|
||||
QVector<quint16> Load_XBlendInfoArray(QDataStream *aStream, int count);
|
||||
D3DVertexBuffer Load_GfxVertexBuffer(QDataStream *aStream);
|
||||
QVector<XSurfaceCollisionNode> Load_XSurfaceCollisionNodeArray(QDataStream *aStream, int count);
|
||||
QVector<XSurfaceCollisionLeaf> Load_XSurfaceCollisionLeafArray(QDataStream *aStream, int count);
|
||||
QVector<GfxBrushModel> Load_GfxBrushModelArray(QDataStream *aStream, int count);
|
||||
QVector<GfxPackedVertex> Load_GfxPackedVertex0Array(QDataStream *aStream, int count);
|
||||
void Load_GfxWorldVertex0Array(QDataStream *aStream, int count);
|
||||
QVector<XAUDIOCHANNELMAPENTRY> Load_XAUDIOCHANNELMAPENTRYArray(QDataStream *aStream, int count);
|
||||
StreamFileNamePacked Load_StreamFileNamePacked(QDataStream *aStream);
|
||||
QVector<XAudioReverbSettings> Load_XaReverbSettingsArray(QDataStream *aStream, int count);
|
||||
QVector<char> Load_char2048Array(QDataStream *aStream, size_t count);
|
||||
QVector<DObjAnimMat> Load_DObjAnimMatArray(QDataStream *aStream, int count);
|
||||
QVector<XBoneInfo> Load_XBoneInfoArray(QDataStream *aStream, int count);
|
||||
QVector<QVector<quint16>> Load_UShortVecArray(QDataStream *aStream, int count);
|
||||
QVector<QVector<quint8>> Load_ByteVecArray(QDataStream *aStream, int count);
|
||||
QVector<dmaterial_t> Load_dmaterial_tArray(QDataStream *aStream, int count);
|
||||
QVector<const char> Load_ConstCharArray(QDataStream *aStream, size_t count);
|
||||
quint16 Load_ScriptString(QDataStream *aStream);
|
||||
QVector<quint16> Load_UnsignedShortArray(QDataStream *aStream, int count);
|
||||
QVector<qint16> Load_XQuat2(QDataStream *aStream);
|
||||
QVector<QVector<quint16>> Load_XQuat2Array(QDataStream *aStream, int count);
|
||||
QVector<ushort> Load_ushortArray(QDataStream *aStream, int count);
|
||||
QVector<short> Load_shortArray(QDataStream *aStream, int count);
|
||||
QVector<float> Load_vec3_t(QDataStream *aStream);
|
||||
QVector<QVector<float>> Load_vec3_tArray(QDataStream *aStream, int count);
|
||||
QVector<QVector<float>> Load_vec2_tArray(QDataStream *aStream, int count);
|
||||
QVector<quint16> Load_raw_byte16Array(QDataStream *aStream, size_t count);
|
||||
QVector<quint8> Load_raw_byteArray(QDataStream *aStream, size_t count);
|
||||
QVector<uint> Load_raw_uint128Array(QDataStream *aStream, int count);
|
||||
QVector<uint> Load_raw_uintArray(QDataStream *aStream, int count);
|
||||
float Load_float(QDataStream *aStream);
|
||||
QVector<float> Load_floatArray(QDataStream *aStream, int count);
|
||||
uint Load_uint(QDataStream *aStream);
|
||||
QVector<uint> Load_uintArray(QDataStream *aStream, int count);
|
||||
QVector<_DWORD> Load_DWORDArray(QDataStream *aStream, int count);
|
||||
QVector<quint8> Load_byte4096Array(QDataStream *aStream, size_t count);
|
||||
int Load_int(QDataStream *aStream);
|
||||
QVector<int> Load_intArray(QDataStream *aStream, int count);
|
||||
char Load_char(QDataStream *aStream);
|
||||
QVector<char> Load_charArray(QDataStream *aStream, size_t count);
|
||||
QVector<quint8> Load_byteArray(QDataStream *aStream, size_t count);
|
||||
GfxWorldDpvsPlanes Load_GfxWorldDpvsPlanes(QDataStream *aStream, GfxWorld aGfxWorld);
|
||||
GfxWorldDpvsDynamic Load_GfxWorldDpvsDynamic(QDataStream *aStream, GfxWorld aGfxWorld);
|
||||
GfxLightRegionHull Load_GfxLightRegionHull(QDataStream *aStream);
|
||||
quint16 __ROL4__(quint16 value, quint16 bits);
|
||||
GfxShadowGeometry Load_GfxShadowGeometry(QDataStream *aStream);
|
||||
GfxWorldStreamInfo Load_GfxWorldStreamInfo(QDataStream *aStream);
|
||||
GfxLightGrid Load_GfxLightGrid(QDataStream *aStream);
|
||||
GfxWorldVertexLayerData Load_GfxWorldVertexLayerData(QDataStream *aStream, GfxWorld aGfxWorld);
|
||||
GfxWorldVertexData Load_GfxWorldVertexData(QDataStream *aStream, GfxWorld aGfxWorld);
|
||||
GfxAabbTree Load_GfxAabbTree(QDataStream *aStream);
|
||||
QVector<GfxAabbTree> Load_GfxAabbTreeArray(QDataStream *aStream, int count);
|
||||
GfxCell Load_GfxCell(QDataStream *aStream);
|
||||
GfxPortal Load_GfxPortal(QDataStream *aStream);
|
||||
QVector<GfxPortal> Load_GfxPortalArray(QDataStream *aStream, int count);
|
||||
QString Load_XStringCustom(QDataStream *aStream);
|
||||
QString Load_XString(QDataStream *aStream);
|
||||
RawFile Load_RawFile(QDataStream *aStream);
|
||||
XLocalizeEntry Load_LocalizeEntry(QDataStream *aStream);
|
||||
void Load_operandInternalDataUnion(QDataStream *aStream);
|
||||
XComPrimaryLight Load_ComPrimaryLight(QDataStream *aStream);
|
||||
CollisionPartition Load_CollisionPartition(QDataStream *aStream);
|
||||
CLeafBrushNodeLeaf Load_CLeafBrushNodeLeaf(QDataStream *aStream, int leafBrushCount);
|
||||
CLeafBrushNodeData Load_CLeafBrushNodeData(QDataStream *aStream, int aNodeCount);
|
||||
MapEnts Load_MapEnts(QDataStream *aStream);
|
||||
FxTrailDef Load_FxTrailDef(QDataStream *aStream);
|
||||
FxEffectDefRef Load_FxEffectDefRef(QDataStream *aStream);
|
||||
GameWorldMp Load_GameWorldMp(QDataStream *aStream);
|
||||
QVector<PathNodeTree> LoadPathNodeTreeArray(QDataStream *aStream, int count);
|
||||
PathNodeTreeNodes Load_PathNodeTreeNodes(QDataStream *aStream);
|
||||
PathNodeConstant Load_PathNodeConstant(QDataStream *aStream);
|
||||
QVector<XModelCollSurf> Load_XModelCollSurfArray(QDataStream *aStream, int count);
|
||||
PhysPreset Load_PhysPreset(QDataStream *aStream);
|
||||
MaterialArgumentDef Load_MaterialArgumentDef(QDataStream *aStream, MaterialShaderArgument aArgument);
|
||||
GfxPixelShaderLoadDef Load_GfxPixelShaderLoadDef(QDataStream *aStream);
|
||||
GfxVertexShaderLoadDef Load_GfxVertexShaderLoadDef(QDataStream *aStream);
|
||||
QVector<quint8> Load_GfxImagePixels(QDataStream *aStream, GfxImage aGfxImage);
|
||||
GfxTexture Load_GfxTexture(QDataStream *aStream, GfxTexture aGfxTexture, GfxImageLoadDef aGfxImageLoadDef);
|
||||
XSurfaceVertexInfo Load_XSurfaceVertexInfo(QDataStream *aStream);
|
||||
XSurfaceCollisionTree Load_XSurfaceCollisionTree(QDataStream *aStream);
|
||||
MaterialInfo Load_MaterialInfo(QDataStream *aStream);
|
||||
XAUDIOCHANNELMAP Load_XAUDIOCHANNELMAP(QDataStream *aStream);
|
||||
SndCurve Load_SndCurve(QDataStream *aStream);
|
||||
StreamFileNameRaw Load_StreamFileNameRaw(QDataStream *aStream);
|
||||
XSoundDriverGlobals Load_SndDriverGlobals(QDataStream *aStream);
|
||||
XaSeekTable Load_XaSeekTable(QDataStream *aStream);
|
||||
XAUDIOPACKET_ALIGNED Load_XAUDIOPACKET_ALIGNED(QDataStream *aStream);
|
||||
XAnimNotifyInfo Load_XAnimNotifyInfo(QDataStream *aStream);
|
||||
XAnimDynamicFrames Load_XAnimDynamicFrames(QDataStream *aStream, XAnimPartTrans aXAnimPartTrans, XAnimDynamicIndices aXAnimDynamicIndices, XAnimDynamicFrames aXAnimDynamicFrames);
|
||||
XAnimDynamicIndices Load_XAnimDynamicIndicesTrans(QDataStream *aStream, XAnimParts aXAnimParts, XAnimPartTrans aXAnimPartTrans);
|
||||
XAnimDynamicIndices Load_XAnimDynamicIndicesDeltaQuat(QDataStream *aStream);
|
||||
XAnimIndices Load_XAnimIndices(QDataStream *aStream, XAnimParts aXAnimParts, XAnimIndices aXAnimIndices);
|
||||
QStringList Load_XStringArray(QDataStream *aStream, int count);
|
||||
QVector<quint16> Load_ScriptStringArray(QDataStream *aStream, int count);
|
||||
QVector<GfxLightRegionHull> Load_GfxLightRegionHullArray(QDataStream *aStream, int count);
|
||||
QVector<GfxShadowGeometry> Load_GfxShadowGeometryArray(QDataStream *aStream, int count);
|
||||
StringTable Load_StringTable(QDataStream *aStream);
|
||||
RawFile Load_RawFilePtr(QDataStream *aStream);
|
||||
void Load_LocalizeEntryPtr(QDataStream *aStream);
|
||||
XMultiDef Load_MultiDef(QDataStream *aStream);
|
||||
XOperand Load_Operand(QDataStream *aStream);
|
||||
QVector<XComPrimaryLight> Load_ComPrimaryLightArray(QDataStream *aStream, int count);
|
||||
CBrushSide Load_cbrushside_t(QDataStream *aStream);
|
||||
CBrush Load_CBrush(QDataStream *aStream);
|
||||
QVector<CollisionPartition> Load_CollisionPartitionArray(QDataStream *aStream, int count);
|
||||
CLeafBrushNode Load_CLeafBrushNode(QDataStream *aStream);
|
||||
QVector<cNode_t> Load_cNode_tArray(QDataStream *aStream, int count);
|
||||
void Load_MapEntsPtr(QDataStream *aStream);
|
||||
void Load_GameWorldMpPtr(QDataStream *aStream);
|
||||
void Load_pathnode_tree_info_t(QDataStream *aStream);
|
||||
void Load_pathnode_t(QDataStream *aStream);
|
||||
void Load_cbrushside_tArray(QDataStream *aStream, int count);
|
||||
void Load_PhysPresetPtr(QDataStream *aStream);
|
||||
MaterialShaderArgument Load_MaterialShaderArgument(QDataStream *aStream);
|
||||
MaterialPixelShaderProgram Load_MaterialPixelShaderProgram(QDataStream *aStream);
|
||||
void Load_MaterialVertexShaderProgram(QDataStream *aStream);
|
||||
GfxImageLoadDef Load_GfxImageLoadDef(QDataStream *aStream);
|
||||
GfxTexture Load_GfxTextureLoad(QDataStream *aStream);
|
||||
XRigidVertList Load_XRigidVertList(QDataStream *aStream);
|
||||
void Load_snd_alias_list_name(QDataStream *aStream);
|
||||
QVector<XAUDIOCHANNELMAP> Load_XAUDIOCHANNELMAPArray(QDataStream *aStream, int count);
|
||||
SndCurve Load_SndCurvePtr(QDataStream *aStream);
|
||||
void Load_StreamFileInfo(QDataStream *aStream);
|
||||
void Load_SndDriverGlobalsPtr(QDataStream *aStream);
|
||||
XaSound Load_XaSound(QDataStream *aStream);
|
||||
QVector<XAnimNotifyInfo> Load_XAnimNotifyInfoArray(QDataStream *aStream, int count);
|
||||
void Load_XAnimPartTransFrames(QDataStream *aStream);
|
||||
void Load_XAnimDeltaPartQuatDataFrames(QDataStream *aStream);
|
||||
void Load_TempStringArray(QDataStream *aStream, int count);
|
||||
GfxLightRegion Load_GfxLightRegion(QDataStream *aStream);
|
||||
StringTable Load_StringTablePtr(QDataStream *aStream);
|
||||
void Load_entryInternalData(QDataStream *aStream);
|
||||
ComWorld Load_ComWorld(QDataStream *aStream);
|
||||
QVector<CBrush> Load_cbrush_tArray(QDataStream *aStream, int count);
|
||||
QVector<CLeafBrushNode> Load_cLeafBrushNode_tArray(QDataStream *aStream, int count);
|
||||
PathNodeTree Load_PathNodeTree(QDataStream *aStream);
|
||||
void Load_pathnode_tArray(QDataStream *aStream, int count);
|
||||
BrushWrapper Load_BrushWrapper(QDataStream *aStream);
|
||||
void Load_MaterialShaderArgumentArray(QDataStream *aStream, int count);
|
||||
MaterialPixelShader Load_MaterialPixelShader(QDataStream *aStream);
|
||||
void Load_MaterialVertexShader(QDataStream *aStream);
|
||||
GfxImage Load_GfxImage(QDataStream *aStream);
|
||||
void Load_XRigidVertListArray(QDataStream *aStream, int count);
|
||||
void Load_snd_alias_list_nameArray(QDataStream *aStream, int count);
|
||||
void Load_SpeakerMapChannel(QDataStream *aStream);
|
||||
void Load_LoadedSound(QDataStream *aStream);
|
||||
void Load_StreamFileName(QDataStream *aStream);
|
||||
void Load_XAnimPartTransData(QDataStream *aStream);
|
||||
void Load_XAnimDeltaPartQuatData(QDataStream *aStream);
|
||||
void Load_ScriptStringList(QDataStream *aStream);
|
||||
void Load_GfxLightRegionArray(QDataStream *aStream, int count);
|
||||
void Load_GfxCellArray(QDataStream *aStream, int count);
|
||||
void Load_expressionEntry(QDataStream *aStream);
|
||||
void Load_ComWorldPtr(QDataStream *aStream);
|
||||
void Load_pathnode_tree_tArray(QDataStream *aStream, int count);
|
||||
void Load_MaterialPixelShaderPtr(QDataStream *aStream);
|
||||
void Load_GfxImagePtr(QDataStream *aStream);
|
||||
void Load_XSurface(QDataStream *aStream);
|
||||
void Load_SpeakerMapChannelArray(QDataStream *aStream, int count);
|
||||
void Load_StreamedSound(QDataStream *aStream);
|
||||
void Load_LoadedSoundPtr(QDataStream *aStream);
|
||||
void Load_XAnimPartTrans(QDataStream *aStream);
|
||||
void Load_XAnimDeltaPartQuat(QDataStream *aStream);
|
||||
void Load_GfxReflectionProbe(QDataStream *aStream);
|
||||
void Load_PathData(QDataStream *aStream);
|
||||
void Load_PhysGeomInfoArray(QDataStream *aStream, int count);
|
||||
void Load_GfxLightmapArray(QDataStream *aStream);
|
||||
void Load_GfxLightImage(QDataStream *aStream);
|
||||
void Load_MaterialVertexShaderPtrArray(QDataStream *aStream, int count);
|
||||
void Load_water_t(QDataStream *aStream);
|
||||
void Load_XSurfaceArray(QDataStream *aStream, int count);
|
||||
void Load_SpeakerMap(QDataStream *aStream);
|
||||
void Load_SoundFileRef(QDataStream *aStream);
|
||||
void Load_XAnimDeltaPart(QDataStream *aStream);
|
||||
void Load_GfxReflectionProbeArray(QDataStream *aStream, int count);
|
||||
void Load_expressionEntry_ptrArray(QDataStream *aStream, int count);
|
||||
void Load_GameWorldSp(QDataStream *aStream);
|
||||
void Load_PhysGeomList(QDataStream *aStream);
|
||||
void Load_GfxLightmapArrayArray(QDataStream *aStream, int count);
|
||||
void Load_GfxLightDef(QDataStream *aStream);
|
||||
void Load_MaterialTextureDefInfo(QDataStream *aStream);
|
||||
void Load_MaterialPass(QDataStream *aStream);
|
||||
void Load_SoundFile(QDataStream *aStream);
|
||||
void Load_XAnimParts(QDataStream *aStream);
|
||||
void Load_statement(QDataStream *aStream);
|
||||
void Load_GameWorldSpPtr(QDataStream *aStream);
|
||||
void Load_GfxLightDefPtr(QDataStream *aStream);
|
||||
void Load_MaterialTextureDef(QDataStream *aStream);
|
||||
void Load_MaterialPassArray(QDataStream *aStream, int count);
|
||||
void Load_snd_alias_t(QDataStream *aStream);
|
||||
void Load_XAnimPartsPtr(QDataStream *aStream);
|
||||
void Load_GfxLight(QDataStream *aStream);
|
||||
void Load_MaterialTextureDefArray(QDataStream *aStream, int count);
|
||||
void Load_MaterialTechnique(QDataStream *aStream);
|
||||
void Load_snd_alias_tArray(QDataStream *aStream, int count);
|
||||
void Load_snd_alias_list_t(QDataStream *aStream);
|
||||
void Load_MaterialTechniquePtrArray(QDataStream *aStream, int count);
|
||||
void Load_snd_alias_list_ptr(QDataStream *aStream);
|
||||
void Load_MaterialTechniqueSet(QDataStream *aStream);
|
||||
void Load_MaterialTechniqueSetPtr(QDataStream *aStream);
|
||||
void Load_Material(QDataStream *aStream);
|
||||
void Load_MaterialHandle(QDataStream *aStream);
|
||||
void Load_Font(QDataStream *aStream);
|
||||
void Load_MaterialMemory(QDataStream *aStream);
|
||||
void Load_sunflare_t(QDataStream *aStream);
|
||||
void Load_windowDef_t(QDataStream *aStream);
|
||||
void Load_listBoxDef_t(QDataStream *aStream);
|
||||
void Load_GfxSurface(QDataStream *aStream);
|
||||
void Load_MaterialHandleArray(QDataStream *aStream, int count);
|
||||
void Load_FontHandle(QDataStream *aStream);
|
||||
void Load_MaterialMemoryArray(QDataStream *aStream, int count);
|
||||
void Load_Window(QDataStream *aStream);
|
||||
void Load_FxElemMarkVisuals(QDataStream *aStream);
|
||||
void Load_XModel(QDataStream *aStream);
|
||||
void Load_GfxSurfaceArray(QDataStream *aStream, int count);
|
||||
void Load_itemDefData_t(QDataStream *aStream);
|
||||
void Load_FxElemMarkVisualsArray(QDataStream *aStream, int count);
|
||||
void Load_XModelPtr(QDataStream *aStream);
|
||||
void Load_GfxStaticModelDrawInst(QDataStream *aStream);
|
||||
void Load_itemDef_t(QDataStream *aStream);
|
||||
void Load_cStaticModel_t(QDataStream *aStream);
|
||||
void Load_FxElemVisuals(QDataStream *aStream);
|
||||
void Load_XModelPiece(QDataStream *aStream);
|
||||
};
|
||||
|
||||
#endif // ASSETS_H
|
||||
|
||||
@ -1 +0,0 @@
|
||||
#include "clipmap.h"
|
||||
@ -1,233 +0,0 @@
|
||||
#ifndef CLIPMAP_H
|
||||
#define CLIPMAP_H
|
||||
|
||||
#include "xmodel.h"
|
||||
#include "mapent.h"
|
||||
#include "effectdef.h"
|
||||
|
||||
struct cStaticModelWritable
|
||||
{
|
||||
unsigned __int16 nextModelInWorldSector;
|
||||
};
|
||||
|
||||
struct cStaticModel_s
|
||||
{
|
||||
cStaticModelWritable writable;
|
||||
Model *xmodel;
|
||||
float origin[3];
|
||||
float invScaledAxis[3][3];
|
||||
float absmin[3];
|
||||
float absmax[3];
|
||||
};
|
||||
|
||||
struct dmaterial_t
|
||||
{
|
||||
char material[64];
|
||||
int surfaceFlags;
|
||||
int contentFlags;
|
||||
};
|
||||
|
||||
struct cNode_t
|
||||
{
|
||||
CPlane *plane;
|
||||
__int16 children[2];
|
||||
};
|
||||
|
||||
struct CLeaf
|
||||
{
|
||||
unsigned __int16 firstCollAabbIndex;
|
||||
unsigned __int16 collAabbCount;
|
||||
int brushContents;
|
||||
int terrainContents;
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
int leafBrushNode;
|
||||
__int16 cluster;
|
||||
};
|
||||
|
||||
struct CLeafBrushNodeLeaf
|
||||
{
|
||||
unsigned __int16 *brushes;
|
||||
};
|
||||
|
||||
struct CLeafBrushNodeChildren
|
||||
{
|
||||
float dist;
|
||||
float range;
|
||||
unsigned __int16 childOffset[2];
|
||||
};
|
||||
|
||||
union CLeafBrushNodeData
|
||||
{
|
||||
CLeafBrushNodeLeaf leaf;
|
||||
CLeafBrushNodeChildren children;
|
||||
};
|
||||
|
||||
struct CLeafBrushNode
|
||||
{
|
||||
unsigned __int8 axis;
|
||||
__int16 leafBrushCount;
|
||||
int contents;
|
||||
CLeafBrushNodeData data;
|
||||
};
|
||||
|
||||
struct CollisionBorder
|
||||
{
|
||||
float distEq[3];
|
||||
float zBase;
|
||||
float zSlope;
|
||||
float start;
|
||||
float length;
|
||||
};
|
||||
|
||||
struct CollisionPartition
|
||||
{
|
||||
unsigned __int8 triCount;
|
||||
unsigned __int8 borderCount;
|
||||
int firstTri;
|
||||
CollisionBorder *borders;
|
||||
};
|
||||
|
||||
union CollisionAabbTreeIndex
|
||||
{
|
||||
int firstChildIndex;
|
||||
int partitionIndex;
|
||||
};
|
||||
|
||||
struct CollisionAabbTree
|
||||
{
|
||||
float origin[3];
|
||||
float halfSize[3];
|
||||
unsigned __int16 materialIndex;
|
||||
unsigned __int16 childCount;
|
||||
CollisionAabbTreeIndex u;
|
||||
};
|
||||
|
||||
struct CModel
|
||||
{
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
float radius;
|
||||
CLeaf leaf;
|
||||
};
|
||||
|
||||
struct __declspec(align(16)) CBrush
|
||||
{
|
||||
float mins[3];
|
||||
int contents;
|
||||
float maxs[3];
|
||||
unsigned int numsides;
|
||||
CBrushSide *sides;
|
||||
__int16 axialMaterialNum[2][3];
|
||||
unsigned __int8 *baseAdjacentSide;
|
||||
__int16 firstAdjacentSideOffsets[2][3];
|
||||
unsigned __int8 edgeCount[2][3];
|
||||
};
|
||||
|
||||
enum DynEntityType : __int32
|
||||
{
|
||||
DYNENT_TYPE_INVALID = 0x0,
|
||||
DYNENT_TYPE_CLUTTER = 0x1,
|
||||
DYNENT_TYPE_DESTRUCT = 0x2,
|
||||
DYNENT_TYPE_COUNT = 0x3,
|
||||
};
|
||||
|
||||
struct GfxPlacement
|
||||
{
|
||||
float quat[4];
|
||||
float origin[3];
|
||||
};
|
||||
|
||||
struct XModelPieces;
|
||||
struct DynEntityDef
|
||||
{
|
||||
DynEntityType type;
|
||||
GfxPlacement pose;
|
||||
Model *xModel;
|
||||
unsigned __int16 brushModel;
|
||||
unsigned __int16 physicsBrushModel;
|
||||
const EffectDef *destroyFx;
|
||||
XModelPieces *destroyPieces;
|
||||
PhysPreset *physPreset;
|
||||
int health;
|
||||
PhysMass mass;
|
||||
int contents;
|
||||
};
|
||||
|
||||
struct DynEntityPose
|
||||
{
|
||||
GfxPlacement pose;
|
||||
float radius;
|
||||
};
|
||||
|
||||
struct DynEntityClient
|
||||
{
|
||||
int physObjId;
|
||||
unsigned __int16 flags;
|
||||
unsigned __int16 lightingHandle;
|
||||
int health;
|
||||
};
|
||||
|
||||
struct DynEntityColl
|
||||
{
|
||||
unsigned __int16 sector;
|
||||
unsigned __int16 nextEntInSector;
|
||||
float linkMins[2];
|
||||
float linkMaxs[2];
|
||||
};
|
||||
|
||||
struct ClipMap
|
||||
{
|
||||
const char *name;
|
||||
int isInUse;
|
||||
int planeCount;
|
||||
CPlane *planes;
|
||||
unsigned int numStaticModels;
|
||||
cStaticModel_s *staticModelList;
|
||||
unsigned int numMaterials;
|
||||
dmaterial_t *materials;
|
||||
unsigned int numBrushSides;
|
||||
CBrushSide *brushsides;
|
||||
unsigned int numBrushEdges;
|
||||
unsigned __int8 *brushEdges;
|
||||
unsigned int numNodes;
|
||||
cNode_t *nodes;
|
||||
unsigned int numLeafs;
|
||||
CLeaf *leafs;
|
||||
unsigned int leafbrushNodesCount;
|
||||
CLeafBrushNode *leafbrushNodes;
|
||||
unsigned int numLeafBrushes;
|
||||
unsigned __int16 *leafbrushes;
|
||||
unsigned int numLeafSurfaces;
|
||||
unsigned int *leafsurfaces;
|
||||
unsigned int vertCount;
|
||||
float (*verts)[3];
|
||||
int triCount;
|
||||
unsigned __int16 *triIndices;
|
||||
unsigned __int8 *triEdgeIsWalkable;
|
||||
int borderCount;
|
||||
CollisionBorder *borders;
|
||||
int partitionCount;
|
||||
CollisionPartition *partitions;
|
||||
int aabbTreeCount;
|
||||
CollisionAabbTree *aabbTrees;
|
||||
unsigned int numSubModels;
|
||||
CModel *cmodels;
|
||||
unsigned __int16 numBrushes;
|
||||
CBrush *brushes;
|
||||
int numClusters;
|
||||
int clusterBytes;
|
||||
unsigned __int8 *visibility;
|
||||
int vised;
|
||||
MapEnts *mapEnts;
|
||||
CBrush *box_brush;
|
||||
CModel box_model;
|
||||
unsigned __int16 dynEntCount[2];
|
||||
DynEntityDef *dynEntDefList[2];
|
||||
DynEntityPose *dynEntPoseList[2];
|
||||
DynEntityClient *dynEntClientList[2];
|
||||
DynEntityColl *dynEntCollList[2];
|
||||
unsigned int checksum;
|
||||
};
|
||||
|
||||
#endif // CLIPMAP_H
|
||||
@ -1,203 +0,0 @@
|
||||
#ifndef EFFECTDEF_H
|
||||
#define EFFECTDEF_H
|
||||
|
||||
#include "material.h"
|
||||
#include "xmodel.h"
|
||||
|
||||
struct FxSpawnDefLooping
|
||||
{
|
||||
int intervalMsec;
|
||||
int count;
|
||||
};
|
||||
|
||||
struct FxIntRange
|
||||
{
|
||||
int base;
|
||||
int amplitude;
|
||||
};
|
||||
|
||||
struct FxSpawnDefOneShot
|
||||
{
|
||||
FxIntRange count;
|
||||
};
|
||||
|
||||
union FxSpawnDef
|
||||
{
|
||||
FxSpawnDefLooping looping;
|
||||
FxSpawnDefOneShot oneShot;
|
||||
};
|
||||
|
||||
struct FxFloatRange
|
||||
{
|
||||
float base;
|
||||
float amplitude;
|
||||
};
|
||||
|
||||
struct FxElemAtlas
|
||||
{
|
||||
unsigned __int8 behavior;
|
||||
unsigned __int8 index;
|
||||
unsigned __int8 fps;
|
||||
unsigned __int8 loopCount;
|
||||
unsigned __int8 colIndexBits;
|
||||
unsigned __int8 rowIndexBits;
|
||||
__int16 entryCount;
|
||||
};
|
||||
|
||||
struct FxElemVec3Range
|
||||
{
|
||||
float base[3];
|
||||
float amplitude[3];
|
||||
};
|
||||
|
||||
struct FxElemVelStateInFrame
|
||||
{
|
||||
FxElemVec3Range velocity;
|
||||
FxElemVec3Range totalDelta;
|
||||
};
|
||||
|
||||
struct FxElemVelStateSample
|
||||
{
|
||||
FxElemVelStateInFrame local;
|
||||
FxElemVelStateInFrame world;
|
||||
};
|
||||
|
||||
struct FxElemVisualState
|
||||
{
|
||||
unsigned __int8 color[4];
|
||||
float rotationDelta;
|
||||
float rotationTotal;
|
||||
float size[2];
|
||||
float scale;
|
||||
};
|
||||
|
||||
struct FxElemVisStateSample
|
||||
{
|
||||
FxElemVisualState base;
|
||||
FxElemVisualState amplitude;
|
||||
};
|
||||
|
||||
struct FxElemMarkVisuals
|
||||
{
|
||||
qint32 materialPtrs[2];
|
||||
QVector<Material> materials;
|
||||
};
|
||||
|
||||
struct EffectDef;
|
||||
union EffectDefRef
|
||||
{
|
||||
qint32 handlePtr;
|
||||
const EffectDef *handle;
|
||||
|
||||
qint32 namePtr;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
union FxElemVisuals
|
||||
{
|
||||
qint32 anonymousPtr;
|
||||
const void *anonymous;
|
||||
|
||||
qint32 materialPtr;
|
||||
Material *material;
|
||||
|
||||
qint32 modelPtr;
|
||||
Model *model;
|
||||
|
||||
EffectDefRef effectDef;
|
||||
|
||||
qint32 soundNamePtr;
|
||||
const char *soundName;
|
||||
};
|
||||
|
||||
struct FxElemDefVisuals
|
||||
{
|
||||
qint32 markArrayPtr;
|
||||
QVector<FxElemMarkVisuals> markArray;
|
||||
|
||||
qint32 arrayPtr;
|
||||
QVector<FxElemVisuals> array;
|
||||
|
||||
FxElemVisuals instance;
|
||||
};
|
||||
|
||||
struct FxTrailVertex
|
||||
{
|
||||
float pos[2];
|
||||
float normal[2];
|
||||
float texCoord;
|
||||
};
|
||||
|
||||
struct FxTrailDef
|
||||
{
|
||||
int scrollTimeMsec;
|
||||
int repeatDist;
|
||||
int splitDist;
|
||||
int vertCount;
|
||||
FxTrailVertex *verts;
|
||||
int indCount;
|
||||
unsigned __int16 *inds;
|
||||
};
|
||||
|
||||
struct FxElemDef
|
||||
{
|
||||
int flags;
|
||||
FxSpawnDef spawn;
|
||||
FxFloatRange spawnRange;
|
||||
FxFloatRange fadeInRange;
|
||||
FxFloatRange fadeOutRange;
|
||||
float spawnFrustumCullRadius;
|
||||
FxIntRange spawnDelayMsec;
|
||||
FxIntRange lifeSpanMsec;
|
||||
FxFloatRange spawnOrigin[3];
|
||||
FxFloatRange spawnOffsetRadius;
|
||||
FxFloatRange spawnOffsetHeight;
|
||||
FxFloatRange spawnAngles[3];
|
||||
FxFloatRange angularVelocity[3];
|
||||
FxFloatRange initialRotation;
|
||||
FxFloatRange gravity;
|
||||
FxFloatRange reflectionFactor;
|
||||
FxElemAtlas atlas;
|
||||
unsigned __int8 elemType;
|
||||
unsigned __int8 visualCount;
|
||||
unsigned __int8 velIntervalCount;
|
||||
unsigned __int8 visStateIntervalCount;
|
||||
qint32 velSamplesPtr;
|
||||
QVector<FxElemVelStateSample> velSamples;
|
||||
qint32 visSamplesPtr;
|
||||
QVector<FxElemVisStateSample> visSamples;
|
||||
FxElemDefVisuals visuals;
|
||||
float collMins[3];
|
||||
float collMaxs[3];
|
||||
EffectDefRef effectOnImpact;
|
||||
EffectDefRef effectOnDeath;
|
||||
EffectDefRef effectEmitted;
|
||||
FxFloatRange emitDist;
|
||||
FxFloatRange emitDistVariance;
|
||||
|
||||
qint32 trailDefPtr;
|
||||
FxTrailDef *trailDef;
|
||||
|
||||
unsigned __int8 sortOrder;
|
||||
unsigned __int8 lightingFrac;
|
||||
unsigned __int8 useItemClip;
|
||||
unsigned __int8 unused[1];
|
||||
};
|
||||
|
||||
struct EffectDef
|
||||
{
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
|
||||
int flags;
|
||||
int totalSize;
|
||||
int msecLoopingLife;
|
||||
int elemDefCountLooping;
|
||||
int elemDefCountOneShot;
|
||||
int elemDefCountEmission;
|
||||
|
||||
qint32 elemDefsPtr;
|
||||
QVector<FxElemDef> elemDefs;
|
||||
};
|
||||
|
||||
#endif // EFFECTDEF_H
|
||||
@ -1 +0,0 @@
|
||||
#include "effecttable.h"
|
||||
@ -1,24 +0,0 @@
|
||||
#ifndef EFFECTTABLE_H
|
||||
#define EFFECTTABLE_H
|
||||
|
||||
#include "effectdef.h"
|
||||
|
||||
struct FxImpactEntry
|
||||
{
|
||||
QVector<qint32> nonFleshPtrs;
|
||||
QVector<EffectDef> nonFlesh;
|
||||
|
||||
QVector<qint32> fleshPtrs;
|
||||
QVector<EffectDef> flesh;
|
||||
};
|
||||
|
||||
struct ImpactTable
|
||||
{
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
|
||||
qint32 tablePtr;
|
||||
QVector<FxImpactEntry> table;
|
||||
};
|
||||
|
||||
#endif // EFFECTTABLE_H
|
||||
@ -1 +0,0 @@
|
||||
#include "file.h"
|
||||
@ -1,13 +0,0 @@
|
||||
#ifndef FILE_H
|
||||
#define FILE_H
|
||||
|
||||
#include <QtTypes>
|
||||
|
||||
struct XFile
|
||||
{
|
||||
quint32 size;
|
||||
quint32 externalSize;
|
||||
quint32 blockSize[7];
|
||||
};
|
||||
|
||||
#endif // FILE_H
|
||||
@ -5,81 +5,12 @@
|
||||
#include "gfxlightdef.h"
|
||||
#include "xmodel.h"
|
||||
|
||||
struct GfxStreamingAabbTree
|
||||
{
|
||||
unsigned __int16 firstItem;
|
||||
unsigned __int16 itemCount;
|
||||
unsigned __int16 firstChild;
|
||||
unsigned __int16 childCount;
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
};
|
||||
|
||||
struct GfxWorldStreamInfo
|
||||
{
|
||||
int aabbTreeCount;
|
||||
GfxStreamingAabbTree *aabbTrees;
|
||||
int leafRefCount;
|
||||
int *leafRefs;
|
||||
};
|
||||
|
||||
struct GfxWorldVertex
|
||||
{
|
||||
float xyz[3];
|
||||
float binormalSign;
|
||||
GfxColor color;
|
||||
float texCoord[2];
|
||||
float lmapCoord[2];
|
||||
PackedUnitVec normal;
|
||||
PackedUnitVec tangent;
|
||||
};
|
||||
|
||||
struct GfxWorldVertexData
|
||||
{
|
||||
GfxWorldVertex *vertices;
|
||||
D3DVertexBuffer worldVb;
|
||||
};
|
||||
|
||||
struct GfxWorldVertexLayerData
|
||||
{
|
||||
unsigned __int8 *data;
|
||||
D3DVertexBuffer layerVb;
|
||||
};
|
||||
|
||||
struct SunLightParseParams
|
||||
{
|
||||
char name[64];
|
||||
float ambientScale;
|
||||
float ambientColor[3];
|
||||
float diffuseFraction;
|
||||
float sunLight;
|
||||
float sunColor[3];
|
||||
float diffuseColor[3];
|
||||
bool diffuseColorHasBeenSet;
|
||||
float angles[3];
|
||||
};
|
||||
|
||||
struct GfxLight
|
||||
{
|
||||
unsigned __int8 type;
|
||||
unsigned __int8 canUseShadowMap;
|
||||
unsigned __int8 unused[2];
|
||||
float color[3];
|
||||
float dir[3];
|
||||
float origin[3];
|
||||
float radius;
|
||||
float cosHalfFovOuter;
|
||||
float cosHalfFovInner;
|
||||
int exponent;
|
||||
unsigned int spotShadowIndex;
|
||||
XGfxLightDef *def;
|
||||
};
|
||||
|
||||
struct GfxReflectionProbe
|
||||
{
|
||||
float origin[3];
|
||||
GfxImage *reflectionImage;
|
||||
};
|
||||
|
||||
struct GfxWorldDpvsPlanes
|
||||
{
|
||||
|
||||
@ -1 +0,0 @@
|
||||
#include "material.h"
|
||||
@ -1,283 +0,0 @@
|
||||
#ifndef MATERIAL_H
|
||||
#define MATERIAL_H
|
||||
|
||||
#include "materialtechset.h"
|
||||
|
||||
struct GfxDrawSurfFields
|
||||
{
|
||||
quint64 objectId : 16;
|
||||
quint64 reflectionProbeIndex : 8;
|
||||
quint64 customIndex : 5;
|
||||
quint64 materialSortedIndex : 11;
|
||||
quint64 prepass : 2;
|
||||
quint64 primaryLightIndex : 8;
|
||||
quint64 surfType : 4;
|
||||
quint64 primarySortKey : 6;
|
||||
quint64 unused : 4;
|
||||
};
|
||||
|
||||
struct MaterialInfo
|
||||
{
|
||||
qint32 namePtr;
|
||||
QString name;
|
||||
|
||||
quint8 gameFlags;
|
||||
quint8 sortKey;
|
||||
quint8 textureAtlasRowCount;
|
||||
quint8 textureAtlasColumnCount;
|
||||
GfxDrawSurfFields drawSurf;
|
||||
unsigned int surfaceTypeBits;
|
||||
};
|
||||
|
||||
enum MapType : qint32
|
||||
{
|
||||
MAPTYPE_NONE = 0x0,
|
||||
MAPTYPE_INVALID1 = 0x1,
|
||||
MAPTYPE_INVALID2 = 0x2,
|
||||
MAPTYPE_2D = 0x3,
|
||||
MAPTYPE_3D = 0x4,
|
||||
MAPTYPE_CUBE = 0x5,
|
||||
MAPTYPE_COUNT = 0x6,
|
||||
};
|
||||
|
||||
struct GPUTEXTURESIZE_1D
|
||||
{
|
||||
quint32 Width : 24;
|
||||
};
|
||||
|
||||
struct GPUTEXTURESIZE_2D
|
||||
{
|
||||
quint32 Width : 13;
|
||||
quint32 Height : 13;
|
||||
};
|
||||
|
||||
struct GPUTEXTURESIZE_3D
|
||||
{
|
||||
quint32 Width : 11;
|
||||
quint32 Height : 11;
|
||||
quint32 Depth : 10;
|
||||
};
|
||||
|
||||
struct GPUTEXTURESIZE_STACK
|
||||
{
|
||||
quint32 Width : 13;
|
||||
quint32 Height : 13;
|
||||
quint32 Depth : 6;
|
||||
};
|
||||
|
||||
struct GPUTEXTURE_FETCH_CONSTANT
|
||||
{
|
||||
quint32 Type : 2;
|
||||
quint32 SignX : 2;
|
||||
quint32 SignY : 2;
|
||||
quint32 SignZ : 2;
|
||||
quint32 SignW : 2;
|
||||
quint32 ClampX : 3;
|
||||
quint32 ClampY : 3;
|
||||
quint32 ClampZ : 3;
|
||||
quint32 : 3;
|
||||
quint32 Pitch : 9;
|
||||
quint32 Tiled : 1;
|
||||
|
||||
quint32 DataFormat : 6;
|
||||
quint32 Endian : 2;
|
||||
quint32 RequestSize : 2;
|
||||
quint32 Stacked : 1;
|
||||
quint32 ClampPolicy : 1;
|
||||
quint32 BaseAddress : 20;
|
||||
union
|
||||
{
|
||||
GPUTEXTURESIZE_1D OneD;
|
||||
GPUTEXTURESIZE_2D TwoD;
|
||||
GPUTEXTURESIZE_3D ThreeD;
|
||||
GPUTEXTURESIZE_STACK Stack;
|
||||
} Size;
|
||||
|
||||
quint32 NumFormat : 1;
|
||||
quint32 SwizzleX : 3;
|
||||
quint32 SwizzleY : 3;
|
||||
quint32 SwizzleZ : 3;
|
||||
quint32 SwizzleW : 3;
|
||||
qint32 ExpAdjust : 6;
|
||||
quint32 MagFilter : 2;
|
||||
quint32 MinFilter : 2;
|
||||
quint32 MipFilter : 2;
|
||||
quint32 AnisoFilter : 3;
|
||||
quint32 : 3;
|
||||
quint32 BorderSize : 1;
|
||||
|
||||
quint32 VolMagFilter : 1;
|
||||
quint32 VolMinFilter : 1;
|
||||
quint32 MinMipLevel : 4;
|
||||
quint32 MaxMipLevel : 4;
|
||||
quint32 MagAnisoWalk : 1;
|
||||
quint32 MinAnisoWalk : 1;
|
||||
qint32 LODBias : 10;
|
||||
qint32 GradExpAdjustH : 5;
|
||||
qint32 GradExpAdjustV : 5;
|
||||
|
||||
quint32 BorderColor : 2;
|
||||
quint32 ForceBCWToMax : 1;
|
||||
quint32 TriClamp : 2;
|
||||
qint32 AnisoBias : 4;
|
||||
quint32 Dimension : 2;
|
||||
quint32 PackedMips : 1;
|
||||
quint32 MipAddress : 20;
|
||||
};
|
||||
|
||||
// QDataStream &operator>>(QDataStream &in, GPUTEXTURE_FETCH_CONSTANT &s)
|
||||
// {
|
||||
// quint32 raw1, raw2, raw3, raw4, raw5;
|
||||
// in >> raw1 >> raw2 >> raw3 >> raw4 >> raw5;
|
||||
|
||||
// s.Type = raw1 & 0b000000000000000000000011;
|
||||
// s.SignX = (raw1 >> 2) & 0b000000000000000000000011;
|
||||
// s.SignY = (raw1 >> 4) & 0b000000000000000000000011;
|
||||
// s.SignZ = (raw1 >> 6) & 0b000000000000000000000011;
|
||||
// s.SignW = (raw1 >> 8) & 0b000000000000000000000011;
|
||||
// s.ClampX = (raw1 >> 10) & 0b000000000000000000000111;
|
||||
// s.ClampY = (raw1 >> 13) & 0b000000000000000000000111;
|
||||
// s.ClampZ = (raw1 >> 16) & 0b000000000000000000000111;
|
||||
// s.Pitch = (raw1 >> 22) & 0b000000000000000111111111;
|
||||
// s.Tiled = (raw1 >> 31) & 0b000000000000000000000001;
|
||||
|
||||
// s.DataFormat = raw2 & 0b000000000000000000111111;
|
||||
// s.Endian = (raw2 >> 6) & 0b000000000000000000000011;
|
||||
// s.RequestSize = (raw2 >> 8) & 0b000000000000000000000011;
|
||||
// s.Stacked = (raw2 >> 10) & 0b000000000000000000000001;
|
||||
// s.ClampPolicy = (raw2 >> 11) & 0b000000000000000000000001;
|
||||
// s.BaseAddress = (raw2 >> 12) & 0b000011111111111111111111;
|
||||
// s.Size = (raw2 >> 32) & 0b000000000000000000001111;
|
||||
|
||||
// s.NumFormat = raw3 & 0b000000000000000000000001;
|
||||
// s.SwizzleX = (raw3 >> 32) & 0b000000000000000000000111;
|
||||
// s.SwizzleY = (raw3 >> 32) & 0b000000000000000000000111;
|
||||
// s.SwizzleZ = (raw3 >> 32) & 0b000000000000000000000111;
|
||||
// s.SwizzleW = (raw3 >> 32) & 0b000000000000000000000111;
|
||||
// s.ExpAdjust = (raw3 >> 32) & 0b000000000000000000111111;
|
||||
// s.MagFilter = (raw3 >> 32) & 0b000000000000000000001111;
|
||||
// s.MinFilter = (raw3 >> 32) & 0b000000000000000000001111;
|
||||
// s.MipFilter = (raw3 >> 32) & 0b000000000000000000001111;
|
||||
// s.AnisoFilter = (raw3 >> 32) & 0b000000000000000000001111;
|
||||
// s.: 3;
|
||||
// s.BorderSize =
|
||||
// s.VolMagFilter =
|
||||
// s.VolMinFilter =
|
||||
// s.MinMipLevel =
|
||||
// s.MaxMipLevel =
|
||||
// s.MagAnisoWalk =
|
||||
// s.MinAnisoWalk =
|
||||
// s.LODBias =
|
||||
// s.GradExpAdjustH =
|
||||
// s.GradExpAdjustV =
|
||||
// s.BorderColor =
|
||||
// s.ForceBCWToMax =
|
||||
// s.TriClamp =
|
||||
// s.AnisoBias =
|
||||
// s.Dimension =
|
||||
// s.PackedMips =
|
||||
// s.MipAddress =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// return in;
|
||||
// }
|
||||
|
||||
struct D3DBaseTexture : D3DResource
|
||||
{
|
||||
unsigned int MipFlush;
|
||||
GPUTEXTURE_FETCH_CONSTANT Format;
|
||||
};
|
||||
|
||||
struct D3DTexture : D3DBaseTexture
|
||||
{
|
||||
};
|
||||
|
||||
struct D3DVolumeTexture : D3DBaseTexture
|
||||
{
|
||||
};
|
||||
|
||||
struct D3DCubeTexture : D3DBaseTexture
|
||||
{
|
||||
};
|
||||
|
||||
struct WaterWritable
|
||||
{
|
||||
float floatTime;
|
||||
};
|
||||
|
||||
struct GfxImage;
|
||||
struct water_t
|
||||
{
|
||||
WaterWritable writable;
|
||||
float *H0X;
|
||||
float *H0Y;
|
||||
float *wTerm;
|
||||
int M;
|
||||
int N;
|
||||
float Lx;
|
||||
float Lz;
|
||||
float gravity;
|
||||
float windvel;
|
||||
float winddir[2];
|
||||
float amplitude;
|
||||
float codeConstant[4];
|
||||
GfxImage *image;
|
||||
};
|
||||
|
||||
union MaterialTextureDefInfo
|
||||
{
|
||||
GfxImage *image;
|
||||
water_t *water;
|
||||
};
|
||||
|
||||
struct MaterialTextureDef
|
||||
{
|
||||
unsigned int nameHash;
|
||||
char nameStart;
|
||||
char nameEnd;
|
||||
quint8 samplerState;
|
||||
quint8 semantic;
|
||||
MaterialTextureDefInfo u;
|
||||
};
|
||||
|
||||
struct MaterialConstantDef
|
||||
{
|
||||
unsigned int nameHash;
|
||||
char name[12];
|
||||
float literal[4];
|
||||
};
|
||||
|
||||
struct GfxStateBits
|
||||
{
|
||||
unsigned int loadBits[2];
|
||||
};
|
||||
|
||||
struct Material
|
||||
{
|
||||
MaterialInfo info;
|
||||
|
||||
quint8 stateBitsEntry[26];
|
||||
quint8 textureCount;
|
||||
quint8 constantCount;
|
||||
quint8 stateBitsCount;
|
||||
quint8 stateFlags;
|
||||
quint8 cameraRegion;
|
||||
|
||||
qint32 techSetPtr;
|
||||
MaterialTechSet *techniqueSet;
|
||||
|
||||
qint32 textureTablePtr;
|
||||
MaterialTextureDef *textureTable;
|
||||
|
||||
qint32 constantTablePtr;
|
||||
MaterialConstantDef *constantTable;
|
||||
|
||||
qint32 stateBitsTablePtr;
|
||||
GfxStateBits *stateBitsTable;
|
||||
};
|
||||
|
||||
#endif // MATERIAL_H
|
||||
@ -1 +0,0 @@
|
||||
#include "materialpixelshader.h"
|
||||
@ -1,34 +0,0 @@
|
||||
#ifndef MATERIAL_PIXERHSHADER_H
|
||||
#define MATERIAL_PIXERHSHADER_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
#include <QVector>
|
||||
#include <QtTypes>
|
||||
|
||||
struct GfxPixelShaderLoadDef
|
||||
{
|
||||
quint16 cachedPartPtr;
|
||||
QVector<quint8> cachedPart;
|
||||
quint16 physicalPartPtr;
|
||||
QVector<quint8> physicalPart;
|
||||
quint16 cachedPartSize;
|
||||
quint16 physicalPartSize;
|
||||
};
|
||||
|
||||
struct D3DPixelShader : D3DResource
|
||||
{
|
||||
};
|
||||
|
||||
union Material_PixelShaderProgram
|
||||
{
|
||||
D3DPixelShader *ps;
|
||||
GfxPixelShaderLoadDef loadDef;
|
||||
};
|
||||
|
||||
struct MaterialPixelShader
|
||||
{
|
||||
const char *name;
|
||||
Material_PixelShaderProgram prog;
|
||||
};
|
||||
|
||||
#endif // MATERIAL_PIXERHSHADER_H
|
||||
@ -1,115 +1,29 @@
|
||||
#ifndef MATERIALTECHSET_H
|
||||
#define MATERIALTECHSET_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
#include "materialpixelshader.h"
|
||||
#include "xasset.h"
|
||||
|
||||
#include "QString"
|
||||
#include "qobject.h"
|
||||
#include <QVector>
|
||||
|
||||
struct MaterialStreamRouting
|
||||
class XMaterialTechnique;
|
||||
|
||||
class XMaterialTechSet : public XAsset
|
||||
{
|
||||
quint8 source;
|
||||
quint8 dest;
|
||||
};
|
||||
public:
|
||||
explicit XMaterialTechSet();
|
||||
|
||||
struct D3DVertexDeclaration : D3DResource
|
||||
{
|
||||
};
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
struct MaterialVertexStreamRouting
|
||||
{
|
||||
MaterialStreamRouting data[16];
|
||||
D3DVertexDeclaration decl[15];
|
||||
};
|
||||
private:
|
||||
QString mName;
|
||||
int mWorldVertFormat;
|
||||
|
||||
struct MaterialVertexDeclaration
|
||||
{
|
||||
int streamCount;
|
||||
bool hasOptionalSource;
|
||||
MaterialVertexStreamRouting routing;
|
||||
};
|
||||
qint32 mRemappedPtr;
|
||||
XMaterialTechSet* mRemappedTechniqueSet;
|
||||
|
||||
struct D3DVertexShader : D3DResource
|
||||
{
|
||||
};
|
||||
|
||||
struct GfxVertexShaderLoadDef
|
||||
{
|
||||
qint32 cachedPartPtr;
|
||||
QVector<int> cachedPart;
|
||||
qint32 physicalPartPtr;
|
||||
QVector<int> physicalPart;
|
||||
int cachedPartSize;
|
||||
int physicalPartSize;
|
||||
};
|
||||
|
||||
struct MaterialVertexShaderProgram
|
||||
{
|
||||
std::shared_ptr<D3DVertexShader> vertexShader;
|
||||
GfxVertexShaderLoadDef loadDef;
|
||||
};
|
||||
|
||||
struct MaterialVertexShader
|
||||
{
|
||||
QString name;
|
||||
MaterialVertexShaderProgram prog;
|
||||
};
|
||||
|
||||
struct MaterialArgumentCodeConst
|
||||
{
|
||||
int index;
|
||||
int firstRow;
|
||||
int rowCount;
|
||||
};
|
||||
|
||||
struct MaterialArgumentDef
|
||||
{
|
||||
const float *literalConst;
|
||||
MaterialArgumentCodeConst codeConst;
|
||||
unsigned int codeSampler;
|
||||
unsigned int nameHash;
|
||||
};
|
||||
|
||||
struct MaterialShaderArgument
|
||||
{
|
||||
int type;
|
||||
int dest;
|
||||
MaterialArgumentDef u;
|
||||
};
|
||||
|
||||
struct MaterialPass
|
||||
{
|
||||
std::shared_ptr<MaterialVertexDeclaration> vertexDecl;
|
||||
QVector<std::shared_ptr<MaterialVertexShader>> vertexShaderArray;
|
||||
std::shared_ptr<MaterialVertexShader> vertexShader;
|
||||
std::shared_ptr<MaterialPixelShader> pixelShader;
|
||||
int perPrimArgCount;
|
||||
int perObjArgCount;
|
||||
int stableArgCount;
|
||||
int customSamplerFlags;
|
||||
int precompiledIndex;
|
||||
std::shared_ptr<MaterialShaderArgument> args;
|
||||
};
|
||||
|
||||
struct MaterialTechnique
|
||||
{
|
||||
QString *name;
|
||||
int flags;
|
||||
int passCount;
|
||||
QVector<std::shared_ptr<MaterialPass>> passArray;
|
||||
};
|
||||
|
||||
struct MaterialTechSet
|
||||
{
|
||||
QString name;
|
||||
int worldVertFormat;
|
||||
|
||||
qint32 remappedPtr;
|
||||
std::shared_ptr<MaterialTechSet> remappedTechniqueSet;
|
||||
|
||||
QVector<qint32> techPtrs;
|
||||
QVector<std::shared_ptr<MaterialTechnique>> techniques;
|
||||
QVector<qint32> mTechPtrs;
|
||||
QVector<XMaterialTechnique*> mTechniques;
|
||||
};
|
||||
|
||||
#endif // MATERIALTECHSET_H
|
||||
|
||||
@ -1 +0,0 @@
|
||||
#include "scriptstringlist.h"
|
||||
@ -1,13 +0,0 @@
|
||||
#ifndef SCRIPTSTRINGLIST_H
|
||||
#define SCRIPTSTRINGLIST_H
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
struct ScriptStringList
|
||||
{
|
||||
int count;
|
||||
QVector<qint32> stringPtrs;
|
||||
QStringList scriptStrings;
|
||||
};
|
||||
|
||||
#endif // SCRIPTSTRINGLIST_H
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "xanimdeltapart.h"
|
||||
|
||||
XAnimDeltaPart::XAnimDeltaPart()
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XANIMDELTAPART_H
|
||||
#define XANIMDELTAPART_H
|
||||
|
||||
|
||||
@ -1,25 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "xanimdeltapartquatdataframes.h"
|
||||
|
||||
XAnimDeltaPartQuatDataFrames::XAnimDeltaPartQuatDataFrames()
|
||||
: XAsset() {
|
||||
}
|
||||
|
||||
void XAnimDeltaPartQuatDataFrames::ParseData(QDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
aStream->read((char*)&mFramesPtr, sizeof(quint32));
|
||||
aStream->read((char*)mFrames, 2 * sizeof(qint16));
|
||||
|
||||
// Parse indices
|
||||
mIndices.ParseData(aStream);
|
||||
}
|
||||
}
|
||||
|
||||
quint32 XAnimDeltaPartQuatDataFrames::GetFramesPtr() const {
|
||||
return mFramesPtr;
|
||||
}
|
||||
@ -50,6 +34,17 @@ void XAnimDeltaPartQuatDataFrames::SetIndices(const XAnimDynamicIndices& indices
|
||||
mIndices = indices;
|
||||
}
|
||||
|
||||
void XAnimDeltaPartQuatDataFrames::ParseData(QDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
aStream->read((char*)&mFramesPtr, sizeof(quint32));
|
||||
aStream->read((char*)mFrames, 2 * sizeof(qint16));
|
||||
|
||||
// Parse indices
|
||||
mIndices.ParseData(aStream);
|
||||
}
|
||||
}
|
||||
|
||||
void XAnimDeltaPartQuatDataFrames::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XANIMDELTAPARTQUATDATAFRAMES_H
|
||||
#define XANIMDELTAPARTQUATDATAFRAMES_H
|
||||
|
||||
@ -15,8 +9,6 @@ class XAnimDeltaPartQuatDataFrames : public XAsset
|
||||
public:
|
||||
explicit XAnimDeltaPartQuatDataFrames();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
quint32 GetFramesPtr() const;
|
||||
void SetFramesPtr(quint32 ptr);
|
||||
|
||||
@ -27,6 +19,9 @@ public:
|
||||
const XAnimDynamicIndices& GetIndices() const;
|
||||
void SetIndices(const XAnimDynamicIndices& indices);
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
void Clear() override;
|
||||
|
||||
private:
|
||||
quint32 mFramesPtr = 0;
|
||||
qint16 mFrames[2] = {0};
|
||||
@ -34,8 +29,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // XANIMDELTAPARTQUATDATAFRAMES_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#include "xanimparts.h"
|
||||
|
||||
XAnimParts::XAnimParts()
|
||||
|
||||
@ -1,12 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XANIMPARTS_H
|
||||
#define XANIMPARTS_H
|
||||
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XANIMPARTTRANS_H
|
||||
#define XANIMPARTTRANS_H
|
||||
|
||||
@ -14,6 +8,7 @@ class XAnimPartTrans : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XAnimPartTrans();
|
||||
~XAnimPartTrans();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XANIMPARTTRANSDATA_H
|
||||
#define XANIMPARTTRANSDATA_H
|
||||
|
||||
@ -13,6 +8,7 @@ class XAnimPartTransData : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XAnimPartTransData();
|
||||
~XAnimPartTransData();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
#ifndef XASSET_H
|
||||
#define XASSET_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDataStream>
|
||||
|
||||
class XAsset
|
||||
{
|
||||
|
||||
public:
|
||||
XAsset();
|
||||
virtual ~XAsset();
|
||||
|
||||
@ -1,32 +1,37 @@
|
||||
|
||||
|
||||
|
||||
#include "xassetlist.h"
|
||||
|
||||
XAssetList::XAssetList()
|
||||
: XAsset() {
|
||||
: XAsset()
|
||||
, mStringList()
|
||||
, mAssetCount(0)
|
||||
, mAssets()
|
||||
{
|
||||
}
|
||||
|
||||
void XAssetList::ParseData(QDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
// Parse string list
|
||||
mStringList.ParseData(aStream);
|
||||
mStringList.ParsePtr(aStream);
|
||||
|
||||
// Parse asset count and assets
|
||||
aStream->read((char*)&mAssetCount, sizeof(int));
|
||||
for (int i = 0; i < mAssetCount; ++i) {
|
||||
XAsset asset;
|
||||
asset.ParseData(aStream);
|
||||
mAssets.append(asset);
|
||||
*aStream >> mAssetCount;
|
||||
aStream->skipRawData(2 * 4);
|
||||
|
||||
mStringList.ParseData(aStream);
|
||||
|
||||
for (int i = 0; i < mAssetCount; i++) {
|
||||
//XAsset asset;
|
||||
//asset.ParseData(aStream);
|
||||
//mAssets.append(asset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const ScriptStringList& XAssetList::GetStringList() const {
|
||||
XScriptStringList XAssetList::GetStringList() const {
|
||||
return mStringList;
|
||||
}
|
||||
|
||||
void XAssetList::SetStringList(const ScriptStringList& stringList) {
|
||||
void XAssetList::SetStringList(const XScriptStringList& stringList) {
|
||||
mStringList = stringList;
|
||||
}
|
||||
|
||||
@ -38,15 +43,11 @@ void XAssetList::SetAssetCount(int count) {
|
||||
mAssetCount = count;
|
||||
}
|
||||
|
||||
QVector<XAsset>& XAssetList::GetAssets() {
|
||||
QVector<XAsset*> XAssetList::GetAssets() {
|
||||
return mAssets;
|
||||
}
|
||||
|
||||
const QVector<XAsset>& XAssetList::GetAssets() const {
|
||||
return mAssets;
|
||||
}
|
||||
|
||||
void XAssetList::SetAssets(const QVector<XAsset>& assets) {
|
||||
void XAssetList::SetAssets(QVector<XAsset *> assets) {
|
||||
mAssets = assets;
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
|
||||
|
||||
#ifndef XASSETLIST_H
|
||||
#define XASSETLIST_H
|
||||
|
||||
#include "xscriptstringlist.h"
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
#include "scriptstringlist.h"
|
||||
|
||||
class XAssetList : public XAsset
|
||||
{
|
||||
@ -14,20 +13,19 @@ public:
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
const ScriptStringList& GetStringList() const;
|
||||
void SetStringList(const ScriptStringList& stringList);
|
||||
XScriptStringList GetStringList() const;
|
||||
void SetStringList(const XScriptStringList& stringList);
|
||||
|
||||
int GetAssetCount() const;
|
||||
void SetAssetCount(int count);
|
||||
|
||||
QVector<XAsset>& GetAssets();
|
||||
const QVector<XAsset>& GetAssets() const;
|
||||
void SetAssets(const QVector<XAsset>& assets);
|
||||
QVector<XAsset*> GetAssets();
|
||||
void SetAssets(QVector<XAsset *> assets);
|
||||
|
||||
private:
|
||||
ScriptStringList mStringList;
|
||||
XScriptStringList mStringList;
|
||||
int mAssetCount = 0;
|
||||
QVector<XAsset> mAssets;
|
||||
QVector<XAsset*> mAssets;
|
||||
};
|
||||
|
||||
#endif // XASSETLIST_H
|
||||
|
||||
27
libs/xassets/xboneinfo.cpp
Normal file
27
libs/xassets/xboneinfo.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xboneinfo.h"
|
||||
|
||||
XBoneInfo::XBoneInfo()
|
||||
: XAsset()
|
||||
, mBounds()
|
||||
, mOffset()
|
||||
, mRadiusSquared(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XBoneInfo::~XBoneInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XBoneInfo::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XBoneInfo::Clear()
|
||||
{
|
||||
mBounds = QVector<QVector3D>();
|
||||
mOffset = QVector3D();
|
||||
mRadiusSquared = 0;
|
||||
}
|
||||
24
libs/xassets/xboneinfo.h
Normal file
24
libs/xassets/xboneinfo.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef XBONEINFO_H
|
||||
#define XBONEINFO_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <QVector3D>
|
||||
|
||||
class XBoneInfo : public XAsset
|
||||
{
|
||||
public:
|
||||
XBoneInfo();
|
||||
~XBoneInfo();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
QVector<QVector3D> mBounds;
|
||||
QVector3D mOffset;
|
||||
float mRadiusSquared;
|
||||
};
|
||||
|
||||
#endif // XBONEINFO_H
|
||||
43
libs/xassets/xbrushwrapper.cpp
Normal file
43
libs/xassets/xbrushwrapper.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
#include "xbrushwrapper.h"
|
||||
|
||||
XBrushWrapper::XBrushWrapper()
|
||||
: XAsset()
|
||||
, mMins()
|
||||
, mContents(0)
|
||||
, mMaxs()
|
||||
, mNumSides(0)
|
||||
, mSides()
|
||||
, mAxialMaterialNum()
|
||||
, mBaseAdjacentSide(nullptr)
|
||||
, mFirstAdjacentSideOffsets()
|
||||
, mEdgeCount()
|
||||
, mTotalEdgeCount(0)
|
||||
, mPlanes(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XBrushWrapper::~XBrushWrapper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XBrushWrapper::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XBrushWrapper::Clear()
|
||||
{
|
||||
mMins = QVector3D();
|
||||
mContents = 0;
|
||||
mMaxs = QVector3D();
|
||||
mNumSides = 0;
|
||||
mSides.clear();
|
||||
mAxialMaterialNum.clear();
|
||||
mBaseAdjacentSide = nullptr;
|
||||
mFirstAdjacentSideOffsets.clear();
|
||||
mEdgeCount.clear();
|
||||
mTotalEdgeCount = 0;
|
||||
mPlanes->Clear();
|
||||
}
|
||||
32
libs/xassets/xbrushwrapper.h
Normal file
32
libs/xassets/xbrushwrapper.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef XBRUSHWRAPPER_H
|
||||
#define XBRUSHWRAPPER_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xcbrushside.h"
|
||||
|
||||
#include <QVector3D>
|
||||
|
||||
class XBrushWrapper : public XAsset
|
||||
{
|
||||
public:
|
||||
XBrushWrapper();
|
||||
~XBrushWrapper();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
QVector3D mMins;
|
||||
int mContents;
|
||||
QVector3D mMaxs;
|
||||
unsigned int mNumSides;
|
||||
QVector<XCBrushSide> mSides;
|
||||
QVector<QVector3D> mAxialMaterialNum;
|
||||
quint8 *mBaseAdjacentSide;
|
||||
QVector<QVector3D> mFirstAdjacentSideOffsets;
|
||||
QVector<QVector3D> mEdgeCount;
|
||||
int mTotalEdgeCount;
|
||||
XCPlane *mPlanes;
|
||||
};
|
||||
|
||||
#endif // XBRUSHWRAPPER_H
|
||||
31
libs/xassets/xcbrushside.cpp
Normal file
31
libs/xassets/xcbrushside.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "xcbrushside.h"
|
||||
|
||||
XCBrushSide::XCBrushSide()
|
||||
: XAsset()
|
||||
, mPlanePtr(0)
|
||||
, mPlane()
|
||||
, mMaterialNum(0)
|
||||
, mFirstAdjacentSideOffset(0)
|
||||
, mEdgeCount(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XCBrushSide::~XCBrushSide()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCBrushSide::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCBrushSide::Clear()
|
||||
{
|
||||
mPlanePtr = 0;
|
||||
mPlane = XCPlane();
|
||||
mMaterialNum = 0;
|
||||
mFirstAdjacentSideOffset = 0;
|
||||
mEdgeCount = 0;
|
||||
}
|
||||
24
libs/xassets/xcbrushside.h
Normal file
24
libs/xassets/xcbrushside.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef XCBRUSHSIDE_H
|
||||
#define XCBRUSHSIDE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xcplane.h"
|
||||
|
||||
class XCBrushSide : public XAsset
|
||||
{
|
||||
public:
|
||||
XCBrushSide();
|
||||
~XCBrushSide();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
qint32 mPlanePtr;
|
||||
XCPlane mPlane;
|
||||
uint mMaterialNum;
|
||||
qint16 mFirstAdjacentSideOffset;
|
||||
quint8 mEdgeCount;
|
||||
};
|
||||
|
||||
#endif // XCBRUSHSIDE_H
|
||||
@ -1,25 +1,33 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "xcleaf.h"
|
||||
|
||||
XCLeaf::XCLeaf()
|
||||
: XAsset() {
|
||||
: XAsset()
|
||||
, mFirstCollAabbIndex(0)
|
||||
, mCollAabbCount(0)
|
||||
, mBrushContents(0)
|
||||
, mTerrainContents(0)
|
||||
, mMins({0.0f, 0.0f, 0.0f})
|
||||
, mMaxs({0.0f, 0.0f, 0.0f})
|
||||
, mLeafBrushNode(0)
|
||||
, mCluster(0)
|
||||
{
|
||||
}
|
||||
|
||||
void XCLeaf::ParseData(QDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
aStream->read((char*)&mFirstCollAabbIndex, sizeof(quint16));
|
||||
aStream->read((char*)&mCollAabbCount, sizeof(quint16));
|
||||
aStream->read((char*)&mBrushContents, sizeof(int));
|
||||
aStream->read((char*)&mTerrainContents, sizeof(int));
|
||||
aStream->read((char*)mMins, 3 * sizeof(float));
|
||||
aStream->read((char*)mMaxs, 3 * sizeof(float));
|
||||
aStream->read((char*)&mLeafBrushNode, sizeof(int));
|
||||
aStream->read((char*)&mCluster, sizeof(qint16));
|
||||
*aStream
|
||||
>> mFirstCollAabbIndex
|
||||
>> mCollAabbCount
|
||||
>> mBrushContents
|
||||
>> mTerrainContents
|
||||
>> mMins[0]
|
||||
>> mMins[1]
|
||||
>> mMins[2]
|
||||
>> mMaxs[0]
|
||||
>> mMaxs[1]
|
||||
>> mMaxs[2]
|
||||
>> mLeafBrushNode
|
||||
>> mCluster;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,24 +63,20 @@ void XCLeaf::SetTerrainContents(int contents) {
|
||||
mTerrainContents = contents;
|
||||
}
|
||||
|
||||
const float* XCLeaf::GetMins() const {
|
||||
QVector<float> XCLeaf::GetMins() const {
|
||||
return mMins;
|
||||
}
|
||||
|
||||
void XCLeaf::SetMins(const float* mins, size_t count) {
|
||||
if (count <= 3) {
|
||||
memcpy(mMins, mins, count * sizeof(float));
|
||||
}
|
||||
void XCLeaf::SetMins(QVector<float> aMins) {
|
||||
mMins = aMins;
|
||||
}
|
||||
|
||||
const float* XCLeaf::GetMaxs() const {
|
||||
QVector<float> XCLeaf::GetMaxs() const {
|
||||
return mMaxs;
|
||||
}
|
||||
|
||||
void XCLeaf::SetMaxs(const float* maxs, size_t count) {
|
||||
if (count <= 3) {
|
||||
memcpy(mMaxs, maxs, count * sizeof(float));
|
||||
}
|
||||
void XCLeaf::SetMaxs(QVector<float> aMaxs) {
|
||||
mMaxs = aMaxs;
|
||||
}
|
||||
|
||||
int XCLeaf::GetLeafBrushNode() const {
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XCLEAF_H
|
||||
#define XCLEAF_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
class XCLeaf : public XAsset
|
||||
{
|
||||
public:
|
||||
@ -28,11 +24,11 @@ public:
|
||||
int GetTerrainContents() const;
|
||||
void SetTerrainContents(int contents);
|
||||
|
||||
const float* GetMins() const;
|
||||
void SetMins(const float* mins, size_t count = 3);
|
||||
QVector<float> GetMins() const;
|
||||
void SetMins(QVector<float> aMins);
|
||||
|
||||
const float* GetMaxs() const;
|
||||
void SetMaxs(const float* maxs, size_t count = 3);
|
||||
QVector<float> GetMaxs() const;
|
||||
void SetMaxs(QVector<float> aMaxs);
|
||||
|
||||
int GetLeafBrushNode() const;
|
||||
void SetLeafBrushNode(int node);
|
||||
@ -41,19 +37,14 @@ public:
|
||||
void SetCluster(qint16 cluster);
|
||||
|
||||
private:
|
||||
quint16 mFirstCollAabbIndex = 0;
|
||||
quint16 mCollAabbCount = 0;
|
||||
int mBrushContents = 0;
|
||||
int mTerrainContents = 0;
|
||||
float mMins[3] = {0.0f, 0.0f, 0.0f};
|
||||
float mMaxs[3] = {0.0f, 0.0f, 0.0f};
|
||||
int mLeafBrushNode = 0;
|
||||
qint16 mCluster = 0;
|
||||
quint16 mFirstCollAabbIndex;
|
||||
quint16 mCollAabbCount;
|
||||
int mBrushContents;
|
||||
int mTerrainContents;
|
||||
QVector<float> mMins;
|
||||
QVector<float> mMaxs;
|
||||
int mLeafBrushNode;
|
||||
qint16 mCluster;
|
||||
};
|
||||
|
||||
#endif // XCLEAF_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,22 +1,39 @@
|
||||
|
||||
|
||||
#include "xcleafbrushnode.h"
|
||||
|
||||
XCLeafBrushNode::XCLeafBrushNode()
|
||||
: XAsset() {
|
||||
: XAsset()
|
||||
, mAxis(0)
|
||||
, mLeafBrushCount(0)
|
||||
, mContents(0)
|
||||
, mData()
|
||||
{
|
||||
}
|
||||
|
||||
XCLeafBrushNode::~XCLeafBrushNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCLeafBrushNode::ParseData(QDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
aStream->read((char*)&mAxis, sizeof(quint8));
|
||||
aStream->read((char*)&mLeafBrushCount, sizeof(qint16));
|
||||
aStream->read((char*)&mContents, sizeof(int));
|
||||
*aStream
|
||||
>> mAxis
|
||||
>> mLeafBrushCount
|
||||
>> mContents;
|
||||
|
||||
// Parse data
|
||||
mData.ParseData(aStream);
|
||||
}
|
||||
}
|
||||
|
||||
void XCLeafBrushNode::Clear()
|
||||
{
|
||||
mAxis = 0;
|
||||
mLeafBrushCount = 0;
|
||||
mContents = 0;
|
||||
mData = XCLeafBrushNodeData();
|
||||
}
|
||||
|
||||
quint8 XCLeafBrushNode::GetAxis() const {
|
||||
return mAxis;
|
||||
}
|
||||
@ -52,4 +69,3 @@ const XCLeafBrushNodeData& XCLeafBrushNode::GetData() const {
|
||||
void XCLeafBrushNode::SetData(const XCLeafBrushNodeData& data) {
|
||||
mData = data;
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XCLEAFBRUSHNODE_H
|
||||
#define XCLEAFBRUSHNODE_H
|
||||
|
||||
@ -14,8 +8,10 @@ class XCLeafBrushNode : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XCLeafBrushNode();
|
||||
~XCLeafBrushNode();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
void Clear() override;
|
||||
|
||||
quint8 GetAxis() const;
|
||||
void SetAxis(quint8 axis);
|
||||
@ -31,15 +27,10 @@ public:
|
||||
void SetData(const XCLeafBrushNodeData& data);
|
||||
|
||||
private:
|
||||
quint8 mAxis = 0;
|
||||
qint16 mLeafBrushCount = 0;
|
||||
int mContents = 0;
|
||||
quint8 mAxis;
|
||||
qint16 mLeafBrushCount;
|
||||
int mContents;
|
||||
XCLeafBrushNodeData mData;
|
||||
};
|
||||
|
||||
#endif // XCLEAFBRUSHNODE_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "xcleafbrushnodedata.h"
|
||||
|
||||
XCLeafBrushNodeData::XCLeafBrushNodeData()
|
||||
: XAsset() {
|
||||
: XAsset()
|
||||
, mLeaf()
|
||||
, mChildren()
|
||||
{
|
||||
}
|
||||
|
||||
XCLeafBrushNodeData::~XCLeafBrushNodeData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCLeafBrushNodeData::ParseData(QDataStream *aStream) {
|
||||
@ -18,6 +20,12 @@ void XCLeafBrushNodeData::ParseData(QDataStream *aStream) {
|
||||
}
|
||||
}
|
||||
|
||||
void XCLeafBrushNodeData::Clear()
|
||||
{
|
||||
mLeaf.Clear();
|
||||
mChildren.Clear();
|
||||
}
|
||||
|
||||
const XCLeafBrushNodeLeaf& XCLeafBrushNodeData::GetLeaf() const {
|
||||
return mLeaf;
|
||||
}
|
||||
@ -33,7 +41,3 @@ const XCLeafBrushNodeChildren& XCLeafBrushNodeData::GetChildren() const {
|
||||
void XCLeafBrushNodeData::SetChildren(const XCLeafBrushNodeChildren& children) {
|
||||
mChildren = children;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XCLEAFBRUSHNODEDATA_H
|
||||
#define XCLEAFBRUSHNODEDATA_H
|
||||
|
||||
@ -15,8 +9,10 @@ class XCLeafBrushNodeData : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XCLeafBrushNodeData();
|
||||
virtual ~XCLeafBrushNodeData() override;
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
void Clear() override;
|
||||
|
||||
// Option 1: Leaf data
|
||||
const XCLeafBrushNodeLeaf& GetLeaf() const;
|
||||
@ -27,10 +23,8 @@ public:
|
||||
void SetChildren(const XCLeafBrushNodeChildren& children);
|
||||
|
||||
private:
|
||||
union {
|
||||
XCLeafBrushNodeLeaf mLeaf;
|
||||
XCLeafBrushNodeChildren mChildren;
|
||||
};
|
||||
};
|
||||
|
||||
#endif // XCLEAFBRUSHNODEDATA_H
|
||||
|
||||
31
libs/xassets/xcplane.cpp
Normal file
31
libs/xassets/xcplane.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "xcplane.h"
|
||||
|
||||
XCPlane::XCPlane()
|
||||
: XAsset()
|
||||
, mNormal()
|
||||
, mDist(0)
|
||||
, mType(0)
|
||||
, mSignbits(0)
|
||||
, mPad()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XCPlane::~XCPlane()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCPlane::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCPlane::Clear()
|
||||
{
|
||||
mNormal = QVector3D();
|
||||
mDist = 0;
|
||||
mType = 0;
|
||||
mSignbits = 0;
|
||||
mPad.clear();
|
||||
}
|
||||
26
libs/xassets/xcplane.h
Normal file
26
libs/xassets/xcplane.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef XCPLANE_H
|
||||
#define XCPLANE_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <QVector3D>
|
||||
|
||||
class XCPlane : public XAsset
|
||||
{
|
||||
public:
|
||||
XCPlane();
|
||||
~XCPlane();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
QVector3D mNormal;
|
||||
float mDist;
|
||||
quint8 mType;
|
||||
quint8 mSignbits;
|
||||
QVector<quint8> mPad;
|
||||
};
|
||||
|
||||
#endif // XCPLANE_H
|
||||
@ -2,7 +2,9 @@
|
||||
#define XD3DBASETEXTURE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xd3dresource.h"
|
||||
|
||||
class XGpuTextureFetchConstant;
|
||||
class XD3DResource;
|
||||
|
||||
class XD3DBaseTexture : public XAsset
|
||||
{
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include "xgfximageloaddef.h"
|
||||
|
||||
#include "xgfxtexture.h"
|
||||
|
||||
XGfxImageLoadDef::XGfxImageLoadDef()
|
||||
: XAsset()
|
||||
, mLevelCount(0)
|
||||
|
||||
@ -1,23 +1,8 @@
|
||||
#ifndef XGFXIMAGELOADDEF_H
|
||||
#define XGFXIMAGELOADDEF_H
|
||||
#ifndef XD3DCUBETEXTURE_H
|
||||
#define XD3DCUBETEXTURE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xd3dbasetexture.h"
|
||||
|
||||
class XGfxImageLoadDef : public XAsset
|
||||
{
|
||||
public:
|
||||
XGfxImageLoadDef();
|
||||
~XGfxImageLoadDef();
|
||||
typedef XD3DBaseTexture XD3DCubeTexture;
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
quint8 mLevelCount;
|
||||
quint8 mFlags;
|
||||
QVector<qint16> mDimensions;
|
||||
int mFormat;
|
||||
XGfxTexture* mTexture;
|
||||
};
|
||||
|
||||
#endif // XGFXIMAGELOADDEF_H
|
||||
#endif // XD3DCUBETEXTURE_H
|
||||
|
||||
19
libs/xassets/xd3dindexbuffer.cpp
Normal file
19
libs/xassets/xd3dindexbuffer.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "xd3dindexbuffer.h"
|
||||
|
||||
XD3DIndexBuffer::XD3DIndexBuffer()
|
||||
: XD3DResource()
|
||||
, mAddress(0)
|
||||
, mSize(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XD3DIndexBuffer::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XD3DIndexBuffer::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
27
libs/xassets/xd3dindexbuffer.h
Normal file
27
libs/xassets/xd3dindexbuffer.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef XD3DINDEXBUFFER_H
|
||||
#define XD3DINDEXBUFFER_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
|
||||
class XD3DIndexBuffer : public XD3DResource
|
||||
{
|
||||
public:
|
||||
explicit XD3DIndexBuffer();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
void Clear() override;
|
||||
|
||||
private:
|
||||
quint32 mAddress;
|
||||
quint32 mSize;
|
||||
};
|
||||
|
||||
#endif // XD3DINDEXBUFFER_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
9
libs/xassets/xd3dpixelshader.h
Normal file
9
libs/xassets/xd3dpixelshader.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef XD3DPIXELSHADER_H
|
||||
#define XD3DPIXELSHADER_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
|
||||
typedef XD3DResource XD3DPixelShader;
|
||||
|
||||
#endif // XD3DPIXELSHADER_H
|
||||
|
||||
9
libs/xassets/xd3dtexture.h
Normal file
9
libs/xassets/xd3dtexture.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef XD3DTEXTURE_H
|
||||
#define XD3DTEXTURE_H
|
||||
|
||||
#include "xd3dbasetexture.h"
|
||||
|
||||
typedef XD3DBaseTexture XD3DTexture;
|
||||
|
||||
#endif // XD3DTEXTURE_H
|
||||
|
||||
18
libs/xassets/xd3dvertexbuffer.cpp
Normal file
18
libs/xassets/xd3dvertexbuffer.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "xd3dvertexbuffer.h"
|
||||
|
||||
XD3DVertexBuffer::XD3DVertexBuffer()
|
||||
: XD3DResource()
|
||||
, mFormat()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XD3DVertexBuffer::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XD3DVertexBuffer::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
19
libs/xassets/xd3dvertexbuffer.h
Normal file
19
libs/xassets/xd3dvertexbuffer.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef XD3DVERTEXBUFFER_H
|
||||
#define XD3DVERTEXBUFFER_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
#include "xgpuvertexfetchconstant.h"
|
||||
|
||||
class XD3DVertexBuffer : XD3DResource
|
||||
{
|
||||
public:
|
||||
explicit XD3DVertexBuffer();
|
||||
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
void Clear() override;
|
||||
|
||||
private:
|
||||
XGpuVertexFetchConstant mFormat;
|
||||
};
|
||||
|
||||
#endif // XD3DVERTEXBUFFER_H
|
||||
9
libs/xassets/xd3dvertexdeclaration.h
Normal file
9
libs/xassets/xd3dvertexdeclaration.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef XD3DVERTEXDECLARATION_H
|
||||
#define XD3DVERTEXDECLARATION_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
|
||||
typedef XD3DResource XD3DVertexDeclaration;
|
||||
|
||||
#endif // XD3DVERTEXDECLARATION_H
|
||||
|
||||
9
libs/xassets/xd3dvertexshader.h
Normal file
9
libs/xassets/xd3dvertexshader.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef XD3DVERTEXSHADER_H
|
||||
#define XD3DVERTEXSHADER_H
|
||||
|
||||
#include "xd3dresource.h"
|
||||
|
||||
typedef XD3DResource XD3DVertexShader;
|
||||
|
||||
#endif // XD3DVERTEXSHADER_H
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
#include "xgfximageloaddef.h"
|
||||
|
||||
XGfxImageLoadDef::XGfxImageLoadDef()
|
||||
: XAsset()
|
||||
, mLevelCount(0)
|
||||
, mFlags(0)
|
||||
, mDimensions(QVector<qint16>(3))
|
||||
, mFormat(0)
|
||||
, mTexture(new XGfxTexture())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XGfxImageLoadDef::~XGfxImageLoadDef()
|
||||
{
|
||||
delete mTexture;
|
||||
}
|
||||
|
||||
void XGfxImageLoadDef::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XGfxImageLoadDef::Clear()
|
||||
{
|
||||
mLevelCount = 0;
|
||||
mFlags = 0;
|
||||
mDimensions = QVector<qint16>(3);
|
||||
mFormat = 0;
|
||||
mTexture->Clear();
|
||||
}
|
||||
@ -1,23 +1,8 @@
|
||||
#ifndef XGFXIMAGELOADDEF_H
|
||||
#define XGFXIMAGELOADDEF_H
|
||||
#ifndef XD3DVOLUMETEXTURE_H
|
||||
#define XD3DVOLUMETEXTURE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xd3dbasetexture.h"
|
||||
|
||||
class XGfxImageLoadDef : public XAsset
|
||||
{
|
||||
public:
|
||||
XGfxImageLoadDef();
|
||||
~XGfxImageLoadDef();
|
||||
typedef XD3DBaseTexture XD3DVolumeTexture;
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
quint8 mLevelCount;
|
||||
quint8 mFlags;
|
||||
QVector<qint16> mDimensions;
|
||||
int mFormat;
|
||||
XGfxTexture* mTexture;
|
||||
};
|
||||
|
||||
#endif // XGFXIMAGELOADDEF_H
|
||||
#endif // XD3DVOLUMETEXTURE_H
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XDMATERIAL_H
|
||||
#define XDMATERIAL_H
|
||||
|
||||
|
||||
27
libs/xassets/xdobjanimmat.cpp
Normal file
27
libs/xassets/xdobjanimmat.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xdobjanimmat.h"
|
||||
|
||||
XDObjAnimMat::XDObjAnimMat()
|
||||
: XAsset()
|
||||
, mQuat()
|
||||
, mTrans()
|
||||
, mTransWeight(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XDObjAnimMat::~XDObjAnimMat()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XDObjAnimMat::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XDObjAnimMat::Clear()
|
||||
{
|
||||
mQuat = QVector<float>();
|
||||
mTrans = QVector<float>();
|
||||
mTransWeight = 0;
|
||||
}
|
||||
23
libs/xassets/xdobjanimmat.h
Normal file
23
libs/xassets/xdobjanimmat.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XDOBJANIMMAT_H
|
||||
#define XDOBJANIMMAT_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
class XDObjAnimMat : public XAsset
|
||||
{
|
||||
public:
|
||||
XDObjAnimMat();
|
||||
~XDObjAnimMat();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
QVector<float> mQuat;
|
||||
QVector<float> mTrans;
|
||||
float mTransWeight;
|
||||
};
|
||||
|
||||
#endif // XDOBJANIMMAT_H
|
||||
229
libs/xassets/xeffectdef.h
Normal file
229
libs/xassets/xeffectdef.h
Normal file
@ -0,0 +1,229 @@
|
||||
#ifndef EFFECTDEF_H
|
||||
#define EFFECTDEF_H
|
||||
|
||||
#include "xmaterial.h"
|
||||
#include "xmodel.h"
|
||||
|
||||
class XFxSpawnDefLooping : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDefLooping();
|
||||
~XFxSpawnDefLooping();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mIntervalMsec;
|
||||
int mCount;
|
||||
};
|
||||
|
||||
class XFxIntRange : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxIntRange();
|
||||
~XFxIntRange();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mBase;
|
||||
int mAmplitude;
|
||||
};
|
||||
|
||||
class XFxSpawnDefOneShot : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDefOneShot();
|
||||
~XFxSpawnDefOneShot();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxIntRange mCount;
|
||||
};
|
||||
|
||||
class XFxSpawnDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDef();
|
||||
~XFxSpawnDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxSpawnDefLooping mLooping;
|
||||
XFxSpawnDefOneShot omOneShot;
|
||||
};
|
||||
|
||||
class XFxFloatRange : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxFloatRange();
|
||||
~XFxFloatRange();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
float base;
|
||||
float amplitude;
|
||||
};
|
||||
|
||||
class XFxElemAtlas : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemAtlas();
|
||||
~XFxElemAtlas();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
quint8 mBehavior;
|
||||
quint8 mIndex;
|
||||
quint8 mFps;
|
||||
quint8 mLoopCount;
|
||||
quint8 mColIndexBits;
|
||||
quint8 mRowIndexBits;
|
||||
qint16 mEntryCount;
|
||||
};
|
||||
|
||||
class XFxElemVec3Range : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVec3Range();
|
||||
~XFxElemVec3Range();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector3D mBase;
|
||||
QVector3D mAmplitude;
|
||||
};
|
||||
|
||||
class XFxElemVelStateInFrame : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVelStateInFrame();
|
||||
~XFxElemVelStateInFrame();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVec3Range mVelocity;
|
||||
XFxElemVec3Range mTotalDelta;
|
||||
};
|
||||
|
||||
class XFxElemVelStateSample : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVelStateSample();
|
||||
~XFxElemVelStateSample();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVelStateInFrame mLocal;
|
||||
XFxElemVelStateInFrame mWorld;
|
||||
};
|
||||
|
||||
class XFxElemVisualState : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVisualState();
|
||||
~XFxElemVisualState();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
quint8 mColor[4];
|
||||
float mRotationDelta;
|
||||
float mRotationTotal;
|
||||
float mSize[2];
|
||||
float mScale;
|
||||
};
|
||||
|
||||
class XFxElemVisStateSample : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVisStateSample();
|
||||
~XFxElemVisStateSample();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVisualState mBase;
|
||||
XFxElemVisualState mAmplitude;
|
||||
};
|
||||
|
||||
class XFxElemMarkVisuals : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemMarkVisuals();
|
||||
~XFxElemMarkVisuals();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mMaterialPtrs[2];
|
||||
QVector<XMaterial> mMaterials;
|
||||
};
|
||||
|
||||
class XEffectDefRef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XEffectDefRef();
|
||||
~XEffectDefRef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mHandlePtr;
|
||||
const XEffectDef *mHandle;
|
||||
|
||||
qint32 mNamePtr;
|
||||
QString mName;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class XEffectDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XEffectDef();
|
||||
~XEffectDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mNamePtr;
|
||||
QString mName;
|
||||
|
||||
int mFlags;
|
||||
int mTotalSize;
|
||||
int mMsecLoopingLife;
|
||||
int mElemDefCountLooping;
|
||||
int mElemDefCountOneShot;
|
||||
int mElemDefCountEmission;
|
||||
|
||||
qint32 mElemDefsPtr;
|
||||
QVector<XFxElemDef> mElemDefs;
|
||||
};
|
||||
|
||||
#endif // EFFECTDEF_H
|
||||
188
libs/xassets/xeffectdef.h.autosave
Normal file
188
libs/xassets/xeffectdef.h.autosave
Normal file
@ -0,0 +1,188 @@
|
||||
#ifndef EFFECTDEF_H
|
||||
#define EFFECTDEF_H
|
||||
|
||||
#include "xmaterial.h"
|
||||
#include "xmodel.h"
|
||||
|
||||
class XFxSpawnDefLooping : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDefLooping();
|
||||
~XFxSpawnDefLooping();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mIntervalMsec;
|
||||
int mCount;
|
||||
};
|
||||
|
||||
class XFxIntRange : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxIntRange();
|
||||
~XFxIntRange();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mBase;
|
||||
int mAmplitude;
|
||||
};
|
||||
|
||||
class XFxSpawnDefOneShot : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDefOneShot();
|
||||
~XFxSpawnDefOneShot();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxIntRange mCount;
|
||||
};
|
||||
|
||||
class XFxSpawnDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxSpawnDef();
|
||||
~XFxSpawnDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxSpawnDefLooping mLooping;
|
||||
XFxSpawnDefOneShot omOneShot;
|
||||
};
|
||||
|
||||
class XFxFloatRange : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxFloatRange();
|
||||
~XFxFloatRange();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
float base;
|
||||
float amplitude;
|
||||
};
|
||||
|
||||
class XFxElemAtlas : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemAtlas();
|
||||
~XFxElemAtlas();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
quint8 mBehavior;
|
||||
quint8 mIndex;
|
||||
quint8 mFps;
|
||||
quint8 mLoopCount;
|
||||
quint8 mColIndexBits;
|
||||
quint8 mRowIndexBits;
|
||||
qint16 mEntryCount;
|
||||
};
|
||||
|
||||
class XFxElemVec3Range : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVec3Range();
|
||||
~XFxElemVec3Range();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector3D mBase;
|
||||
QVector3D mAmplitude;
|
||||
};
|
||||
|
||||
class XFxElemVelStateInFrame : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVelStateInFrame();
|
||||
~XFxElemVelStateInFrame();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVec3Range mVelocity;
|
||||
XFxElemVec3Range mTotalDelta;
|
||||
};
|
||||
|
||||
class XFxElemVelStateSample : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVelStateSample();
|
||||
~XFxElemVelStateSample();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVelStateInFrame mLocal;
|
||||
XFxElemVelStateInFrame mWorld;
|
||||
};
|
||||
|
||||
class XFxElemVisualState : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVisualState();
|
||||
~XFxElemVisualState();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
quint8 mColor[4];
|
||||
float mRotationDelta;
|
||||
float mRotationTotal;
|
||||
float mSize[2];
|
||||
float mScale;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class XEffectDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XEffectDef();
|
||||
~XEffectDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mNamePtr;
|
||||
QString mName;
|
||||
|
||||
int mFlags;
|
||||
int mTotalSize;
|
||||
int mMsecLoopingLife;
|
||||
int mElemDefCountLooping;
|
||||
int mElemDefCountOneShot;
|
||||
int mElemDefCountEmission;
|
||||
|
||||
qint32 mElemDefsPtr;
|
||||
QVector<XFxElemDef> mElemDefs;
|
||||
};
|
||||
|
||||
#endif // EFFECTDEF_H
|
||||
30
libs/xassets/xeffectdefref.cpp
Normal file
30
libs/xassets/xeffectdefref.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "xeffectdefref.h"
|
||||
|
||||
XEffectDefRef::XEffectDefRef()
|
||||
: XAsset()
|
||||
, mHandlePtr(0)
|
||||
, mHandle(new XEffectDef())
|
||||
, mNamePtr(0)
|
||||
, mName("")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XEffectDefRef::~XEffectDefRef()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XEffectDefRef::Clear()
|
||||
{
|
||||
mHandlePtr = 0;
|
||||
mHandle = new XEffectDef();
|
||||
|
||||
mNamePtr = 0;
|
||||
mName = "";
|
||||
}
|
||||
|
||||
void XEffectDefRef::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
24
libs/xassets/xeffectdefref.h
Normal file
24
libs/xassets/xeffectdefref.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef XEFFECTDEFREF_H
|
||||
#define XEFFECTDEFREF_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
|
||||
class XEffectDefRef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XEffectDefRef();
|
||||
~XEffectDefRef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mHandlePtr;
|
||||
const XEffectDef *mHandle;
|
||||
|
||||
qint32 mNamePtr;
|
||||
QString mName;
|
||||
};
|
||||
|
||||
#endif // XEFFECTDEFREF_H
|
||||
29
libs/xassets/xeffecttable.cpp
Normal file
29
libs/xassets/xeffecttable.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "xeffecttable.h"
|
||||
|
||||
XImpactTable::XImpactTable()
|
||||
: XAsset()
|
||||
, mNamePtr(0)
|
||||
, mName("")
|
||||
, mTablePtr(0)
|
||||
, mTable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XImpactTable::~XImpactTable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XImpactTable::Clear()
|
||||
{
|
||||
mNamePtr = 0;
|
||||
mName = "";
|
||||
mTablePtr = 0;
|
||||
mTable = QVector<XFxImpactEntry>();
|
||||
}
|
||||
|
||||
void XImpactTable::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
24
libs/xassets/xeffecttable.h
Normal file
24
libs/xassets/xeffecttable.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef EFFECTTABLE_H
|
||||
#define EFFECTTABLE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xfximpactentry.h"
|
||||
|
||||
class XImpactTable : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XImpactTable();
|
||||
~XImpactTable();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mNamePtr;
|
||||
QString mName;
|
||||
|
||||
qint32 mTablePtr;
|
||||
QVector<XFxImpactEntry> mTable;
|
||||
};
|
||||
|
||||
#endif // EFFECTTABLE_H
|
||||
17
libs/xassets/xfile.cpp
Normal file
17
libs/xassets/xfile.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "xfile.h"
|
||||
|
||||
XFile::XFile()
|
||||
: XAsset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFile::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFile::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
20
libs/xassets/xfile.h
Normal file
20
libs/xassets/xfile.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef FILE_H
|
||||
#define FILE_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
class XFile : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFile();
|
||||
|
||||
virtual void ParseData(QDataStream* aStream) override;
|
||||
virtual void Clear() override;
|
||||
|
||||
private:
|
||||
quint32 mSize;
|
||||
quint32 mExternalSize;
|
||||
quint32 mBlockSize[7];
|
||||
};
|
||||
|
||||
#endif // FILE_H
|
||||
97
libs/xassets/xfxelemdef.cpp
Normal file
97
libs/xassets/xfxelemdef.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
#include "xfxelemdef.h"
|
||||
|
||||
XFxElemDef::XFxElemDef()
|
||||
: XAsset()
|
||||
, mFlags(0)
|
||||
, mSpawn()
|
||||
, mSpawnRange()
|
||||
, mFadeInRange()
|
||||
, mFadeOutRange()
|
||||
, mSpawnFrustumCullRadius(0)
|
||||
, mSpawnDelayMsec()
|
||||
, mLifeSpanMsec()
|
||||
, mSpawnOrigin()
|
||||
, mSpawnOffsetRadius()
|
||||
, mSpawnOffsetHeight()
|
||||
, mSpawnAngles()
|
||||
, mAngularVelocity()
|
||||
, mInitialRotation()
|
||||
, mGravity()
|
||||
, mReflectionFactor()
|
||||
, mAtlas()
|
||||
, mElemType(0)
|
||||
, mVisualCount(0)
|
||||
, mVelIntervalCount(0)
|
||||
, mVisStateIntervalCount(0)
|
||||
, mVelSamplesPtr(0)
|
||||
, mVelSamples()
|
||||
, mVisSamplesPtr(0)
|
||||
, mVisSamples()
|
||||
, mVisuals()
|
||||
, mCollMins()
|
||||
, mCollMaxs()
|
||||
, mEffectOnImpact()
|
||||
, mEffectOnDeath()
|
||||
, mEffectEmitted()
|
||||
, mEmitDist()
|
||||
, mEmitDistVariance()
|
||||
, mTrailDefPtr(0)
|
||||
, mTrailDef(new XFxTrailDef())
|
||||
, mSortOrder(0)
|
||||
, mLightingFrac(0)
|
||||
, mUseItemClip(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemDef::~XFxElemDef()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemDef::Clear()
|
||||
{
|
||||
mFlags = 0;
|
||||
mSpawn.Clear();
|
||||
mSpawnRange = FxFloatRange();
|
||||
mFadeInRange = FxFloatRange();
|
||||
mFadeOutRange = FxFloatRange();
|
||||
mSpawnFrustumCullRadius = 0;
|
||||
mSpawnDelayMsec = FxIntRange();
|
||||
mLifeSpanMsec = FxIntRange();
|
||||
mSpawnOrigin = QVector<FxFloatRange>();
|
||||
mSpawnOffsetRadius = FxFloatRange();
|
||||
mSpawnOffsetHeight = FxFloatRange();
|
||||
mSpawnAngles = QVector<FxFloatRange>();
|
||||
mAngularVelocity = QVector<FxFloatRange>();
|
||||
mInitialRotation = FxFloatRange();
|
||||
mGravity = FxFloatRange();
|
||||
mReflectionFactor = FxFloatRange();
|
||||
mAtlas = FxElemAtlas();
|
||||
mElemType = 0;
|
||||
mVisualCount = 0;
|
||||
mVelIntervalCount = 0;
|
||||
mVisStateIntervalCount = 0;
|
||||
mVelSamplesPtr = 0;
|
||||
mVelSamples = QVector<FxElemVelStateSample>();
|
||||
mVisSamplesPtr = 0;
|
||||
mVisSamples = QVector<FxElemVisStateSample>();
|
||||
mVisuals = FxElemDefVisuals();
|
||||
mCollMins = QVector3D();
|
||||
mCollMaxs = QVector3D();
|
||||
mEffectOnImpact = ;
|
||||
mEffectOnDeath = ;
|
||||
mEffectEmitted = ;
|
||||
mEmitDist = ;
|
||||
mEmitDistVariance = ;
|
||||
mTrailDefPtr = 0;
|
||||
mTrailDef = new XFxTrailDef = ;;
|
||||
mSortOrder = 0;
|
||||
mLightingFrac = 0;
|
||||
mUseItemClip = 0;
|
||||
}
|
||||
|
||||
void XFxElemDef::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
60
libs/xassets/xfxelemdef.h
Normal file
60
libs/xassets/xfxelemdef.h
Normal file
@ -0,0 +1,60 @@
|
||||
#ifndef XFXELEMDEF_H
|
||||
#define XFXELEMDEF_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
#include "xfxtraildef.h"
|
||||
|
||||
class XFxElemDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemDef();
|
||||
~XFxElemDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mFlags;
|
||||
FxSpawnDef mSpawn;
|
||||
FxFloatRange mSpawnRange;
|
||||
FxFloatRange mFadeInRange;
|
||||
FxFloatRange mFadeOutRange;
|
||||
float mSpawnFrustumCullRadius;
|
||||
FxIntRange mSpawnDelayMsec;
|
||||
FxIntRange mLifeSpanMsec;
|
||||
QVector<FxFloatRange> mSpawnOrigin;
|
||||
FxFloatRange mSpawnOffsetRadius;
|
||||
FxFloatRange mSpawnOffsetHeight;
|
||||
QVector<FxFloatRange> mSpawnAngles;
|
||||
QVector<FxFloatRange> mAngularVelocity;
|
||||
FxFloatRange mInitialRotation;
|
||||
FxFloatRange mGravity;
|
||||
FxFloatRange mReflectionFactor;
|
||||
FxElemAtlas mAtlas;
|
||||
quint8 mElemType;
|
||||
quint8 mVisualCount;
|
||||
quint8 mVelIntervalCount;
|
||||
quint8 mVisStateIntervalCount;
|
||||
qint32 mVelSamplesPtr;
|
||||
QVector<FxElemVelStateSample> mVelSamples;
|
||||
qint32 mVisSamplesPtr;
|
||||
QVector<FxElemVisStateSample> mVisSamples;
|
||||
FxElemDefVisuals mVisuals;
|
||||
QVector3D mCollMins;
|
||||
QVector3D mCollMaxs;
|
||||
EffectDefRef mEffectOnImpact;
|
||||
EffectDefRef mEffectOnDeath;
|
||||
EffectDefRef mEffectEmitted;
|
||||
FxFloatRange mEmitDist;
|
||||
FxFloatRange mEmitDistVariance;
|
||||
|
||||
qint32 mTrailDefPtr;
|
||||
XFxTrailDef *mTrailDef;
|
||||
|
||||
quint8 mSortOrder;
|
||||
quint8 mLightingFrac;
|
||||
quint8 mUseItemClip;
|
||||
};
|
||||
|
||||
#endif // XFXELEMDEF_H
|
||||
31
libs/xassets/xfxelemdefvisuals.cpp
Normal file
31
libs/xassets/xfxelemdefvisuals.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "xfxelemdefvisuals.h"
|
||||
|
||||
XFxElemDefVisuals::XFxElemDefVisuals()
|
||||
: XAsset()
|
||||
, mMarkArrayPtr(0)
|
||||
, mMarkArray()
|
||||
, mArrayPtr(0)
|
||||
, mArray()
|
||||
, mInstance()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemDefVisuals::~XFxElemDefVisuals()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemDefVisuals::Clear()
|
||||
{
|
||||
mMarkArrayPtr = 0;
|
||||
mMarkArray.clear();
|
||||
mArrayPtr = 0;
|
||||
mArray.clear();
|
||||
mInstance = XFxElemVisuals();
|
||||
}
|
||||
|
||||
void XFxElemDefVisuals::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
26
libs/xassets/xfxelemdefvisuals.h
Normal file
26
libs/xassets/xfxelemdefvisuals.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef XFXELEMDEFVISUALS_H
|
||||
#define XFXELEMDEFVISUALS_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
|
||||
class XFxElemDefVisuals : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemDefVisuals();
|
||||
~XFxElemDefVisuals();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mMarkArrayPtr;
|
||||
QVector<XFxElemMarkVisuals> mMarkArray;
|
||||
|
||||
qint32 mArrayPtr;
|
||||
QVector<XFxElemVisuals> mArray;
|
||||
|
||||
XFxElemVisuals mInstance;
|
||||
};
|
||||
|
||||
#endif // XFXELEMDEFVISUALS_H
|
||||
25
libs/xassets/xfxelemmarkvisuals.cpp
Normal file
25
libs/xassets/xfxelemmarkvisuals.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#include "xfxelemmarkvisuals.h"
|
||||
|
||||
XFxElemMarkVisuals::XFxElemMarkVisuals()
|
||||
: XAsset()
|
||||
, mMaterialPtrs()
|
||||
, mMaterials()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemMarkVisuals::~XFxElemMarkVisuals()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemMarkVisuals::Clear()
|
||||
{
|
||||
mMaterialPtrs.clear();
|
||||
mMaterials.clear();
|
||||
}
|
||||
|
||||
void XFxElemMarkVisuals::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxelemmarkvisuals.h
Normal file
23
libs/xassets/xfxelemmarkvisuals.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXELEMMARKVISUALS_H
|
||||
#define XFXELEMMARKVISUALS_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xmaterial.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxElemMarkVisuals : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemMarkVisuals();
|
||||
~XFxElemMarkVisuals();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector<qint32> mMaterialPtrs;
|
||||
QVector<XMaterial> mMaterials;
|
||||
};
|
||||
|
||||
#endif // XFXELEMMARKVISUALS_H
|
||||
47
libs/xassets/xfxelemvisstatesample.cpp
Normal file
47
libs/xassets/xfxelemvisstatesample.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemVisStateSample::XFxElemVisStateSample()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemVisStateSample::~XFxElemVisStateSample()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemVisStateSample::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemVisStateSample::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
21
libs/xassets/xfxelemvisstatesample.h
Normal file
21
libs/xassets/xfxelemvisstatesample.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef XFXELEMVISSTATESAMPLE_H
|
||||
#define XFXELEMVISSTATESAMPLE_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
|
||||
class XFxElemVisStateSample : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVisStateSample();
|
||||
~XFxElemVisStateSample();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
XFxElemVisualState mBase;
|
||||
XFxElemVisualState mAmplitude;
|
||||
};
|
||||
|
||||
#endif // XFXELEMVISSTATESAMPLE_H
|
||||
43
libs/xassets/xfxelemvisuals.cpp
Normal file
43
libs/xassets/xfxelemvisuals.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
#include "xfxelemvisuals.h"
|
||||
|
||||
XFxElemVisuals::XFxElemVisuals()
|
||||
: XAsset()
|
||||
, mAnonymousPtr(0)
|
||||
, mAnonymous(nullptr)
|
||||
, mMaterialPtr(0)
|
||||
, mMaterial(new XMaterial())
|
||||
, mModelPtr(0)
|
||||
, mModel(new XModel())
|
||||
, mEffectDef()
|
||||
, mSoundNamePtr(0)
|
||||
, mSoundName("")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxElemVisuals::~XFxElemVisuals()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxElemVisuals::Clear()
|
||||
{
|
||||
mAnonymousPtr = 0;
|
||||
mAnonymous = nullptr;
|
||||
|
||||
mMaterialPtr = 0;
|
||||
mMaterial = new XMaterial();
|
||||
|
||||
mModelPtr = 0;
|
||||
mModel = new XModel();
|
||||
|
||||
mEffectDef = XEffectDefRef();
|
||||
|
||||
mSoundNamePtr = 0;
|
||||
mSoundName = "";
|
||||
}
|
||||
|
||||
void XFxElemVisuals::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
36
libs/xassets/xfxelemvisuals.h
Normal file
36
libs/xassets/xfxelemvisuals.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef XFXELEMVISUALS_H
|
||||
#define XFXELEMVISUALS_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
#include "xmaterial.h"
|
||||
#include "xmodel.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxElemVisuals : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxElemVisuals();
|
||||
~XFxElemVisuals();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
qint32 mAnonymousPtr;
|
||||
const void *mAnonymous;
|
||||
|
||||
qint32 mMaterialPtr;
|
||||
XMaterial *mMaterial;
|
||||
|
||||
qint32 mModelPtr;
|
||||
XModel *mModel;
|
||||
|
||||
XEffectDefRef mEffectDef;
|
||||
|
||||
qint32 mSoundNamePtr;
|
||||
QString mSoundName;
|
||||
};
|
||||
|
||||
#endif // XFXELEMVISUALS_H
|
||||
29
libs/xassets/xfximpactentry.cpp
Normal file
29
libs/xassets/xfximpactentry.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "xfximpactentry.h"
|
||||
|
||||
XFxImpactEntry::XFxImpactEntry()
|
||||
: XAsset()
|
||||
, mNonFleshPtrs()
|
||||
, mNonFlesh()
|
||||
, mFleshPtrs()
|
||||
, mFlesh()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxImpactEntry::~XFxImpactEntry()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxImpactEntry::Clear()
|
||||
{
|
||||
mNonFleshPtrs.clear();
|
||||
mNonFlesh.clear();
|
||||
mFleshPtrs.clear();
|
||||
mFlesh.clear();
|
||||
}
|
||||
|
||||
void XFxImpactEntry::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
24
libs/xassets/xfximpactentry.h
Normal file
24
libs/xassets/xfximpactentry.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef XFXIMPACTENTRY_H
|
||||
#define XFXIMPACTENTRY_H
|
||||
|
||||
#include "xasset.h"
|
||||
#include "xeffectdef.h"
|
||||
|
||||
class XFxImpactEntry : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxImpactEntry();
|
||||
~XFxImpactEntry();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector<qint32> mNonFleshPtrs;
|
||||
QVector<XEffectDef> mNonFlesh;
|
||||
|
||||
QVector<qint32> mFleshPtrs;
|
||||
QVector<XEffectDef> mFlesh;
|
||||
};
|
||||
|
||||
#endif // XFXIMPACTENTRY_H
|
||||
35
libs/xassets/xfxtraildef.cpp
Normal file
35
libs/xassets/xfxtraildef.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#include "xfxtraildef.h"
|
||||
|
||||
XFxTrailDef::XFxTrailDef()
|
||||
: XAsset()
|
||||
, mScrollTimeMsec(0)
|
||||
, mRepeatDist(0)
|
||||
, mSplitDist(0)
|
||||
, mVertCount(0)
|
||||
, mVerts()
|
||||
, mIndCount(0)
|
||||
, mIndices()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailDef::~XFxTrailDef()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailDef::Clear()
|
||||
{
|
||||
mScrollTimeMsec = 0;
|
||||
mRepeatDist = 0;
|
||||
mSplitDist = 0;
|
||||
mVertCount = 0;
|
||||
mVerts = QVector<XFxTrailVertex>();
|
||||
mIndCount = 0;
|
||||
mIndices = QVector<quint16>();
|
||||
}
|
||||
|
||||
void XFxTrailDef::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
27
libs/xassets/xfxtraildef.h
Normal file
27
libs/xassets/xfxtraildef.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef XFXTRAILDEF_H
|
||||
#define XFXTRAILDEF_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
class XFxTrailDef : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailDef();
|
||||
~XFxTrailDef();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
int mScrollTimeMsec;
|
||||
int mRepeatDist;
|
||||
int mSplitDist;
|
||||
int mVertCount;
|
||||
QVector<XFxTrailVertex> mVerts;
|
||||
int mIndCount;
|
||||
QVector<quint16> mIndices;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILDEF_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (2).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (2).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (2).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (2).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (3).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (3).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (3).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (3).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (4).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (4).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (4).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (4).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (5).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (5).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (5).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (5).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (6).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (6).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (6).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (6).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex - Copy (7).cpp
Normal file
27
libs/xassets/xfxtrailvertex - Copy (7).cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex - Copy (7).h
Normal file
23
libs/xassets/xfxtrailvertex - Copy (7).h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
27
libs/xassets/xfxtrailvertex.cpp
Normal file
27
libs/xassets/xfxtrailvertex.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "xfxtrailvertex.h"
|
||||
|
||||
XFxTrailVertex::XFxTrailVertex()
|
||||
: XAsset()
|
||||
, mPos()
|
||||
, mNormal()
|
||||
, mTexCoord(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
XFxTrailVertex::~XFxTrailVertex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XFxTrailVertex::Clear()
|
||||
{
|
||||
mPos = QVector2D();
|
||||
mNormal = QVector2D();
|
||||
mTexCoord = 0;
|
||||
}
|
||||
|
||||
void XFxTrailVertex::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
23
libs/xassets/xfxtrailvertex.h
Normal file
23
libs/xassets/xfxtrailvertex.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef XFXTRAILVERTEX_H
|
||||
#define XFXTRAILVERTEX_H
|
||||
|
||||
#include "xasset.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
class XFxTrailVertex : public XAsset
|
||||
{
|
||||
public:
|
||||
explicit XFxTrailVertex();
|
||||
~XFxTrailVertex();
|
||||
|
||||
void Clear() override;
|
||||
void ParseData(QDataStream *aStream) override;
|
||||
|
||||
private:
|
||||
QVector2D mPos;
|
||||
QVector2D mNormal;
|
||||
float mTexCoord;
|
||||
};
|
||||
|
||||
#endif // XFXTRAILVERTEX_H
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#ifndef XGAMEWORLDMP_H
|
||||
#define XGAMEWORLDMP_H
|
||||
|
||||
|
||||
19
libs/xassets/xgfxcolor.cpp
Normal file
19
libs/xassets/xgfxcolor.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "xgfxcolor.h"
|
||||
|
||||
XGfxColor::XGfxColor()
|
||||
: XAsset()
|
||||
, mPacked(0)
|
||||
, mArray()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XGfxColor::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XGfxColor::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
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