//
// DialogLayer::animateInRandomSide from 0x140175830 to 0x140175a11 (481 bytes)
//
// 25 xrefs:
// > CharacterColorPage::onMode @ 0x1400a209c
// > CreatorLayer::onMultiplayer @ 0x140138065
// > CreatorLayer::onSecretVault @ 0x140138c1c
// > CreatorLayer::onTreasureRoom @ 0x1401393e4
// > GauntletSelectLayer::onPlay @ 0x1402ffa7f
// > GJShopLayer::didPurchaseItem @ 0x1403b3082
// > GJShopLayer::showReactMessage @ 0x1403b39b9
// > GJShopLayer::showReactMessage @ 0x1403b488a
// > LevelAreaLayer::showDialog @ 0x1403de8a3
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x1403e0ed7
// > LevelPage::onTheTower @ 0x140445876
// > OptionsLayer::onSecretVault @ 0x1404cc37a
// > SecretRewardsLayer::onSelectItem @ 0x14056bf1b
// > SecretRewardsLayer::onSpecialItem @ 0x14056c7a0
// > SecretRewardsLayer::onGoldChest @ 0x14056d497
// > SecretRewardsLayer::showDialog01 @ 0x14056f20c
// > SecretRewardsLayer::showDialog03 @ 0x1405704c9
// > SecretRewardsLayer::showDialogMechanic @ 0x140571731
// > SecretRewardsLayer::showDialogDiamond @ 0x1405723b1
// > SecretLayer2::onSecretLevel @ 0x14057a3c3
// > SecretLayer2::onDoor @ 0x14057ac46
// > SecretLayer3::showUnlockDialog @ 0x14058366e
// > ??> @ 0x14089d324
// > ??> @ 0x14089d360
// > ??> @ 0x1409184a0
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:32 +0000
//
__int64 __fastcall DialogLayer::animateInRandomSide(cocos2d::CCNode *a1)
{
__int64 v2; // rdx
float v3; // xmm0_4
__int64 result; // rax
__int64 v5; // rcx
const struct cocos2d::CCPoint *v6; // rax
__int64 *v7; // rdi
__int64 v8; // rbx
__int64 v9; // rcx
cocos2d::CCDirector *v10; // rax
float ScreenRight; // xmm0_4
__int64 v12; // rax
struct cocos2d::CCActionInterval *v13; // rax
struct cocos2d::CCAction *v14; // rax
float v15; // xmm6_4
struct cocos2d::CCAction *v16; // rax
_BYTE v17[4]; // [rsp+20h] [rbp-38h] BYREF
float v18; // [rsp+24h] [rbp-34h]
struct __timeb64 Time; // [rsp+28h] [rbp-30h] BYREF
v3 = (float)rand() / 32767.0;
if ( v3 > 0.66000003 )
return DialogLayer::animateIn(a1, 2);
if ( v3 <= 0.33000001 )
return DialogLayer::animateIn(a1, 1);
LOBYTE(v2) = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 336LL))(a1, v2);
ftime64(&Time);
v5 = *((_QWORD *)a1 + 70);
*((double *)a1 + 69) = (double)Time.millitm / 1000.0 + (double)SLODWORD(Time.time);
v6 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 200LL))(v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v6);
v7 = *((__int64 **)a1 + 70);
v8 = *v7;
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
ScreenRight = cocos2d::CCDirector::getScreenRight(v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&Time, (float)(ScreenRight + 190.0) + 1.0, v18);
(*(void (__fastcall **)(__int64 *, __int64))(v8 + 184))(v7, v12);
v13 = cocos2d::CCMoveTo::create(0.5, (const struct cocos2d::CCPoint *)v17);
v14 = cocos2d::CCEaseElasticOut::create(v13, 0.60000002);
cocos2d::CCNode::runAction(*((cocos2d::CCNode **)a1 + 70), v14);
result = (*(unsigned __int8 (__fastcall **)(__int64))(*((_QWORD *)a1 + 51) + 32LL))((__int64)a1 + 408);
v15 = (float)(unsigned __int8)result;
if ( v15 > 0.0 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)a1 + 51) + 40LL))((__int64)a1 + 408, 0);
v16 = cocos2d::CCFadeTo::create(0.14, (int)v15);
return (__int64)cocos2d::CCNode::runAction(a1, v16);
}
return result;
}