//
// RewardsPage::onReward from 0x1001c4584 to 0x1001c4690 (268 bytes)
//
// 2 xrefs:
// > RewardsPage::init @ 0x1001c419c
// > RewardsPage::init @ 0x1001c42b8
//
// 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::onReward(RewardsPage *a1, cocos2d::CCObject *a2)
{
int v4; // w0
__int64 v5; // x8
RewardUnlockLayer *v6; // x0
GameLevelManager *v7; // x20
int v8; // w0
cocos2d::CCNode *v9; // x19
cocos2d::CCTintTo *v10; // x0
__int16 v11; // [xsp+Ch] [xbp-14h] BYREF
char v12; // [xsp+Eh] [xbp-12h]
v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
if ( v4 == 2 )
{
if ( !a1->m_rightOpen )
{
v5 = 656;
LABEL_9:
v9 = *(cocos2d::CCNode **)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v5);
if ( v9 )
{
cocos2d::CCNode::stopAllActions(*(cocos2d::CCNode **)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v5));
v12 = 0;
v11 = 19455;
((void (__fastcall *)(cocos2d::CCNode *, __int16 *))v9->__vftable[1].setScale_0)(v9, &v11);
v10 = cocos2d::CCTintTo::create(1.0, 0xFFu, 0xFFu, 0xFFu);
cocos2d::CCNode::runAction(v9, v10);
}
return;
}
}
else if ( v4 == 1 && !a1->m_leftOpen )
{
v5 = 648;
goto LABEL_9;
}
if ( !a1->m_openLayer )
{
v6 = RewardUnlockLayer::create(v4, a1);
a1->m_openLayer = v6;
((void (__fastcall *)(RewardsPage *, RewardUnlockLayer *))a1->addChild)(a1, v6);
v7 = GameLevelManager::sharedState();
v8 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
GameLevelManager::getGJRewards(v7, v8);
}
}