XPlor/libs/xassets/xgameworldsp.cpp

42 lines
692 B
C++
Raw Normal View History

2025-08-17 13:14:17 -04:00
#include "xgameworldsp.h"
2025-09-05 18:35:17 -04:00
#include "xstring.h"
2025-08-17 13:14:17 -04:00
XGameWorldSp::XGameWorldSp()
2025-09-05 18:35:17 -04:00
: XAsset()
, mName("")
, mPath()
{
SetType(ASSET_TYPE_GAMEWORLD_SP);
SetName("GameWorld SP");
}
XGameWorldSp::~XGameWorldSp()
{
2025-08-17 13:14:17 -04:00
}
void XGameWorldSp::ParseData(QDataStream *aStream) {
// Parse the name string
if (GetPtr() == -1) {
mName = XString::ParseCustom(aStream);
// Parse the path data using our new XPathData class
2025-09-05 18:35:17 -04:00
mPath.ParseData(aStream);
2025-08-17 13:14:17 -04:00
}
}
2025-09-05 18:35:17 -04:00
void XGameWorldSp::Clear()
{
mName.clear();
mPath.Clear();
}
2025-08-17 13:14:17 -04:00
QString XGameWorldSp::GetName() const {
return mName;
}
void XGameWorldSp::SetName(const QString& name) {
mName = name;
}