//
// DailyLevelPage::createDailyNode from 0x4d4bac to 0x4d4cf4 (328 bytes)
//
// 5 xrefs:
// > DailyLevelPage::init @ 0x4d543e
// > DailyLevelPage::levelDownloadFinished @ 0x4d5674
// > DailyLevelPage::createNodeIfLoaded @ 0x4d56c6
// > DailyLevelPage::claimLevelReward @ 0x4d57b6
// > DailyLevelPage::refreshDailyPage @ 0x4d58c0
//
// 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 DailyLevelPage::createDailyNode(DailyLevelPage *a1, GJGameLevel *a2, bool a3, float a4, bool a5)
{
_BOOL4 v6; // r9
cocos2d::CCDirector *v9; // r0
DailyLevelNode *v10; // r4
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
GameLevelManager *v12; // r0
const cocos2d::CCPoint *v13; // r0
void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::CCDirector *v15; // r0
float v16; // r0
cocos2d::CCSequence *v17; // r10
cocos2d::CCShow *v18; // r7
cocos2d::CCEaseElasticOut *v19; // r0
float v20; // r2
int v21; // r0
cocos2d::CCAction *v22; // r0
cocos2d::CCSize v23; // [sp+4h] [bp-20h] BYREF
cocos2d::CCPoint v24; // [sp+Ch] [bp-18h] BYREF
cocos2d::CCPoint v25; // [sp+14h] [bp-10h] BYREF
v6 = a3;
if ( !a1->m_dailyNode )
{
v9 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v23, v9);
v10 = DailyLevelNode::create(a2, a1, a5);
a1->m_mainLayer->addChild(a1->m_mainLayer, v10);
setPosition = v10->setPosition;
cocos2d::CCPoint::CCPoint(&v25, v23.width * 0.5, (float)(v23.height * 0.5) - 8.0);
setPosition(v10, &v25);
if ( a2 )
{
v12 = GameLevelManager::sharedState();
if ( GameLevelManager::getDailyID(v12, a1->m_type) > a2->m_dailyID.random - a2->m_dailyID.seed )
DailyLevelNode::showSkipButton(v10);
}
if ( !v6 )
{
v10->setVisible(v10, 0);
v13 = v10->getPosition(v10);
cocos2d::CCPoint::CCPoint(&v24, v13);
v14 = v10->setPosition;
v15 = cocos2d::CCDirector::sharedDirector();
v16 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v15));
cocos2d::CCPoint::CCPoint(&v25, v16 + 180.0, v24.y);
v14(v10, &v25);
v17 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(a4);
v18 = cocos2d::CCShow::create();
v19 = (cocos2d::CCEaseElasticOut *)cocos2d::CCMoveTo::create(0.5, &v24);
v21 = cocos2d::CCEaseElasticOut::create(v19, (cocos2d::CCActionInterval *)0x3F19999A, v20);
v22 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v17, v18, v21, 0);
cocos2d::CCNode::runAction(v10, v22);
}
a1->m_dailyNode = v10;
}
}