//
// PlayLayer::toggleProgressbar from 0x406628 to 0x40674c (292 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:47:28 +0000
//
PlayLayer *__fastcall PlayLayer::toggleProgressbar(PlayLayer *this)
{
unsigned __int8 *v2; // r0
int v3; // r5
GameManager *v4; // r0
float v5; // s16
int GameVariable; // r8
GameManager *v7; // r0
int v8; // r0
cocos2d::CCDirector *v9; // r0
int v10; // r10
float v11; // s16
void (__fastcall *v12)(int, _BYTE *); // r11
int v13; // r0
int v14; // r9
void (__fastcall *v15)(int, _BYTE *); // r10
float v16; // r1
PlayLayer *result; // r0
float v18[2]; // [sp+4h] [bp-18h] BYREF
_BYTE v19[8]; // [sp+Ch] [bp-10h] BYREF
v2 = (unsigned __int8 *)GameManager::sharedState(this);
v3 = v2[724];
if ( *((_BYTE *)this + 10614) )
{
v4 = (GameManager *)GameManager::sharedState((GameManager *)v2);
v5 = 0.0;
v3 = 0;
GameVariable = GameManager::getGameVariable(v4, "0145");
}
else
{
v7 = (GameManager *)GameManager::sharedState((GameManager *)v2);
v5 = 110.0;
v8 = GameManager::getGameVariable(v7, "0040");
if ( !v3 )
v5 = 0.0;
GameVariable = v8;
}
v9 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 2978) + 172))(
*((_DWORD *)this + 2978),
v3);
cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v18);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 2976) + 172))(*((_DWORD *)this + 2976), GameVariable);
v10 = *((_DWORD *)this + 2976);
v11 = v5 + (float)(v18[0] * 0.5);
v12 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
v13 = (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 96))(v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v11, *(float *)(v13 + 4));
v12(v10, v19);
v14 = *((_DWORD *)this + 2976);
v15 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v14 + 148);
if ( v3 )
{
v16 = 0.0;
}
else if ( *((_BYTE *)this + 10614) )
{
v16 = 0.0;
}
else
{
v16 = 0.5;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v16, 0.5);
v15(v14, v19);
result = PlayLayer::updateProgressbar(this);
if ( *((_BYTE *)this + 10614) )
{
if ( GameVariable )
return (PlayLayer *)GJBaseGameLayer::updatePlatformerTime(this);
}
return result;
}