finished CFileLoader, except a crash!

This commit is contained in:
aap
2019-06-18 09:50:26 +02:00
parent ad12240586
commit 3b64bd1b4a
17 changed files with 345 additions and 13 deletions

View File

@ -6,7 +6,10 @@ class CBuilding : public CEntity
{
public:
// TODO: ReplaceWithNewModel
// TODO: ctor
CBuilding(void) {
m_type = ENTITY_TYPE_BUILDING;
bUsesCollision = true;
}
static void *operator new(size_t);
static void operator delete(void*, size_t);

View File

@ -8,6 +8,9 @@ class CDummy : public CEntity
public:
CEntryInfoList m_entryInfoList;
CDummy(void) { m_type = ENTITY_TYPE_DUMMY; }
// TODO: Add, Remove
static void *operator new(size_t);
static void operator delete(void*, size_t);
};

View File

@ -0,0 +1,13 @@
#include "common.h"
#include "patcher.h"
#include "DummyObject.h"
#include "Pools.h"
CDummyObject::CDummyObject(CObject *obj)
{
SetModelIndexNoCreate(obj->GetModelIndex());
if(obj->m_rwObject)
AttachToRwObject(obj->m_rwObject);
obj->DetachFromRwObject();
m_level = obj->m_level;
}

View File

@ -2,7 +2,12 @@
#include "Dummy.h"
class CDummyObject : CDummy
class CObject;
class CDummyObject : public CDummy
{
public:
CDummyObject(void) {}
CDummyObject(CObject *obj);
};
static_assert(sizeof(CDummyObject) == 0x68, "CDummyObject: error");

View File

@ -48,7 +48,7 @@ CEntity::CEntity(void)
bHasHitWall = false;
bImBeingRendered = false;
m_flagD8 = false;
m_flagD10 = false;
bIsSubway = false;
bDrawLast = false;
m_flagD40 = false;
m_flagD80 = false;

View File

@ -79,7 +79,7 @@ public:
uint32 bHasHitWall : 1;
uint32 bImBeingRendered : 1;
uint32 m_flagD8 : 1;
uint32 m_flagD10 : 1;
uint32 bIsSubway : 1; // set when subway, but maybe different meaning?
uint32 bDrawLast : 1;
uint32 m_flagD40 : 1;
uint32 m_flagD80 : 1; // CObject visibility?