summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Building.h5
-rw-r--r--src/entities/Dummy.h3
-rw-r--r--src/entities/DummyObject.cpp13
-rw-r--r--src/entities/DummyObject.h7
-rw-r--r--src/entities/Entity.cpp2
-rw-r--r--src/entities/Entity.h2
6 files changed, 28 insertions, 4 deletions
diff --git a/src/entities/Building.h b/src/entities/Building.h
index d33aaa4f..612e0fb3 100644
--- a/src/entities/Building.h
+++ b/src/entities/Building.h
@@ -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);
diff --git a/src/entities/Dummy.h b/src/entities/Dummy.h
index e7506617..034d4c57 100644
--- a/src/entities/Dummy.h
+++ b/src/entities/Dummy.h
@@ -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);
};
diff --git a/src/entities/DummyObject.cpp b/src/entities/DummyObject.cpp
new file mode 100644
index 00000000..083ad6c6
--- /dev/null
+++ b/src/entities/DummyObject.cpp
@@ -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;
+}
diff --git a/src/entities/DummyObject.h b/src/entities/DummyObject.h
index 7bfe3a57..d4dce609 100644
--- a/src/entities/DummyObject.h
+++ b/src/entities/DummyObject.h
@@ -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");
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp
index 2338f627..0ab1488d 100644
--- a/src/entities/Entity.cpp
+++ b/src/entities/Entity.cpp
@@ -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;
diff --git a/src/entities/Entity.h b/src/entities/Entity.h
index 73a2c668..95294ed8 100644
--- a/src/entities/Entity.h
+++ b/src/entities/Entity.h
@@ -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?