Update asset and animation structure definitions
This commit is contained in:
parent
caca3dd489
commit
a85abf0ecd
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef XANIMPARTTRANS_H
|
#ifndef XANIMPARTTRANS_H
|
||||||
#define XANIMPARTTRANS_H
|
#define XANIMPARTTRANS_H
|
||||||
|
|
||||||
@ -14,6 +8,7 @@ class XAnimPartTrans : public XAsset
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit XAnimPartTrans();
|
explicit XAnimPartTrans();
|
||||||
|
~XAnimPartTrans();
|
||||||
|
|
||||||
void ParseData(QDataStream *aStream) override;
|
void ParseData(QDataStream *aStream) override;
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef XANIMPARTTRANSDATA_H
|
#ifndef XANIMPARTTRANSDATA_H
|
||||||
#define XANIMPARTTRANSDATA_H
|
#define XANIMPARTTRANSDATA_H
|
||||||
|
|
||||||
@ -13,6 +8,7 @@ class XAnimPartTransData : public XAsset
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit XAnimPartTransData();
|
explicit XAnimPartTransData();
|
||||||
|
~XAnimPartTransData();
|
||||||
|
|
||||||
void ParseData(QDataStream *aStream) override;
|
void ParseData(QDataStream *aStream) override;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
#ifndef XASSET_H
|
#ifndef XASSET_H
|
||||||
#define XASSET_H
|
#define XASSET_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QDataStream>
|
||||||
|
|
||||||
class XAsset
|
class XAsset
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
XAsset();
|
XAsset();
|
||||||
virtual ~XAsset();
|
virtual ~XAsset();
|
||||||
|
|||||||
@ -1,32 +1,37 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "xassetlist.h"
|
#include "xassetlist.h"
|
||||||
|
|
||||||
XAssetList::XAssetList()
|
XAssetList::XAssetList()
|
||||||
: XAsset() {
|
: XAsset()
|
||||||
|
, mStringList()
|
||||||
|
, mAssetCount(0)
|
||||||
|
, mAssets()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void XAssetList::ParseData(QDataStream *aStream) {
|
void XAssetList::ParseData(QDataStream *aStream) {
|
||||||
if (GetPtr() == -1) {
|
if (GetPtr() == -1) {
|
||||||
// Parse string list
|
// Parse string list
|
||||||
mStringList.ParseData(aStream);
|
mStringList.ParsePtr(aStream);
|
||||||
|
|
||||||
// Parse asset count and assets
|
// Parse asset count and assets
|
||||||
aStream->read((char*)&mAssetCount, sizeof(int));
|
*aStream >> mAssetCount;
|
||||||
for (int i = 0; i < mAssetCount; ++i) {
|
aStream->skipRawData(2 * 4);
|
||||||
XAsset asset;
|
|
||||||
asset.ParseData(aStream);
|
mStringList.ParseData(aStream);
|
||||||
mAssets.append(asset);
|
|
||||||
|
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;
|
return mStringList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XAssetList::SetStringList(const ScriptStringList& stringList) {
|
void XAssetList::SetStringList(const XScriptStringList& stringList) {
|
||||||
mStringList = stringList;
|
mStringList = stringList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,15 +43,11 @@ void XAssetList::SetAssetCount(int count) {
|
|||||||
mAssetCount = count;
|
mAssetCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<XAsset>& XAssetList::GetAssets() {
|
QVector<XAsset*> XAssetList::GetAssets() {
|
||||||
return mAssets;
|
return mAssets;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVector<XAsset>& XAssetList::GetAssets() const {
|
void XAssetList::SetAssets(QVector<XAsset *> assets) {
|
||||||
return mAssets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void XAssetList::SetAssets(const QVector<XAsset>& assets) {
|
|
||||||
mAssets = assets;
|
mAssets = assets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifndef XASSETLIST_H
|
#ifndef XASSETLIST_H
|
||||||
#define XASSETLIST_H
|
#define XASSETLIST_H
|
||||||
|
|
||||||
|
#include "xscriptstringlist.h"
|
||||||
#include "xasset.h"
|
#include "xasset.h"
|
||||||
|
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include "scriptstringlist.h"
|
|
||||||
|
|
||||||
class XAssetList : public XAsset
|
class XAssetList : public XAsset
|
||||||
{
|
{
|
||||||
@ -14,20 +13,19 @@ public:
|
|||||||
|
|
||||||
void ParseData(QDataStream *aStream) override;
|
void ParseData(QDataStream *aStream) override;
|
||||||
|
|
||||||
const ScriptStringList& GetStringList() const;
|
XScriptStringList GetStringList() const;
|
||||||
void SetStringList(const ScriptStringList& stringList);
|
void SetStringList(const XScriptStringList& stringList);
|
||||||
|
|
||||||
int GetAssetCount() const;
|
int GetAssetCount() const;
|
||||||
void SetAssetCount(int count);
|
void SetAssetCount(int count);
|
||||||
|
|
||||||
QVector<XAsset>& GetAssets();
|
QVector<XAsset*> GetAssets();
|
||||||
const QVector<XAsset>& GetAssets() const;
|
void SetAssets(QVector<XAsset *> assets);
|
||||||
void SetAssets(const QVector<XAsset>& assets);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ScriptStringList mStringList;
|
XScriptStringList mStringList;
|
||||||
int mAssetCount = 0;
|
int mAssetCount = 0;
|
||||||
QVector<XAsset> mAssets;
|
QVector<XAsset*> mAssets;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // XASSETLIST_H
|
#endif // XASSETLIST_H
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user