summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/BaseModelInfo.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-07 21:55:54 +0200
committeraap <aap@papnet.eu>2020-05-07 21:55:54 +0200
commitc715569d1d52ebc2a99544a98bedbfdabf8fd3a7 (patch)
tree3040a6d3af78f844c430bcb10309d59da00f80bc /src/modelinfo/BaseModelInfo.cpp
parentlittle script change (diff)
downloadre3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.gz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.bz2
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.lz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.xz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.zst
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.zip
Diffstat (limited to '')
-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;
}