//
// DialogLayer::updateChatPlacement from 0x100090524 to 0x1000905e0 (188 bytes)
//
// 41 xrefs:
// > sub_10007DA90 @ 0x10007dcfc
// > CreatorLayer::onMultiplayer @ 0x1000dba64
// > CreatorLayer::onSecretVault @ 0x1000dc130
// > CreatorLayer::onTreasureRoom @ 0x1000dc3b0
// > CreatorLayer::onTreasureRoom @ 0x1000dc4bc
// > OptionsLayer::onSecretVault @ 0x1001136bc
// > PlayLayer::destroyPlayer @ 0x100148250
// > CharacterColorPage::onMode @ 0x100153254
// > sub_1001669E8 @ 0x100166c08
// > sub_1001CA948 @ 0x1001caa8c
// > GJShopLayer::didPurchaseItem @ 0x1001cb108
// > sub_1001CB24C @ 0x1001cb6b8
// > sub_1001CB24C @ 0x1001cbb60
// > DailyLevelPage::dailyStatusFailed @ 0x1002501d4
// > GauntletSelectLayer::onPlay @ 0x10025574c
// > LevelListLayer::onClaimReward @ 0x1002e33d0
// > SecretRewardsLayer::onGoldChest @ 0x10038504c
// > sub_100385500 @ 0x10038566c
// > SecretRewardsLayer::onSelectItem @ 0x1003867f0
// > sub_100386874 @ 0x1003874b4
// > sub_100387984 @ 0x1003882d0
// > sub_10038866C @ 0x100388f50
// > sub_1003892C0 @ 0x10038985c
// > GJGarageLayer::showUnlockPopup @ 0x1003a3590
// > SecretLayer2::onDoor @ 0x1003a878c
// > sub_1003A8808 @ 0x1003a8910
// > sub_1003A8960 @ 0x1003a8e98
// > SecretLayer3::onClick @ 0x1003ac65c
// > sub_1003ACBB8 @ 0x1003acdc0
// > sub_1003AD00C @ 0x1003ad218
// > sub_1003AD35C @ 0x1003ad5a8
// > sub_1003AD7E0 @ 0x1003ad980
// > sub_1003ADACC @ 0x1003ade38
// > sub_1003ADFB0 @ 0x1003ae224
// > sub_1003E39F4 @ 0x1003e3b34
// > sub_1003E503C @ 0x1003e52b4
// > sub_1003F41C8 @ 0x1003f43c8
// > sub_10044F9C4 @ 0x10044fb28
// > sub_100461458 @ 0x10046159c
// > LevelPage::onTheTower @ 0x1004856e8
// > sub_100485D8C @ 0x100486210
//
// 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 10:58:23 +0000
//
_QWORD *__fastcall DialogLayer::updateChatPlacement(__int64 a1, int a2)
{
__int64 v4; // x0
_QWORD *result; // x0
__int64 v6; // x19
float v7; // s0
float v8; // s1
float v9; // [xsp+0h] [xbp-20h] BYREF
__int64 v10; // [xsp+8h] [xbp-18h] BYREF
v4 = cocos2d::CCDirector::sharedDirector(a1);
result = cocos2d::CCDirector::getWinSize(&v10, v4);
if ( a2 == 2 )
{
v6 = *(_QWORD *)(a1 + 560);
v7 = *(float *)&v10 * 0.5;
v8 = 70.0;
}
else if ( a2 == 1 )
{
v6 = *(_QWORD *)(a1 + 560);
v7 = *(float *)&v10 * 0.5;
v8 = (float)(*((float *)&v10 + 1) + -50.0) + -20.0;
}
else
{
if ( a2 )
return result;
v6 = *(_QWORD *)(a1 + 560);
v7 = *(float *)&v10 * 0.5;
v8 = *((float *)&v10 + 1) * 0.5;
}
sub_1000262BC(&v9, v7, v8);
return (_QWORD *)(*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v6 + 184LL))(v6, &v9);
}