summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-06-18 14:34:35 +0200
committereray orçunus <erayorcunus@gmail.com>2019-06-18 14:34:35 +0200
commit886db44936757c4ace710b40713fbae1aa575c45 (patch)
treeaf3622689fedeac10516cfdcf5f3d1f0471746b6 /src/entities
parentCPed fixes (diff)
parentsilly mistake in CFileLoader (diff)
downloadre3-886db44936757c4ace710b40713fbae1aa575c45.tar
re3-886db44936757c4ace710b40713fbae1aa575c45.tar.gz
re3-886db44936757c4ace710b40713fbae1aa575c45.tar.bz2
re3-886db44936757c4ace710b40713fbae1aa575c45.tar.lz
re3-886db44936757c4ace710b40713fbae1aa575c45.tar.xz
re3-886db44936757c4ace710b40713fbae1aa575c45.tar.zst
re3-886db44936757c4ace710b40713fbae1aa575c45.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Building.h5
-rw-r--r--src/entities/CutsceneHead.cpp1
-rw-r--r--src/entities/CutsceneObject.cpp1
-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
-rw-r--r--src/entities/Ped.cpp1
9 files changed, 30 insertions, 5 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/CutsceneHead.cpp b/src/entities/CutsceneHead.cpp
index 766befb0..a9c47777 100644
--- a/src/entities/CutsceneHead.cpp
+++ b/src/entities/CutsceneHead.cpp
@@ -1,6 +1,7 @@
#include "common.h"
#include <rpskin.h>
#include "patcher.h"
+#include "main.h"
#include "RwHelper.h"
#include "RpAnimBlend.h"
#include "AnimBlendClumpData.h"
diff --git a/src/entities/CutsceneObject.cpp b/src/entities/CutsceneObject.cpp
index d00a668b..1e665dd6 100644
--- a/src/entities/CutsceneObject.cpp
+++ b/src/entities/CutsceneObject.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "main.h"
#include "lights.h"
#include "PointLights.h"
#include "RpAnimBlend.h"
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?
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index 181ba5b7..f6d9f4b2 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -4,7 +4,6 @@
#include "Particle.h"
#include "Stats.h"
#include "World.h"
-#include "PedStat.h"
#include "DMaudio.h"
#include "Ped.h"
#include "PedType.h"