summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/BaseModelInfo.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-07 22:22:15 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-07 22:22:15 +0200
commitb99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04 (patch)
treeab07a4b632108268d62700baf702536c1e87b4f9 /src/modelinfo/BaseModelInfo.cpp
parentintermediate changes (diff)
parentCBaseModelInfo done (diff)
downloadre3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.gz
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.bz2
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.lz
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.xz
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.zst
re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.zip
Diffstat (limited to 'src/modelinfo/BaseModelInfo.cpp')
-rw-r--r--src/modelinfo/BaseModelInfo.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/modelinfo/BaseModelInfo.cpp b/src/modelinfo/BaseModelInfo.cpp
index a2779107..31bb2500 100644
--- a/src/modelinfo/BaseModelInfo.cpp
+++ b/src/modelinfo/BaseModelInfo.cpp
@@ -4,12 +4,14 @@
#include "TxdStore.h"
#include "2dEffect.h"
#include "BaseModelInfo.h"
+#include "ModelInfo.h"
+//--MIAMI: file done
CBaseModelInfo::CBaseModelInfo(ModelInfoType type)
{
m_colModel = nil;
- m_twodEffects = nil;
+ m_2dEffectsID = -1;
m_objectId = -1;
m_refCount = 0;
m_txdSlot = -1;
@@ -23,7 +25,7 @@ CBaseModelInfo::Shutdown(void)
{
DeleteCollisionModel();
DeleteRwObject();
- m_twodEffects = nil;
+ m_2dEffectsID = -1;
m_num2dEffects = 0;
m_txdSlot = -1;
}
@@ -76,17 +78,17 @@ CBaseModelInfo::RemoveTexDictionaryRef(void)
void
CBaseModelInfo::Init2dEffects(void)
{
- m_twodEffects = nil;
+ m_2dEffectsID = -1;
m_num2dEffects = 0;
}
void
CBaseModelInfo::Add2dEffect(C2dEffect *fx)
{
- if(m_twodEffects)
+ if(m_2dEffectsID >= 0)
m_num2dEffects++;
else{
- m_twodEffects = fx;
+ m_2dEffectsID = CModelInfo::Get2dEffectStore().getIndex(fx);
m_num2dEffects = 1;
}
}
@@ -94,8 +96,8 @@ CBaseModelInfo::Add2dEffect(C2dEffect *fx)
C2dEffect*
CBaseModelInfo::Get2dEffect(int n)
{
- if(m_twodEffects)
- return &m_twodEffects[n];
+ if(m_2dEffectsID >= 0)
+ return CModelInfo::Get2dEffectStore().getItem(m_2dEffectsID+n);
else
return nil;
}