//
// GameManager::reloadAllStep2 from 0x10031d9b4 to 0x10031daa0 (236 bytes)
//
// 1 xrefs:
// > GameManager::reloadAll @ 0x10031d970
//
// 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 GameManager::reloadAllStep2(GameManager *a1)
{
cocos2d::CCDirector *v2; // x0
CCContentManager *v3; // x0
CCAnimateFrameCache *v4; // x0
cocos2d::CCFileUtils *v5; // x0
ObjectManager *v6; // x0
cocos2d::CCActionManager *m_pActionManager; // x20
cocos2d::CCDelayTime *v8; // x21
char v9; // w0
__int64 v10; // x1
__int64 v11; // x2
__int64 v12; // x3
__int64 v13; // x4
__int64 v14; // x5
__int64 v15; // x6
__int64 v16; // x7
cocos2d::CCSequence *v17; // x1
cocos2d::SEL_CallFunc v18; // 0:x1.16
if ( a1->m_reloadTextures )
{
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::removeStatsLabel(v2);
v3 = CCContentManager::sharedManager();
CCContentManager::clearCache(v3);
cocos2d::CCTextureCache::purgeSharedTextureCache();
cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache();
cocos2d::CCLabelBMFont::purgeCachedData();
BitmapFontCache::purgeSharedFontCache();
v4 = CCAnimateFrameCache::sharedSpriteFrameCache();
CCAnimateFrameCache::removeSpriteFrames(v4);
cocos2d::CCFileUtils::purgeFileUtils();
v5 = cocos2d::CCFileUtils::sharedFileUtils();
v6 = (ObjectManager *)((__int64 (__fastcall *)(cocos2d::CCFileUtils *, const char *))v5->getSearchPaths)(
v5,
"Resources");
ObjectManager::purgeObjectManager(v6);
*(_QWORD *)&a1->m_loadedBgID = 0;
a1->m_loadedMG = 0;
sub_100017D70((__int64)&a1->m_iconLoadCounts, (_QWORD *)a1->m_iconLoadCounts.__tree_.__pair1_.__value_.__left_);
a1->m_iconLoadCounts.__tree_.__begin_node_ = &a1->m_iconLoadCounts.__tree_.__pair1_.__value_;
*(_OWORD *)&a1->m_iconLoadCounts.__tree_.__pair1_.__value_.__left_ = 0u;
a1->m_loadedDeathEffect = 0;
}
m_pActionManager = a1->m_pActionManager;
v8 = cocos2d::CCDelayTime::create(0.0);
v18.ptr = (void (*)(void))GameManager::reloadAllStep3;
v18.adj = 0;
v9 = (unsigned __int8)cocos2d::CCCallFunc::create(a1, v18);
v17 = sub_10018A494(v8, v10, v11, v12, v13, v14, v15, v16, v9);
cocos2d::CCActionManager::addAction(m_pActionManager, v17, a1, 0);
}