mirror of
https://github.com/PrimeDecomp/prime.git
synced 2026-07-12 18:18:56 -07:00
35 lines
798 B
C++
35 lines
798 B
C++
#ifndef _SOBJECTTAG
|
|
#define _SOBJECTTAG
|
|
|
|
#include "Streams/CInputStream.hpp"
|
|
#include "types.h"
|
|
|
|
#define kInvalidAssetId 0xFFFFFFFFu
|
|
|
|
typedef uint CAssetId;
|
|
typedef uint FourCC;
|
|
|
|
class SObjectTag {
|
|
public:
|
|
SObjectTag() {}
|
|
SObjectTag(const FourCC type, const CAssetId id) : mType(type), mId(id) {}
|
|
SObjectTag(const SObjectTag& other) : mType(other.mType), mId(other.mId) {}
|
|
SObjectTag(CInputStream& in) : mType(in.Get< FourCC >()), mId(in.Get< CAssetId >()) {}
|
|
|
|
SObjectTag& operator=(const SObjectTag& other) {
|
|
mType = other.mType;
|
|
mId = other.mId;
|
|
return *this;
|
|
}
|
|
|
|
const CAssetId GetId() const { return mId; }
|
|
const FourCC GetType() const { return mType; }
|
|
static const char* Type2Text(FourCC type);
|
|
|
|
private:
|
|
FourCC mType;
|
|
CAssetId mId;
|
|
};
|
|
|
|
#endif // _SOBJECTTAG
|