//
// PlayLayer::toggleProgressbar from 0x1000b9980 to 0x1000b9af9 (377 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008b7438
//
// 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 PlayLayer::toggleProgressbar(PlayLayer *a1)
{
GameManager *v1; // rax
GameManager *v2; // rax
bool GameVariable; // r14
bool m_showProgressBar; // r15
GameManager *v5; // rax
int v6; // xmm0_4
cocos2d::CCLabelBMFont *m_percentageLabel; // r12
__int64 v8; // rax
cocos2d::CCLabelBMFont *v9; // r12
float v10; // xmm0_4
float v11; // [rsp+4h] [rbp-3Ch] BYREF
_BYTE v12[8]; // [rsp+Ch] [rbp-34h] BYREF
float v13; // [rsp+14h] [rbp-2Ch]
double v14; // 0:xmm0_8.8
v1 = GameManager::sharedState();
if ( a1->m_isPlatformer )
{
v2 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v2, "0145");
v13 = 0.0;
m_showProgressBar = 0;
}
else
{
m_showProgressBar = v1->m_showProgressBar;
v5 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v5, "0040");
if ( m_showProgressBar )
*(float *)&v6 = 110.0;
else
*(float *)&v6 = 0.0;
v13 = *(float *)&v6;
}
((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_progressBar->setVisible)(a1->m_progressBar, m_showProgressBar);
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v14 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v11);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, bool, double))a1->m_percentageLabel->setVisible)(
a1->m_percentageLabel,
GameVariable,
v14);
m_percentageLabel = a1->m_percentageLabel;
v13 = (float)(v11 * 0.5) + v13;
v8 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_percentageLabel->getPosition)(m_percentageLabel);
sub_10028CBE0(v12, v13, *(float *)(v8 + 4));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))m_percentageLabel->setPosition)(m_percentageLabel, v12);
v9 = a1->m_percentageLabel;
v10 = 0.0;
if ( !m_showProgressBar && !a1->m_isPlatformer )
v10 = 0.5;
sub_10028CBE0(v12, v10, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v9->setAnchorPoint)(v9, v12);
PlayLayer::updateProgressbar(a1);
if ( a1->m_isPlatformer && GameVariable )
GJBaseGameLayer::updatePlatformerTime(a1);
}