//
// GraphicsReloadLayer::performReload from 0x52fc18 to 0x52fdb2 (410 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:52:03 +0000
//
cocos2d::CCDirector *__fastcall GraphicsReloadLayer::performReload(GraphicsReloadLayer *this)
{
cocos2d::CCScene *v2; // r6
cocos2d::CCScene *v3; // r0
float v4; // r2
cocos2d::CCDirector *v5; // r0
cocos2d::CCDirector *v6; // r0
int v7; // r6
cocos2d::CCDirector *v8; // r0
cocos2d::CCDirector *updated; // r0
GameManager *v10; // r0
int v11; // r7
GameManager *v12; // r0
GameManager *GameVariable; // r0
GameManager *v14; // r0
GameManager *v15; // r0
GameManager *v16; // r0
GameManager *v17; // r0
GameManager *v18; // r0
GameManager *v19; // r0
GameManager *v20; // r0
GameManager *v21; // r0
GameManager *v22; // r0
GameManager *v23; // r0
GameManager *v24; // r0
cocos2d::CCDirector *result; // r0
int v26; // r7
GameManager *v27; // r0
GameManager *v28; // r0
GameManager *v29; // r0
GameManager *v30; // r0
float v31; // r2
GameManager *v32; // r0
int v33; // r2
_BYTE v34[8]; // [sp+8h] [bp-1Ch] BYREF
int v35[3]; // [sp+10h] [bp-14h] BYREF
v2 = (cocos2d::CCScene *)cocos2d::CCDirector::sharedDirector(this);
v3 = (cocos2d::CCScene *)cocos2d::CCScene::create(v2);
cocos2d::CCDirector::replaceScene(v2, v3);
PlatformToolbox::updateWindowedSize(*((PlatformToolbox **)this + 80), *((float *)this + 81), v4);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
v7 = *((_DWORD *)v6 + 75);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
updated = (cocos2d::CCDirector *)cocos2d::CCDirector::updateContentScale(v8);
v10 = (GameManager *)cocos2d::CCDirector::sharedDirector(updated);
v11 = *((_DWORD *)v10 + 75);
v12 = (GameManager *)GameManager::sharedState(v10);
GameVariable = (GameManager *)GameManager::getGameVariable(v12, "0025");
if ( GameVariable != (GameManager *)*((unsigned __int8 *)this + 328)
&& (!*((_BYTE *)this + 328)
|| (v14 = (GameManager *)GameManager::sharedState(GameVariable),
GameVariable = (GameManager *)GameManager::getGameVariable(v14, "0170"),
(GameManager *)*((unsigned __int8 *)this + 329) == GameVariable)
&& (v15 = (GameManager *)GameManager::sharedState(GameVariable),
GameVariable = (GameManager *)GameManager::getGameVariable(v15, "0175"),
(GameManager *)*((unsigned __int8 *)this + 330) == GameVariable)) )
{
v27 = (GameManager *)GameManager::sharedState(GameVariable);
v28 = (GameManager *)GameManager::setGameVariable(v27, "0170", (const char *)*((unsigned __int8 *)this + 329));
v29 = (GameManager *)GameManager::sharedState(v28);
v30 = (GameManager *)GameManager::setGameVariable(v29, "0175", (const char *)*((unsigned __int8 *)this + 330));
if ( *((_BYTE *)this + 331) && !*((_BYTE *)this + 328) )
PlatformToolbox::resizeWindow(*((PlatformToolbox **)this + 80), *((float *)this + 81), v31);
v32 = (GameManager *)GameManager::sharedState(v30);
if ( v7 == v11 )
v23 = (GameManager *)GameManager::queueReloadMenu(v32, COERCE_FLOAT(1), v33);
else
v23 = (GameManager *)GameManager::reloadAll(v32, 0, 0, 0, 0, 1);
}
else
{
v16 = (GameManager *)GameManager::sharedState(GameVariable);
v17 = (GameManager *)GameManager::setGameVariable(v16, "0025", (const char *)(*((unsigned __int8 *)this + 328) ^ 1));
v18 = (GameManager *)GameManager::sharedState(v17);
v19 = (GameManager *)GameManager::setGameVariable(v18, "0170", (const char *)*((unsigned __int8 *)this + 329));
v20 = (GameManager *)GameManager::sharedState(v19);
v21 = (GameManager *)GameManager::setGameVariable(v20, "0175", (const char *)*((unsigned __int8 *)this + 330));
v22 = (GameManager *)GameManager::sharedState(v21);
v23 = (GameManager *)GameManager::switchScreenMode(
v22,
*((_BYTE *)this + 328),
*((_BYTE *)this + 329),
*((_BYTE *)this + 330),
1);
}
v24 = (GameManager *)GameManager::sharedState(v23);
result = (cocos2d::CCDirector *)GameManager::getGameVariable(v24, "0115");
if ( result )
{
memset(v35, 0, sizeof(v35));
v26 = cocos2d::CCDirector::sharedDirector(result);
std::string::__init(v35, "chatFont.fnt", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, 0.0, 0.0);
cocos2d::CCDirector::toggleShowFPS(v26, 1, v35, v34);
return (cocos2d::CCDirector *)std::string::~string((int)v35);
}
return result;
}