//
// EndLevelLayer::showLayer from 0x1004c2380 to 0x1004c2509 (393 bytes)
//
// 1 xrefs:
// > ??> @ 0x10094f378
//
// 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 EndLevelLayer::showLayer(EndLevelLayer *a1, bool a2)
{
GameManager *v3; // rax
char v4; // r15
cocos2d::CCMoveTo *v5; // rax
cocos2d::CCEaseBounceOut *v6; // r14
cocos2d::CCCallFunc *v7; // rax
cocos2d::CCSequence *v8; // rax
cocos2d::CCFadeTo *v9; // rax
cocos2d::CCArray *m_coinsToAnimate; // rdi
float v11; // [rsp+0h] [rbp-1Ch]
v3 = GameManager::sharedState();
v4 = a2 | GameManager::getGameVariable(v3, "0168");
cocos2d::CCNode::stopAllActions(a1->m_mainLayer);
((void (__fastcall *)(EndLevelLayer *))a1->layerVisible)(a1);
if ( v4 == 1 )
{
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCPoint *))a1->m_mainLayer->setPosition)(
a1->m_mainLayer,
&a1->m_endPosition);
((void (__fastcall *)(EndLevelLayer *, __int64))a1->setOpacity)(a1, 100);
((void (__fastcall *)(EndLevelLayer *))a1->enterAnimFinished)(a1);
v11 = 0.0;
EndLevelLayer::playStarEffect(a1, 0.0);
EndLevelLayer::playCoinEffect(a1, 0.0);
}
else
{
v5 = cocos2d::CCMoveTo::create(1.0, &a1->m_endPosition);
v6 = cocos2d::CCEaseBounceOut::create(v5);
v7 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)0x541uLL);
v8 = sub_1003B5760(v6, v7, 0);
cocos2d::CCNode::runAction(a1->m_mainLayer, v8);
((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setOpacity)(a1, 0);
v9 = cocos2d::CCFadeTo::create(1.0, 0x64u);
cocos2d::CCNode::runAction(a1, v9);
v11 = 0.69999999;
EndLevelLayer::playCoinEffect(a1, 0.69999999);
m_coinsToAnimate = a1->m_coinsToAnimate;
if ( m_coinsToAnimate )
v11 = (float)((float)(int)sub_100720070(m_coinsToAnimate) * 0.34999999) + 0.69999999;
EndLevelLayer::playStarEffect(a1, v11);
}
EndLevelLayer::playCurrencyEffect(a1, v11);
EndLevelLayer::playDiamondEffect(a1, v11);
}