//
// RewardsPage::onReward from 0x4e9070 to 0x4e9126 (182 bytes)
//
// 0 xrefs:
//
// 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 RewardsPage::onReward(RewardsPage *a1, cocos2d::CCObject *a2)
{
int v4; // r0
cocos2d::CCLabelBMFont *m_leftLabel; // r4
cocos2d::CCLabelBMFont_vtbl *v6; // r3
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r3
cocos2d::CCTintTo *v8; // r0
RewardUnlockLayer *v9; // r0
RewardsPage_vtbl *v10; // r3
GameLevelManager *v11; // r4
int v12; // r0
RewardsPage *v13; // [sp+0h] [bp-8h] BYREF
cocos2d::CCObject *v14; // [sp+4h] [bp-4h]
v13 = a1;
v14 = a2;
v4 = a2->getTag(a2);
if ( v4 == 1 )
{
if ( !a1->m_leftOpen )
{
m_leftLabel = a1->m_leftLabel;
goto LABEL_7;
}
}
else if ( v4 == 2 && !a1->m_rightOpen )
{
m_leftLabel = a1->m_rightLabel;
LABEL_7:
if ( m_leftLabel )
{
cocos2d::CCNode::stopAllActions(m_leftLabel);
v6 = m_leftLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
LOWORD(v13) = 19455;
setColor = v6->setColor;
BYTE2(v13) = 0;
setColor(m_leftLabel, (const cocos2d::ccColor3B *)&v13);
v8 = cocos2d::CCTintTo::create(1.0, 0xFFu, 0xFFu, 0xFFu);
cocos2d::CCNode::runAction(m_leftLabel, v8);
}
return;
}
if ( !a1->m_openLayer )
{
v9 = RewardUnlockLayer::create(v4, a1);
v10 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_openLayer = v9;
v10->addChild(a1, v9);
v11 = GameLevelManager::sharedState();
v12 = a2->getTag(a2);
GameLevelManager::getGJRewards(v11, v12);
}
}