//
// EndLevelLayer::showLayer from 0x7d4af0 to 0x7d4c90 (416 bytes)
//
// 2 xrefs:
// > ??> @ 0xa6428
// > ??> @ 0x117f770
//
// 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 EndLevelLayer::showLayer(EndLevelLayer *a1, bool a2)
{
_BOOL4 v2; // w20
GameManager *v4; // x0
cocos2d::CCMoveTo *v5; // x0
cocos2d::CCEaseBounceOut *v6; // x20
cocos2d::CCFiniteTimeAction *v7; // x0
cocos2d::CCAction *v8; // x0
cocos2d::CCFadeTo *v9; // x0
float v10; // s8
cocos2d::CCArray *m_coinsToAnimate; // x0
v2 = a2;
v4 = GameManager::sharedState();
if ( GameManager::getGameVariable(v4, "0168") )
{
cocos2d::CCNode::stopAllActions(a1->m_mainLayer);
a1->layerVisible(a1);
goto LABEL_8;
}
cocos2d::CCNode::stopAllActions(a1->m_mainLayer);
a1->layerVisible(a1);
if ( v2 )
{
LABEL_8:
a1->m_mainLayer->setPosition(a1->m_mainLayer, &a1->m_endPosition);
a1->setOpacity(a1, 100);
a1->enterAnimFinished(a1);
EndLevelLayer::playStarEffect(a1, 0.0);
EndLevelLayer::playCoinEffect(a1, 0.0);
EndLevelLayer::playCurrencyEffect(a1, 0.0);
EndLevelLayer::playDiamondEffect(a1, 0.0);
return;
}
v5 = cocos2d::CCMoveTo::create(1.0, &a1->m_endPosition);
v6 = cocos2d::CCEaseBounceOut::create(v5);
v7 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, 1344, 1);
v8 = (cocos2d::CCAction *)cocos2d::CCSequence::create((cocos2d::CCSequence *)v6, v7, 0);
cocos2d::CCNode::runAction(a1->m_mainLayer, v8);
a1->setOpacity(a1, 0);
v9 = cocos2d::CCFadeTo::create(1.0, (unsigned __int8)&qword_60 + 4);
cocos2d::CCNode::runAction(a1, v9);
v10 = 0.7;
EndLevelLayer::playCoinEffect(a1, 0.7);
m_coinsToAnimate = a1->m_coinsToAnimate;
if ( m_coinsToAnimate )
v10 = (float)((float)(unsigned int)cocos2d::CCArray::count(m_coinsToAnimate) * 0.35) + 0.7;
EndLevelLayer::playStarEffect(a1, v10);
EndLevelLayer::playCurrencyEffect(a1, v10);
EndLevelLayer::playDiamondEffect(a1, v10);
}