//
// DialogLayer::updateChatPlacement from 0xa703cc to 0xa7050c (320 bytes)
//
// 51 xrefs:
// > PlayLayer::destroyPlayer @ 0x6ff4c0
// > CreatorLayer::onOnlyFullVersion @ 0x7dbe98
// > CreatorLayer::onMultiplayer @ 0x7dc098
// > CreatorLayer::onSecretVault @ 0x7dc42c
// > CreatorLayer::onTreasureRoom @ 0x7dc784
// > CreatorLayer::onTreasureRoom @ 0x7dc988
// > GJGarageLayer::onRewardedVideo @ 0x8bb624
// > GJGarageLayer::showUnlockPopup @ 0x8bfbc0
// > LevelPage::onTheTower @ 0x8c6884
// > LevelPage::onSecretDoor @ 0x8c6e50
// > OptionsLayer::onSecretVault @ 0x8f73d4
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x903e38
// > RetryLevelLayer::onRewardedVideo @ 0x918e14
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0xa2b68c
// > DailyLevelPage::dailyStatusFailed @ 0xa6d480
// > GauntletSelectLayer::onPlay @ 0xa73b48
// > GJShopLayer::didPurchaseItem @ 0xa7d768
// > GJShopLayer::showReactMessage @ 0xa7de28
// > GJShopLayer::showReactMessage @ 0xa7e1c8
// > GJShopLayer::showCantAffordMessage @ 0xa806a0
// > SecretLayer2::showCompletedLevel @ 0xa8be3c
// > SecretLayer2::onSecretLevel @ 0xa8c0fc
// > SecretLayer3::firstInteractionStep2 @ 0xa8c688
// > SecretLayer3::firstInteractionStep4 @ 0xa8c9d8
// > SecretLayer3::onClick @ 0xa8cb94
// > SecretLayer3::showUnlockDialog @ 0xa8d7f0
// > SecretLayer3::revealStep2 @ 0xa8db7c
// > SecretLayer3::revealStep5 @ 0xa8df18
// > SecretLayer3::revealStep4 @ 0xa8f038
// > SecretLayer2::onDoor @ 0xa93a00
// > SecretLayer4::showDialog @ 0xa94a04
// > SecretLayer4::showFirstDialog @ 0xa95148
// > WorldSelectLayer::showCompleteDialog @ 0xaa6f5c
// > FollowRewardPage::onRewardedVideo @ 0xaaab98
// > CharacterColorPage::onMode @ 0xb51f38
// > LevelAreaLayer::showDialog @ 0xb5a708
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0xb5aa88
// > SecretRewardsLayer::showDialog01 @ 0xb9ad5c
// > SecretRewardsLayer::showDialog03 @ 0xb9bedc
// > SecretRewardsLayer::showDialogMechanic @ 0xb9cc50
// > SecretRewardsLayer::showDialogDiamond @ 0xb9d92c
// > SecretRewardsLayer::showLockedChest @ 0xb9e4e8
// > SecretRewardsLayer::onSpecialItem @ 0xb9e834
// > SecretRewardsLayer::onGoldChest @ 0xb9eb50
// > SecretRewardsLayer::onSelectItem @ 0xb9ee24
// > GJPathPage::showCantAffordMessage @ 0xba8400
// > LevelListLayer::onClaimReward @ 0xbac08c
// > SecretLayer5::showDialog @ 0xbc5af8
// > SecretLayer5::showFirstDialog @ 0xbc62b0
// > GameSettingsLayer::showPracticeMusicSyncUnlockInfo @ 0xc06a68
// > ??> @ 0x610f0
//
// This function is hookable on this platform (idp: arm, 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 13:00:23 +0000
//
__int64 __fastcall DialogLayer::updateChatPlacement(__int64 a1, int a2)
{
cocos2d::CCDirector *v3; // x0
__int64 v5; // x20
void (__fastcall *v6)(__int64, _BYTE *); // x21
__int64 v7; // x21
void (__fastcall *v8)(__int64, _BYTE *); // x20
__int64 v9; // x21
void (__fastcall *v10)(__int64, _BYTE *); // x20
__int64 v12; // [xsp+48h] [xbp+48h] BYREF
_BYTE v13[8]; // [xsp+50h] [xbp+50h] BYREF
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
cocos2d::CCDirector::getWinSize(&v12, v3);
if ( a2 )
{
if ( a2 == 1 )
{
v9 = *(_QWORD *)(a1 + 560);
v10 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v13,
*(float *)&v12 * 0.5,
(float)(*((float *)&v12 + 1) - 50.0) - 20.0);
v10(v9, v13);
}
else if ( a2 == 2 )
{
v7 = *(_QWORD *)(a1 + 560);
v8 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, *(float *)&v12 * 0.5, 70.0);
v8(v7, v13);
}
}
else
{
v5 = *(_QWORD *)(a1 + 560);
v6 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v5 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, *(float *)&v12 * 0.5, *((float *)&v12 + 1) * 0.5);
v6(v5, v13);
}
return _stack_chk_guard;
}