//
// DialogLayer::updateChatPlacement from 0x609210 to 0x6092cc (188 bytes)
//
// 50 xrefs:
// > PlayLayer::destroyPlayer @ 0x405fd4
// > CreatorLayer::onOnlyFullVersion @ 0x493b10
// > CreatorLayer::onMultiplayer @ 0x493cce
// > CreatorLayer::onSecretVault @ 0x493eee
// > CreatorLayer::onTreasureRoom @ 0x494110
// > CreatorLayer::onTreasureRoom @ 0x4941c8
// > GJGarageLayer::onRewardedVideo @ 0x50c1b4
// > GJGarageLayer::showUnlockPopup @ 0x50eb7a
// > LevelPage::onTheTower @ 0x51390a
// > LevelPage::onSecretDoor @ 0x513df8
// > OptionsLayer::onSecretVault @ 0x53286c
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x53ade0
// > RetryLevelLayer::onRewardedVideo @ 0x547506
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x5db6c2
// > DailyLevelPage::dailyStatusFailed @ 0x607dc6
// > GauntletSelectLayer::onPlay @ 0x60aee4
// > GJShopLayer::didPurchaseItem @ 0x611aec
// > GJShopLayer::showReactMessage @ 0x6121b2
// > GJShopLayer::showReactMessage @ 0x612708
// > GJShopLayer::showCantAffordMessage @ 0x613bf0
// > SecretLayer2::showCompletedLevel @ 0x61b8a4
// > SecretLayer2::onSecretLevel @ 0x61ba74
// > SecretLayer3::firstInteractionStep2 @ 0x61bdba
// > SecretLayer3::firstInteractionStep4 @ 0x61bfe8
// > SecretLayer3::onClick @ 0x61c63a
// > SecretLayer3::showUnlockDialog @ 0x61cb1e
// > SecretLayer3::revealStep2 @ 0x61ccf8
// > SecretLayer3::revealStep5 @ 0x61cf68
// > SecretLayer3::revealStep4 @ 0x61da5c
// > SecretLayer2::onDoor @ 0x61e648
// > SecretLayer4::showDialog @ 0x621886
// > SecretLayer4::showFirstDialog @ 0x621b10
// > WorldSelectLayer::showCompleteDialog @ 0x62d638
// > FollowRewardPage::onRewardedVideo @ 0x6301ec
// > CharacterColorPage::onMode @ 0x69decc
// > LevelAreaLayer::showDialog @ 0x6a3d44
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x6a402e
// > SecretRewardsLayer::showDialog01 @ 0x6cb784
// > SecretRewardsLayer::showDialog03 @ 0x6cc2cc
// > SecretRewardsLayer::showDialogMechanic @ 0x6cccb0
// > SecretRewardsLayer::showDialogDiamond @ 0x6cd434
// > SecretRewardsLayer::showLockedChest @ 0x6cd970
// > SecretRewardsLayer::onSpecialItem @ 0x6cdb1a
// > SecretRewardsLayer::onGoldChest @ 0x6cdcb6
// > SecretRewardsLayer::onSelectItem @ 0x6cde8a
// > GJPathPage::showCantAffordMessage @ 0x6d46e6
// > LevelListLayer::onClaimReward @ 0x6d6c74
// > SecretLayer5::showDialog @ 0x6e486e
// > SecretLayer5::showFirstDialog @ 0x6e4b4e
// > GameSettingsLayer::showPracticeMusicSyncUnlockInfo @ 0x71108a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:46 +0000
//
int __fastcall DialogLayer::updateChatPlacement(cocos2d::CCDirector *a1, int a2)
{
int result; // r0
int v5; // r6
int (__fastcall *v6)(int, _BYTE *); // r7
float v7; // r1
float v8; // s15
float v9; // r2
float v10; // [sp+4h] [bp-18h] BYREF
float v11; // [sp+8h] [bp-14h]
_BYTE v12[8]; // [sp+Ch] [bp-10h] BYREF
cocos2d::CCDirector::sharedDirector(a1);
result = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v10);
if ( !a2 )
{
v5 = *((_DWORD *)a1 + 114);
v6 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 92);
v7 = v10 * 0.5;
v8 = v11 * 0.5;
LABEL_5:
v9 = v8;
goto LABEL_8;
}
if ( a2 == 1 )
{
v5 = *((_DWORD *)a1 + 114);
v6 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 92);
v7 = v10 * 0.5;
v8 = (float)(v11 - 50.0) - 20.0;
goto LABEL_5;
}
if ( a2 != 2 )
return result;
v5 = *((_DWORD *)a1 + 114);
v9 = 70.0;
v6 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 92);
v7 = v10 * 0.5;
LABEL_8:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, v7, v9);
return v6(v5, v12);
}