//
// DialogLayer::updateChatPlacement from 0x1003b11e0 to 0x1003b12a9 (201 bytes)
//
// 50 xrefs:
// > PlayLayer::destroyPlayer @ 0x1000882b5
// > DailyLevelPage::dailyStatusFailed @ 0x100216310
// > LevelAreaLayer::showDialog @ 0x100265d6c
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x100267e22
// > CreatorLayer::onMultiplayer @ 0x1002833b2
// > CreatorLayer::onOnlyFullVersion @ 0x100283aa1
// > CreatorLayer::onSecretVault @ 0x10028402d
// > CreatorLayer::onTreasureRoom @ 0x1002843ee
// > CreatorLayer::onTreasureRoom @ 0x100284587
// > sub_10029EC20 @ 0x10029ee27
// > sub_1002EC240 @ 0x1002ec3c2
// > sub_100310700 @ 0x100310882
// > GJShopLayer::didPurchaseItem @ 0x100311239
// > GJShopLayer::showReactMessage @ 0x100311961
// > GJShopLayer::showReactMessage @ 0x100312322
// > LevelListLayer::onClaimReward @ 0x10034a8d0
// > GJGarageLayer::onRewardedVideo @ 0x100355a5b
// > GJGarageLayer::showUnlockPopup @ 0x100358911
// > SecretLayer4::showFirstDialog @ 0x10039b03d
// > sub_10039C370 @ 0x10039c6a7
// > WorldSelectLayer::showCompleteDialog @ 0x1003ac377
// > sub_10040E060 @ 0x10040e33f
// > LevelPage::onTheTower @ 0x100423f13
// > LevelPage::onSecretDoor @ 0x100424ce1
// > SecretLayer5::showFirstDialog @ 0x10047080b
// > sub_100472510 @ 0x100472847
// > SecretLayer2::onDoor @ 0x100498c7e
// > SecretLayer2::onSecretLevel @ 0x100498e6a
// > SecretLayer2::showCompletedLevel @ 0x100499842
// > SecretLayer3::onClick @ 0x10049ea48
// > SecretLayer3::firstInteractionStep2 @ 0x10049f3d7
// > SecretLayer3::firstInteractionStep4 @ 0x10049f91a
// > SecretLayer3::showUnlockDialog @ 0x10049fda3
// > SecretLayer3::revealStep2 @ 0x1004a027a
// > SecretLayer3::revealStep4 @ 0x1004a0a1b
// > SecretLayer3::revealStep5 @ 0x1004a0fea
// > RetryLevelLayer::onRewardedVideo @ 0x1004f846f
// > GauntletSelectLayer::onPlay @ 0x1005a00b7
// > sub_100602BF0 @ 0x100602df7
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x1006d984b
// > SecretRewardsLayer::onGoldChest @ 0x10070f2ff
// > SecretRewardsLayer::onSpecialItem @ 0x10070fbdd
// > SecretRewardsLayer::showLockedChest @ 0x10070fef0
// > SecretRewardsLayer::onSelectItem @ 0x100711712
// > SecretRewardsLayer::showDialog01 @ 0x100712ecd
// > SecretRewardsLayer::showDialog03 @ 0x1007145fb
// > SecretRewardsLayer::showDialogMechanic @ 0x100715b8f
// > SecretRewardsLayer::showDialogDiamond @ 0x100716a92
// > CharacterColorPage::onMode @ 0x10073cfe5
// > OptionsLayer::onSecretVault @ 0x10087bcf1
//
// 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 12:29:25 +0000
//
__int64 __fastcall DialogLayer::updateChatPlacement(__int64 a1, __int64 a2)
{
__int64 v2; // rax
__int64 result; // rax
__int64 v4; // rbx
float v5; // xmm0_4
float v6; // xmm1_4
float v7; // [rsp+0h] [rbp-20h] BYREF
float v8; // [rsp+8h] [rbp-18h] BYREF
float v9; // [rsp+Ch] [rbp-14h]
v2 = cocos2d::CCDirector::sharedDirector(a1, a2);
result = cocos2d::CCDirector::getWinSize(&v8, v2);
if ( (_DWORD)a2 == 2 )
{
v4 = *(_QWORD *)(a1 + 560);
v5 = v8 * 0.5;
v6 = 70.0;
}
else if ( (_DWORD)a2 == 1 )
{
v4 = *(_QWORD *)(a1 + 560);
v5 = v8 * 0.5;
v6 = (float)(v9 + -50.0) + -20.0;
}
else
{
if ( (_DWORD)a2 )
return result;
v4 = *(_QWORD *)(a1 + 560);
v5 = v8 * 0.5;
v6 = 0.5 * v9;
}
sub_100278250(&v7, v5, v6);
return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v4 + 184LL))(v4, &v7);
}