feat(model): add CM2Model::AddRef

This commit is contained in:
fallenoak 2025-10-12 11:09:55 -05:00
parent e2cd7394ae
commit 9b7b9a4b1e
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 7 additions and 2 deletions

View File

@ -76,6 +76,10 @@ uint16_t CM2Model::Sub8260C0(M2Data* data, uint32_t sequenceId, int32_t a3) {
return -1; return -1;
} }
void CM2Model::AddRef() {
this->m_refCount++;
}
void CM2Model::Animate() { void CM2Model::Animate() {
// TODO // TODO
} }
@ -754,7 +758,7 @@ int32_t CM2Model::Initialize(CM2Scene* scene, CM2Shared* shared, CM2Model* a4, u
this->m_shared->AddRef(); this->m_shared->AddRef();
if (a4) { if (a4) {
a4->m_refCount++; a4->AddRef();
} }
this->m_flags = flags; this->m_flags = flags;
@ -1103,7 +1107,7 @@ void CM2Model::ProcessCallbacksRecursive() {
return; return;
} }
this->m_refCount++; this->AddRef();
if (this->ProcessCallbacks()) { if (this->ProcessCallbacks()) {
// TODO process attachments // TODO process attachments

View File

@ -135,6 +135,7 @@ class CM2Model {
, m_flag200000(0) , m_flag200000(0)
, m_flag400000(0) , m_flag400000(0)
{}; {};
void AddRef();
void Animate(); void Animate();
void AnimateCamerasST(); void AnimateCamerasST();
void AnimateMT(const C44Matrix* view, const C3Vector& a3, const C3Vector& a4, float a5, float a6); void AnimateMT(const C44Matrix* view, const C3Vector& a3, const C3Vector& a4, float a5, float a6);