//
// SecretRewardsLayer::moveToSecondaryLayer from 0xa6af14 to 0xa6b048 (308 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::onChestType @ 0xa6b090
// > ??> @ 0x7cd58
//
// 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; // x0
cocos2d::CCMoveTo *v5; // x0
cocos2d::CCEaseBounceOut *v6; // x0
cocos2d::CCLayer *m_secondaryLayer; // x22
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCMoveTo *v9; // x0
cocos2d::CCEaseBounceOut *v10; // x0
float v11; // [xsp+4Ch] [xbp+4Ch]
cocos2d::CCPoint v12; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCSize WinSize; // 0:kr00_8.8
if ( a1->m_inMainLayer )
{
a1->m_rewardType = a2;
a1->m_inMainLayer = 0;
v4 = cocos2d::CCDirector::sharedDirector();
WinSize = cocos2d::CCDirector::getWinSize(v4);
((void (__fastcall *)(BoomScrollLayer *, _QWORD, float, float))a1->m_mainScrollLayer->setTouchEnabled)(
a1->m_mainScrollLayer,
0,
WinSize.width,
WinSize.height);
cocos2d::CCPoint::CCPoint(&v12, 0.0, (float)-v11 - 100.0);
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);
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);
}
}