//
// GameManager::reloadAllStep2 from 0x5eed2c to 0x5eee38 (268 bytes)
//
// 3 xrefs:
// > ??> @ 0x41d48
// > GameManager::reloadAll @ 0x5ee4f0
// > ??> @ 0x122a160
//
// 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 GameManager::reloadAllStep2(GameManager *a1)
{
cocos2d::CCActionManager *m_pActionManager; // x19
cocos2d::CCSequence *v3; // x21
cocos2d::CCFiniteTimeAction *v4; // x0
cocos2d::CCAction *v5; // x0
cocos2d::CCDirector *v6; // x0
CCContentManager *v7; // x0
CCAnimateFrameCache *v8; // x0
cocos2d::CCFileUtils *v9; // x0
ObjectManager *v10; // x0
std::_rb_tree_base *m_parent; // x19
std::_rb_tree_base *v12; // x0
if ( a1->m_reloadTextures )
{
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::removeStatsLabel(v6);
v7 = CCContentManager::sharedManager();
CCContentManager::clearCache(v7);
cocos2d::CCTextureCache::purgeSharedTextureCache();
cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache();
cocos2d::CCLabelBMFont::purgeCachedData();
BitmapFontCache::purgeSharedFontCache();
v8 = CCAnimateFrameCache::sharedSpriteFrameCache();
CCAnimateFrameCache::removeSpriteFrames(v8);
cocos2d::CCFileUtils::purgeFileUtils();
v9 = cocos2d::CCFileUtils::sharedFileUtils();
v10 = (ObjectManager *)((__int64 (__fastcall *)(cocos2d::CCFileUtils *, const char *))v9->getSearchPaths)(
v9,
"Resources");
ObjectManager::purgeObjectManager(v10);
m_parent = a1->m_iconLoadCounts.m_header.m_parent;
a1->m_loadedGroundID = 0;
a1->m_loadedBgID = 0;
a1->m_loadedMG = 0;
while ( m_parent )
{
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
(__int64)&a1->m_iconLoadCounts,
&m_parent->m_right->m_isblack);
v12 = m_parent;
m_parent = m_parent->m_left;
operator delete(v12);
}
a1->m_iconLoadCounts.m_header.m_parent = nullptr;
a1->m_iconLoadCounts.m_header.m_left = &a1->m_iconLoadCounts.m_header;
a1->m_iconLoadCounts.m_header.m_right = &a1->m_iconLoadCounts.m_header;
a1->m_iconLoadCounts.m_nodecount = 0;
a1->m_loadedDeathEffect = 0;
}
m_pActionManager = a1->m_pActionManager;
v3 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(0.0);
v4 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, GameManager::reloadAllStep3, 0);
v5 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v3, v4, 0);
cocos2d::CCActionManager::addAction(m_pActionManager, v5, a1, 0);
}