//
// GJEffectManager::reset from 0x14025b0a0 to 0x14025b2c1 (545 bytes)
//
// 6 xrefs:
// > GJEffectManager::loadFromState @ 0x1402644bc
// > LevelEditorLayer::updateGameObjects @ 0x1402dc275
// > LevelEditorLayer::onPlaytest @ 0x1402dfe5c
// > LevelEditorLayer::onStopPlaytest @ 0x1402e0c37
// > PlayLayer::loadDefaultColors @ 0x1403b1ceb
// > ??> @ 0x1406cfc78
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJEffectManager::reset(GJEffectManager *a1)
{
std::vector *p_m_colorActionVector; // rdx
std::_Vector_val>::pointer Myfirst; // rax
__int64 i; // rcx
__int64 v5; // rcx
std::vector *p_m_unkVector270; // rdx
std::_Vector_val>::pointer v7; // rcx
__int64 j; // rcx
cocos2d::CCDictionary *m_unkDict150; // rcx
cocos2d::CCDictElement *m_pElements; // rcx
cocos2d::CCDictElement *k; // rdx
cocos2d::CCObject *m_pObject; // rcx
std::_Vector_val>::pointer v13; // rbx
std::_Vector_val>::pointer Mylast; // rsi
std::_Simple_types::value_type *v15; // rax
sub_14005E0D0(&a1->m_unkMap288._Traitsobj._Mypair._Myval2._Myval2);
cocos2d::CCDictionary::removeAllObjects(a1->m_colorActionDict);
cocos2d::CCDictionary::removeAllObjects(a1->m_unkDict268);
cocos2d::CCDictionary::removeAllObjects(a1->m_unkObject148);
p_m_colorActionVector = &a1->m_colorActionVector;
Myfirst = a1->m_colorActionVector._Mypair._Myval2._Myfirst;
if ( Myfirst > (std::_Vector_val>::pointer)&a1->m_colorActionVector
|| Myfirst + 1101 < (std::_Vector_val>::pointer)p_m_colorActionVector )
{
v5 = 137;
do
{
*Myfirst = nullptr;
Myfirst[1] = nullptr;
Myfirst[2] = nullptr;
Myfirst += 8;
*(Myfirst - 5) = nullptr;
*(Myfirst - 4) = nullptr;
*(Myfirst - 3) = nullptr;
*(Myfirst - 2) = nullptr;
*(Myfirst - 1) = nullptr;
--v5;
}
while ( v5 );
*Myfirst = nullptr;
Myfirst[1] = nullptr;
Myfirst[2] = nullptr;
Myfirst[3] = nullptr;
Myfirst[4] = nullptr;
Myfirst[5] = nullptr;
}
else
{
for ( i = 0; i <= 1101; ++i )
p_m_colorActionVector->_Mypair._Myval2._Myfirst[i] = nullptr;
}
p_m_unkVector270 = &a1->m_unkVector270;
v7 = a1->m_unkVector270._Mypair._Myval2._Myfirst;
if ( v7 > (std::_Vector_val>::pointer)&a1->m_unkVector270
|| v7 + 9999 < (std::_Vector_val>::pointer)p_m_unkVector270 )
{
memset(v7, 0, 0x13880u);
}
else
{
for ( j = 0; j <= 9999; ++j )
p_m_unkVector270->_Mypair._Myval2._Myfirst[j] = nullptr;
}
m_unkDict150 = a1->m_unkDict150;
if ( m_unkDict150 )
{
m_pElements = m_unkDict150->m_pElements;
if ( m_pElements )
{
for ( k = (cocos2d::CCDictElement *)m_pElements->hh.next; ; k = (cocos2d::CCDictElement *)k->hh.next )
{
m_pObject = m_pElements->m_pObject;
LOWORD(m_pObject[5].m_nZOrder) = -1;
BYTE2(m_pObject[5].m_nZOrder) = -1;
*(_WORD *)((char *)&m_pObject[5].m_nZOrder + 3) = -1;
BYTE1(m_pObject[5].m_uOrderOfArrival) = -1;
m_pObject[5].m_unknown2 = 1132396544;
*(_QWORD *)&m_pObject[6].m_uID = 0;
m_pElements = k;
if ( !k )
break;
}
}
}
GJEffectManager::resetEffects(a1);
v13 = a1->m_unkVector560._Mypair._Myval2._Myfirst;
Mylast = a1->m_unkVector560._Mypair._Myval2._Mylast;
if ( v13 != Mylast )
{
do
{
sub_14005E430((__int64)&v13->m_remapKeys);
sub_140257B50(&v13->m_keyframes._Mypair._Myval2._Myfirst);
++v13;
}
while ( v13 != Mylast );
a1->m_unkVector560._Mypair._Myval2._Mylast = a1->m_unkVector560._Mypair._Myval2._Myfirst;
}
sub_1402651F0(&a1->m_unkMap578);
sub_14005D290(&a1->m_unkMap618._Traitsobj._Mypair._Myval2._Myval2);
v15 = a1->m_unkVector6c0._Mypair._Myval2._Myfirst;
if ( v15 != a1->m_unkVector6c0._Mypair._Myval2._Mylast )
a1->m_unkVector6c0._Mypair._Myval2._Mylast = v15;
}