//
// DialogLayer::animateIn from 0x1003c8470 to 0x1003c8673 (515 bytes)
//
// 23 xrefs:
// > PlayLayer::destroyPlayer @ 0x1000ba77f
// > DailyLevelPage::dailyStatusFailed @ 0x100231cdd
// > CreatorLayer::onTreasureRoom @ 0x1002994ab
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x1002b1b14
// > GJPathPage::showCantAffordMessage @ 0x1003016ef
// > GJShopLayer::showCantAffordMessage @ 0x10032522f
// > LevelListLayer::onClaimReward @ 0x10035f2bd
// > GJGarageLayer::showUnlockPopup @ 0x10036f44e
// > SecretLayer4::showFirstDialog @ 0x1003b1c4a
// > SecretLayer4::showDialog @ 0x1003b32b4
// > DialogLayer::animateInRandomSide @ 0x1003c8462
// > DialogLayer::animateInDialog @ 0x1003c869b
// > LevelPage::onSecretDoor @ 0x10043724e
// > SecretLayer5::showFirstDialog @ 0x10047beb8
// > SecretLayer5::showDialog @ 0x10047def4
// > SecretLayer2::showCompletedLevel @ 0x1004a087f
// > SecretLayer3::onClick @ 0x1004a5a85
// > SecretLayer3::firstInteractionStep2 @ 0x1004a6414
// > SecretLayer3::firstInteractionStep4 @ 0x1004a6957
// > SecretLayer3::revealStep2 @ 0x1004a72b7
// > SecretLayer3::revealStep4 @ 0x1004a7a58
// > SecretLayer3::revealStep5 @ 0x1004a8027
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x100601ef8
//
// 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 DialogLayer::animateIn(DialogLayer *a1, DialogAnimationType a2)
{
float v3; // xmm0_4
__int64 v4; // r15
double *v5; // rsi
cocos2d::CCLayer *m_mainLayer; // r14
DialogAnimationType v7; // kr00_4
float v8; // xmm1_4
float v9; // xmm0_4
cocos2d::CCActionInterval *v10; // rax
cocos2d::CCDirector *v11; // rax
double v12; // xmm0_8
cocos2d::CCDirector *v13; // rax
double v14; // xmm0_8
cocos2d::CCDirector *v15; // rax
cocos2d::CCEaseElasticOut *v16; // rsi
unsigned __int8 v17; // al
unsigned __int8 v18; // r14
cocos2d::CCFadeTo *v19; // rax
float v20; // [rsp+8h] [rbp-38h] BYREF
timeb v21; // [rsp+10h] [rbp-30h] BYREF
float v22; // [rsp+24h] [rbp-1Ch]
((void (__fastcall *)(DialogLayer *, __int64))a1->setVisible)(a1, 1);
ftime(&v21);
v3 = (double)(v21.millitm + 1000 * (v21.time & 0xFFFFF)) / 1000.0;
a1->m_animateTime = v3;
v4 = (unsigned int)(a2 - 2);
v5 = (double *)((__int64 (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->getPosition)(a1->m_mainLayer);
sub_10028CC60(&v21, v5);
v7 = a2;
m_mainLayer = a1->m_mainLayer;
switch ( v4 )
{
case 0LL:
v8 = *((float *)&v21.time + 1);
v9 = -191.0;
goto LABEL_9;
case 1LL:
v15 = cocos2d::CCDirector::sharedDirector();
v9 = (float)(sub_100484DA0(v15) + 190.0) + 1.0;
v8 = *((float *)&v21.time + 1);
goto LABEL_9;
case 2LL:
v22 = *(float *)&v21.time;
v11 = cocos2d::CCDirector::sharedDirector();
v12 = sub_100484D70(v11);
v8 = (float)(*(float *)&v12 + 50.0) + 1.0;
goto LABEL_7;
case 3LL:
v22 = *(float *)&v21.time;
v13 = cocos2d::CCDirector::sharedDirector();
v14 = sub_100484D70(v13);
v8 = (float)(*(float *)&v14 + -50.0) + -1.0;
LABEL_7:
v9 = v22;
LABEL_9:
sub_10028CBE0(&v20, v9, v8);
((void (__fastcall *)(cocos2d::CCLayer *, float *))m_mainLayer->setPosition)(m_mainLayer, &v20);
v10 = cocos2d::CCMoveTo::create(0.5, (const cocos2d::CCPoint *)&v21);
goto LABEL_10;
default:
if ( v7 != FromCenter )
goto LABEL_11;
((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_mainLayer->setScale)(a1->m_mainLayer, 0.1);
v10 = cocos2d::CCScaleTo::create_1(0.5, 1.0);
LABEL_10:
v16 = cocos2d::CCEaseElasticOut::create(v10, 0.60000002);
cocos2d::CCNode::runAction(a1->m_mainLayer, v16);
LABEL_11:
v17 = ((__int64 (__fastcall *)(DialogLayer *))a1->getOpacity)(a1);
if ( v17 )
{
v18 = v17;
((void (__fastcall *)(DialogLayer *, _QWORD))a1->setOpacity)(a1, 0);
v19 = cocos2d::CCFadeTo::create(0.14, v18);
cocos2d::CCNode::runAction(a1, v19);
}
return;
}
}