//
// RewardsPage::show from 0x10021b8d0 to 0x10021ba0c (316 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008dfd48
//
// 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 RewardsPage::show(RewardsPage *a1)
{
unsigned __int8 v1; // r14
cocos2d::CCScaleTo *v2; // rax
cocos2d::CCEaseElasticOut *v3; // rax
cocos2d::CCDirector *v4; // rax
cocos2d::CCScene *m_scene; // r15
cocos2d::CCFadeTo *v6; // rax
int HighestChildZ; // eax
int v8; // edx
if ( a1->m_noElasticity )
{
FLAlertLayer::show(a1);
return;
}
v1 = ((__int64 (__fastcall *)(RewardsPage *))a1->getOpacity)(a1);
((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_mainLayer->setScale)(a1->m_mainLayer, 0.1);
v2 = cocos2d::CCScaleTo::create_1(0.30000001, 1.0);
v3 = cocos2d::CCEaseElasticOut::create(v2, 1.6);
cocos2d::CCNode::runAction(a1->m_mainLayer, v3);
v4 = cocos2d::CCDirector::sharedDirector();
m_scene = (cocos2d::CCScene *)a1->m_scene;
if ( !m_scene )
{
m_scene = v4->m_pRunningScene;
HighestChildZ = cocos2d::CCScene::getHighestChildZ(m_scene);
v8 = 105;
if ( HighestChildZ >= 105 )
v8 = cocos2d::CCScene::getHighestChildZ(m_scene) + 1;
a1->m_ZOrder = v8;
if ( v8 )
goto LABEL_6;
goto LABEL_5;
}
if ( !a1->m_ZOrder )
LABEL_5:
a1->m_ZOrder = 105;
LABEL_6:
((void (__fastcall *)(cocos2d::CCScene *, RewardsPage *))m_scene->addChild_0)(m_scene, a1);
((void (__fastcall *)(RewardsPage *, _QWORD))a1->setOpacity)(a1, 0);
v6 = cocos2d::CCFadeTo::create(0.14, v1);
cocos2d::CCNode::runAction(a1, v6);
((void (__fastcall *)(RewardsPage *, __int64))a1->setVisible)(a1, 1);
}