//
// GJBaseGameLayer::resetSpawnChannelIndex from 0x100202c1c to 0x100202ce0 (196 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x100202748
// > LevelEditorLayer::updateGameObjects @ 0x100358a18
// > LevelEditorLayer::onPlaytest @ 0x100362d94
//
// 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 __fastcall GJBaseGameLayer::resetSpawnChannelIndex(GJBaseGameLayer *a1)
{
cocos2d::CCArray *v2; // x20
__int64 v3; // x21
int v4; // [xsp+0h] [xbp-40h] BYREF
int *v5; // [xsp+8h] [xbp-38h] BYREF
a1->m_gameState.m_currentChannel = 0;
v2 = cocos2d::CCDictionary::allKeys(a1->m_spawnObjects);
if ( (unsigned int)sub_10024A36C(v2) )
{
v3 = 0;
do
{
v4 = *(_DWORD *)(sub_10024A388(v2, v3) + 56);
v5 = &v4;
*((_DWORD *)sub_10001D150(
(unsigned __int64)&a1->m_gameState.m_spawnChannelRelated0,
&v4,
(__int64)&unk_10063A31C,
&v5)
+ 5) = 0;
v5 = &v4;
*((_BYTE *)sub_100018B20((float *)&a1->m_gameState.m_spawnChannelRelated1, &v4, (__int64)&unk_10063A31C, &v5) + 20) = 0;
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(v2) );
}
}