Initial work on CActor.cpp

This commit is contained in:
2022-08-12 21:26:00 -04:00
parent e418784c51
commit 44b17813bd
109 changed files with 1295 additions and 335 deletions

View File

@@ -3,8 +3,11 @@
#include "types.h"
#include "rstl/auto_ptr.hpp"
#include "rstl/rc_ptr.hpp"
#define kInvalidAssetId 0xFFFFFFFFu
typedef u32 CAssetId;
typedef u32 FourCC;
@@ -12,17 +15,36 @@ struct SObjectTag {
FourCC type;
CAssetId id;
SObjectTag() {}
SObjectTag(FourCC type, CAssetId id) : type(type), id(id) {}
SObjectTag(const SObjectTag& other) : type(other.type), id(other.id) {}
};
class IObjectStore;
class IObj;
class CVParamTransfer {
public:
static CVParamTransfer Null();
private:
rstl::rc_ptr< void > x0_;
};
class CObjectReference {
public:
CObjectReference(const rstl::auto_ptr< IObj >& obj);
// : x0_refCount(0)
// , x2_locked(false)
// , x2_lockCount(0)
// , xc_objectStore(nullptr)
// , x10_object(obj.release())
// , x14_params(CVParamTransfer::Null()) {}
CObjectReference(IObjectStore* store, const rstl::auto_ptr< IObj >& obj, SObjectTag tag, CVParamTransfer xfer);
private:
u16 x0_refCount;
u16 x2_lockCount;
bool x2_locked : 1;
u16 x2_lockCount : 15;
SObjectTag x4_objTag;
IObjectStore* xc_objectStore;
IObj* x10_object;