//
// PlayLayer::toggleProgressbar from 0x5cf220 to 0x5cf3b4 (404 bytes)
//
// 2 xrefs:
// > ??> @ 0xb57e8
// > ??> @ 0x1148b10
//
// 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 PlayLayer::toggleProgressbar(PlayLayer *a1)
{
float *v2; // x24
_BOOL4 m_showProgressBar; // w22
GameManager *v4; // x0
float v5; // s9
_BOOL4 GameVariable; // w25
cocos2d::CCDirector *v7; // x0
cocos2d::CCLabelBMFont *m_percentageLabel; // x23
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
__int64 v10; // x0
cocos2d::CCLabelBMFont *v11; // x23
float v12; // s0
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26
GameManager *v14; // x0
float v15; // [xsp+78h] [xbp+78h]
cocos2d::CCPoint v16; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCSize WinSize; // 0:kr00_8.8
v2 = &a1->m_varianceValues.__elems_[1975];
m_showProgressBar = GameManager::sharedState()->m_showProgressBar;
if ( *((_BYTE *)v2 + 270) )
{
v4 = GameManager::sharedState();
m_showProgressBar = 0;
v5 = 0.0;
GameVariable = GameManager::getGameVariable(v4, "0145");
}
else
{
v14 = GameManager::sharedState();
v5 = 0.0;
GameVariable = GameManager::getGameVariable(v14, "0040");
if ( m_showProgressBar )
v5 = 110.0;
}
a1->m_progressBar->setVisible(a1->m_progressBar, m_showProgressBar);
v7 = cocos2d::CCDirector::sharedDirector();
WinSize = cocos2d::CCDirector::getWinSize(v7);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BOOL4, float, float))a1->m_percentageLabel->setVisible)(
a1->m_percentageLabel,
GameVariable,
WinSize.width,
WinSize.height);
m_percentageLabel = a1->m_percentageLabel;
setPosition = m_percentageLabel->setPosition;
v10 = (__int64)m_percentageLabel->getPosition(m_percentageLabel);
cocos2d::CCPoint::CCPoint(&v16, v5 + (float)(v15 * 0.5), *(float *)(v10 + 4));
setPosition(m_percentageLabel, &v16);
v11 = a1->m_percentageLabel;
v12 = 0.0;
setAnchorPoint = v11->setAnchorPoint;
if ( !m_showProgressBar && !*((_BYTE *)v2 + 270) )
v12 = 0.5;
cocos2d::CCPoint::CCPoint(&v16, v12, 0.5);
setAnchorPoint(v11, &v16);
PlayLayer::updateProgressbar(a1);
if ( GameVariable )
{
if ( *((_BYTE *)v2 + 270) )
GJBaseGameLayer::updatePlatformerTime(a1);
}
}