//
// SecretRewardsLayer::moveToSecondaryLayer from 0x58a1d8 to 0x58a2a8 (208 bytes)
//
// 1 xrefs:
// > SecretRewardsLayer::onChestType @ 0x58a2d6
//
// 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 SecretRewardsLayer::moveToSecondaryLayer(SecretRewardsLayer *a1, int a2)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCMoveTo *v5; // r0
cocos2d::CCEaseBounceOut *v6; // r0
cocos2d::CCLayer *m_secondaryLayer; // r7
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCMoveTo *v9; // r0
cocos2d::CCEaseBounceOut *v10; // r0
cocos2d::CCSize v11; // [sp+4h] [bp-14h] BYREF
cocos2d::CCPoint v12; // [sp+Ch] [bp-Ch] BYREF
if ( a1->m_inMainLayer )
{
a1->m_inMainLayer = 0;
a1->m_rewardType = a2;
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v11, v4);
a1->m_mainScrollLayer->setTouchEnabled(a1->m_mainScrollLayer, 0);
cocos2d::CCPoint::CCPoint(&v12, 0.0, -100.0 - v11.height);
v5 = cocos2d::CCMoveTo::create(0.5, &v12);
v6 = cocos2d::CCEaseBounceOut::create(v5);
cocos2d::CCNode::runAction(a1->m_mainLayer, v6);
SecretRewardsLayer::createSecondaryLayer(a1, a2);
m_secondaryLayer = a1->m_secondaryLayer;
setPosition = m_secondaryLayer->setPosition;
cocos2d::CCPoint::CCPoint(&v12, 0.0, v11.height);
setPosition(m_secondaryLayer, &v12);
cocos2d::CCPoint::CCPoint(&v12, 0.0, 0.0);
v9 = cocos2d::CCMoveTo::create(0.5, &v12);
v10 = cocos2d::CCEaseBounceOut::create(v9);
cocos2d::CCNode::runAction(a1->m_secondaryLayer, v10);
SecretRewardsLayer::updateBackButton(a1);
}
}