summaryrefslogtreecommitdiff
path: root/src/modelinfo/ModelInfo.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-01-20 22:41:41 +0200
committerSergeanur <s.anureev@yandex.ua>2020-01-20 22:58:13 +0200
commita9f39d828426df60876f00a5d2164eb50879b5c9 (patch)
tree739e2dafe2617481334ba7f28a94b1733e19cc1a /src/modelinfo/ModelInfo.cpp
parentd52452e69f8dcf8df6fcc16dd841110c26ec18fa (diff)
MLO, XtraCompsModelInfo, MovingThing, Solid
Diffstat (limited to 'src/modelinfo/ModelInfo.cpp')
-rw-r--r--src/modelinfo/ModelInfo.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index c7e18e5f..fdde699b 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -11,10 +11,13 @@ CBaseModelInfo **CModelInfo::ms_modelInfoPtrs = (CBaseModelInfo**)0x83D408;
//CStore<CTimeModelInfo, TIMEMODELSIZE> &CModelInfo::ms_timeModelStore = *(CStore<CTimeModelInfo, TIMEMODELSIZE>*)0x94076C;
//CStore<C2dEffect, TWODFXSIZE> &CModelInfo::ms_2dEffectStore = *(CStore<C2dEffect, TWODFXSIZE>*)0x9434F8;
CStore<CSimpleModelInfo, SIMPLEMODELSIZE> CModelInfo::ms_simpleModelStore;
+CStore<CMloModelInfo, MLOMODELSIZE> CModelInfo::ms_mloModelStore;
+CStore<CInstance, MLOINSTANCESIZE> CModelInfo::ms_mloInstanceStore;
CStore<CTimeModelInfo, TIMEMODELSIZE> CModelInfo::ms_timeModelStore;
CStore<CClumpModelInfo, CLUMPMODELSIZE> CModelInfo::ms_clumpModelStore;
CStore<CPedModelInfo, PEDMODELSIZE> CModelInfo::ms_pedModelStore;
CStore<CVehicleModelInfo, VEHICLEMODELSIZE> CModelInfo::ms_vehicleModelStore;
+CStore<CXtraCompsModelInfo, XTRACOMPSMODELSIZE> CModelInfo::ms_xtraCompsModelStore;
CStore<C2dEffect, TWODFXSIZE> CModelInfo::ms_2dEffectStore;
void
@@ -26,8 +29,11 @@ CModelInfo::Initialise(void)
for(i = 0; i < MODELINFOSIZE; i++)
ms_modelInfoPtrs[i] = nil;
ms_2dEffectStore.clear();
+ ms_mloInstanceStore.clear();
+ ms_xtraCompsModelStore.clear();
ms_simpleModelStore.clear();
ms_timeModelStore.clear();
+ ms_mloModelStore.clear();
ms_clumpModelStore.clear();
ms_pedModelStore.clear();
ms_vehicleModelStore.clear();
@@ -109,6 +115,18 @@ CModelInfo::AddSimpleModel(int id)
return modelinfo;
}
+CMloModelInfo *
+CModelInfo::AddMloModel(int id)
+{
+ CMloModelInfo *modelinfo;
+ modelinfo = CModelInfo::ms_mloModelStore.alloc();
+ CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
+ modelinfo->m_clump = 0;
+ modelinfo->firstInstance = 0;
+ modelinfo->lastInstance = 0;
+ return modelinfo;
+}
+
CTimeModelInfo*
CModelInfo::AddTimeModel(int id)
{
@@ -200,6 +218,13 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
}
}
+
+CStore<CInstance, MLOINSTANCESIZE>*
+CModelInfo::GetMloInstanceStore()
+{
+ return &CModelInfo::ms_mloInstanceStore;
+}
+
STARTPATCHES
InjectHook(0x50B310, CModelInfo::Initialise, PATCH_JUMP);
InjectHook(0x50B5B0, CModelInfo::ShutDown, PATCH_JUMP);