feat(model): partially implement CM2Model dtor

This commit is contained in:
fallenoak 2025-10-22 23:27:06 -05:00
parent 7078d26beb
commit 3e011c91f6
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 23 additions and 0 deletions

View File

@ -76,6 +76,28 @@ uint16_t CM2Model::Sub8260C0(M2Data* data, uint32_t sequenceId, int32_t a3) {
return -1; return -1;
} }
CM2Model::~CM2Model() {
// TODO
// Unlink from lists
if (this->m_animatePrev) {
*this->m_animatePrev = this->m_animateNext;
}
if (this->m_animateNext) {
this->m_animateNext->m_animatePrev = this->m_animatePrev;
}
if (this->m_drawPrev) {
*this->m_drawPrev = this->m_drawNext;
}
if (this->m_drawNext) {
this->m_drawNext->m_drawPrev = this->m_drawPrev;
}
// TODO
}
void CM2Model::AddRef() { void CM2Model::AddRef() {
this->m_refCount++; this->m_refCount++;
} }

View File

@ -143,6 +143,7 @@ class CM2Model {
, m_flag200000(0) , m_flag200000(0)
, m_flag400000(0) , m_flag400000(0)
{}; {};
~CM2Model();
void AddRef(); void AddRef();
void Animate(); void Animate();
void AnimateAttachmentsMT(); void AnimateAttachmentsMT();