//
// DialogLayer::updateChatPlacement from 0x1000870b4 to 0x100087170 (188 bytes)
//
// 41 xrefs:
// > SecretLayer5::showFirstDialog @ 0x100075548
// > CreatorLayer::onMultiplayer @ 0x1000b5ff4
// > CreatorLayer::onSecretVault @ 0x1000b6648
// > CreatorLayer::onTreasureRoom @ 0x1000b68c8
// > CreatorLayer::onTreasureRoom @ 0x1000b69d4
// > OptionsLayer::onSecretVault @ 0x1000ed2dc
// > PlayLayer::destroyPlayer @ 0x10011efb4
// > CharacterColorPage::onMode @ 0x100129824
// > GJShopLayer::showCantAffordMessage @ 0x10014c194
// > GJShopLayer::didPurchaseItem @ 0x10014c808
// > GJShopLayer::showReactMessage @ 0x10014cdb8
// > GJShopLayer::showReactMessage @ 0x10014d260
// > DailyLevelPage::dailyStatusFailed @ 0x1001ba57c
// > GauntletSelectLayer::onPlay @ 0x1001bfbd0
// > LevelListLayer::onClaimReward @ 0x100246288
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x1002e1f84
// > SecretRewardsLayer::onGoldChest @ 0x1002e9ec4
// > SecretRewardsLayer::onSpecialItem @ 0x1002ea4e4
// > SecretRewardsLayer::onSelectItem @ 0x1002eb668
// > SecretRewardsLayer::showDialog01 @ 0x1002ec32c
// > SecretRewardsLayer::showDialog03 @ 0x1002ed148
// > SecretRewardsLayer::showDialogMechanic @ 0x1002eddc8
// > SecretRewardsLayer::showDialogDiamond @ 0x1002ee6d4
// > GJGarageLayer::showUnlockPopup @ 0x100306878
// > SecretLayer2::onDoor @ 0x10030ba70
// > SecretLayer2::onSecretLevel @ 0x10030bbf8
// > SecretLayer2::showCompletedLevel @ 0x10030c180
// > SecretLayer3::onClick @ 0x10030f944
// > SecretLayer3::firstInteractionStep2 @ 0x1003100a8
// > SecretLayer3::firstInteractionStep4 @ 0x100310500
// > SecretLayer3::showUnlockDialog @ 0x100310890
// > SecretLayer3::revealStep2 @ 0x100310c68
// > SecretLayer3::revealStep4 @ 0x100311120
// > SecretLayer3::revealStep5 @ 0x10031150c
// > LevelAreaLayer::showDialog @ 0x1003453b8
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x100346b38
// > SecretLayer4::showFirstDialog @ 0x100354ad8
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x1003a8bf0
// > GJPathPage::showCantAffordMessage @ 0x1003ba8e4
// > LevelPage::onTheTower @ 0x100404c80
// > LevelPage::onSecretDoor @ 0x1004057a8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall DialogLayer::updateChatPlacement(DialogLayer *a1, DialogChatPlacement a2)
{
cocos2d::CCDirector *v4; // x0
__n128 v5; // q0
__n128 v6; // q1
cocos2d::CCLayer *m_mainLayer; // x19
int v8; // [xsp+0h] [xbp-20h] BYREF
float v9; // [xsp+8h] [xbp-18h]
float v10; // [xsp+Ch] [xbp-14h]
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v4);
if ( a2 == Bottom )
{
m_mainLayer = a1->m_mainLayer;
v5.n128_f32[0] = v9 * 0.5;
v6.n128_u32[0] = 1116471296;
}
else if ( a2 == Top )
{
m_mainLayer = a1->m_mainLayer;
v5.n128_f32[0] = v9 * 0.5;
v6.n128_f32[0] = (float)(v10 + -50.0) + -20.0;
}
else
{
if ( a2 )
return;
m_mainLayer = a1->m_mainLayer;
v5.n128_f32[0] = v9 * 0.5;
v6.n128_f32[0] = v10 * 0.5;
}
sub_100022980(v5, v6, &v8);
((void (__fastcall *)(cocos2d::CCLayer *, int *))m_mainLayer->setPosition)(m_mainLayer, &v8);
}