diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-05 17:04:43 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-05 17:04:43 +0200 |
commit | c2b9ddc5b8935dcd8de593c918f50886e0400319 (patch) | |
tree | 99f4d7dec983e7ad6f4071cc259c8c0de2eda2e2 /src/modelinfo | |
parent | Remove Miami stuff (diff) | |
download | re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar.gz re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar.bz2 re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar.lz re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar.xz re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.tar.zst re3-c2b9ddc5b8935dcd8de593c918f50886e0400319.zip |
Diffstat (limited to '')
-rw-r--r-- | src/modelinfo/ModelInfo.cpp | 16 | ||||
-rw-r--r-- | src/modelinfo/ModelInfo.h | 3 | ||||
-rw-r--r-- | src/modelinfo/SimpleModelInfo.cpp | 10 | ||||
-rw-r--r-- | src/modelinfo/SimpleModelInfo.h | 3 |
4 files changed, 32 insertions, 0 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp index da09bdfa..62deae2b 100644 --- a/src/modelinfo/ModelInfo.cpp +++ b/src/modelinfo/ModelInfo.cpp @@ -200,6 +200,20 @@ CModelInfo::GetModelInfo(const char *name, int *id) return nil; } +#ifdef MIAMI +CBaseModelInfo* +CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex) +{ + CBaseModelInfo *modelinfo; + for(int i = minIndex; i <= maxIndex; i++){ + modelinfo = CModelInfo::ms_modelInfoPtrs[i]; + if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name)) + return modelinfo; + } + return nil; +} +#endif + bool CModelInfo::IsBoatModel(int32 id) { @@ -214,6 +228,7 @@ CModelInfo::IsBikeModel(int32 id) ((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_BIKE; } +#ifndef MIAMI void CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level) { @@ -230,6 +245,7 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level) } } } +#endif void CModelInfo::ConstructMloClumps() diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index 65cfa4e7..dadc8f8b 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -42,6 +42,9 @@ public: static CBaseModelInfo *GetModelInfo(int id){ return ms_modelInfoPtrs[id]; } +#ifdef MIAMI + static CBaseModelInfo *GetModelInfo(const char *name, int minIndex, int maxIndex); +#endif static bool IsBoatModel(int32 id); static bool IsBikeModel(int32 id); diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp index 36e98e18..63b057da 100644 --- a/src/modelinfo/SimpleModelInfo.cpp +++ b/src/modelinfo/SimpleModelInfo.cpp @@ -130,6 +130,16 @@ CSimpleModelInfo::GetAtomicFromDistance(float dist) return nil; } +#ifdef MIAMI +RpAtomic* +CSimpleModelInfo::GetFirstAtomicFromDistance(float dist) +{ + if(dist < m_lodDistances[0] * TheCamera.LODDistMultiplier) + return m_atomics[0]; + return nil; +} +#endif + void CSimpleModelInfo::FindRelatedModel(void) { diff --git a/src/modelinfo/SimpleModelInfo.h b/src/modelinfo/SimpleModelInfo.h index 8c4173e9..451a9c00 100644 --- a/src/modelinfo/SimpleModelInfo.h +++ b/src/modelinfo/SimpleModelInfo.h @@ -40,6 +40,9 @@ public: float GetNearDistance(void); float GetLargestLodDistance(void); RpAtomic *GetAtomicFromDistance(float dist); +#ifdef MIAMI + RpAtomic *GetFirstAtomicFromDistance(float dist); // inline +#endif void FindRelatedModel(void); void SetupBigBuilding(void); |