summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-20 11:39:44 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-20 11:40:59 +0100
commitbe92b57b54241de55e233376f481ba848ca8df35 (patch)
tree18111337fba137a947e5c7479021887a0c302fcb /src/entities
parentMerge pull request #890 from aap/miami (diff)
downloadre3-be92b57b54241de55e233376f481ba848ca8df35.tar
re3-be92b57b54241de55e233376f481ba848ca8df35.tar.gz
re3-be92b57b54241de55e233376f481ba848ca8df35.tar.bz2
re3-be92b57b54241de55e233376f481ba848ca8df35.tar.lz
re3-be92b57b54241de55e233376f481ba848ca8df35.tar.xz
re3-be92b57b54241de55e233376f481ba848ca8df35.tar.zst
re3-be92b57b54241de55e233376f481ba848ca8df35.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Building.cpp44
-rw-r--r--src/entities/Building.h20
-rw-r--r--src/entities/Solid.h12
-rw-r--r--src/entities/Treadable.cpp8
-rw-r--r--src/entities/Treadable.h12
5 files changed, 0 insertions, 96 deletions
diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp
deleted file mode 100644
index 8035cf25..00000000
--- a/src/entities/Building.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "common.h"
-
-#include "Building.h"
-#include "Streaming.h"
-#include "Pools.h"
-
-void *CBuilding::operator new(size_t sz) { return CPools::GetBuildingPool()->New(); }
-void CBuilding::operator delete(void *p, size_t sz) { CPools::GetBuildingPool()->Delete((CBuilding*)p); }
-
-void
-CBuilding::ReplaceWithNewModel(int32 id)
-{
- DeleteRwObject();
-
- if (CModelInfo::GetModelInfo(m_modelIndex)->GetNumRefs() == 0)
- CStreaming::RemoveModel(m_modelIndex);
- m_modelIndex = id;
-
- if(bIsBIGBuilding)
- if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
- CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
-}
-
-bool
-IsBuildingPointerValid(CBuilding* pBuilding)
-{
- if (!pBuilding)
- return false;
- if (pBuilding->GetIsATreadable()) {
- int index = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pBuilding);
-#ifdef FIX_BUGS
- return index >= 0 && index < CPools::GetTreadablePool()->GetSize();
-#else
- return index >= 0 && index <= CPools::GetTreadablePool()->GetSize();
-#endif
- } else {
- int index = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pBuilding);
-#ifdef FIX_BUGS
- return index >= 0 && index < CPools::GetBuildingPool()->GetSize();
-#else
- return index >= 0 && index <= CPools::GetBuildingPool()->GetSize();
-#endif
- }
-}
diff --git a/src/entities/Building.h b/src/entities/Building.h
deleted file mode 100644
index 2c2dfb1f..00000000
--- a/src/entities/Building.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-
-#include "Entity.h"
-
-class CBuilding : public CEntity
-{
-public:
- CBuilding(void) {
- m_type = ENTITY_TYPE_BUILDING;
- bUsesCollision = true;
- }
- static void *operator new(size_t);
- static void operator delete(void*, size_t);
-
- void ReplaceWithNewModel(int32 id);
-
- virtual bool GetIsATreadable(void) { return false; }
-};
-
-bool IsBuildingPointerValid(CBuilding*);
diff --git a/src/entities/Solid.h b/src/entities/Solid.h
deleted file mode 100644
index 4ca800c2..00000000
--- a/src/entities/Solid.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-
-#include "Entity.h"
-
-class CSolid : public CEntity
-{
-public:
- CSolid(void) {
- m_type = ENTITY_TYPE_BUILDING;
- bUsesCollision = true;
- }
-}; \ No newline at end of file
diff --git a/src/entities/Treadable.cpp b/src/entities/Treadable.cpp
deleted file mode 100644
index 00abbe13..00000000
--- a/src/entities/Treadable.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "common.h"
-
-#include "rpworld.h"
-#include "Treadable.h"
-#include "Pools.h"
-
-void *CTreadable::operator new(size_t sz) { return CPools::GetTreadablePool()->New(); }
-void CTreadable::operator delete(void *p, size_t sz) { CPools::GetTreadablePool()->Delete((CTreadable*)p); }
diff --git a/src/entities/Treadable.h b/src/entities/Treadable.h
deleted file mode 100644
index c3ab755e..00000000
--- a/src/entities/Treadable.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-
-#include "Building.h"
-
-class CTreadable : public CBuilding
-{
-public:
- static void *operator new(size_t);
- static void operator delete(void*, size_t);
-
- bool GetIsATreadable(void) { return true; }
-};