//
// DialogLayer::updateChatPlacement from 0x4d5dd8 to 0x4d5e94 (188 bytes)
//
// 49 xrefs:
// > PlayLayer::destroyPlayer @ 0x314236
// > CreatorLayer::onMultiplayer @ 0x3aa6e8
// > CreatorLayer::onSecretVault @ 0x3aab6a
// > CreatorLayer::onTreasureRoom @ 0x3aad6a
// > CreatorLayer::onTreasureRoom @ 0x3aae12
// > CreatorLayer::onOnlyFullVersion @ 0x3ab184
// > GJGarageLayer::onRewardedVideo @ 0x402714
// > GJGarageLayer::showUnlockPopup @ 0x405b1e
// > LevelPage::onTheTower @ 0x4088f8
// > LevelPage::onSecretDoor @ 0x408d24
// > OptionsLayer::onSecretVault @ 0x4219f6
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x42d87e
// > RetryLevelLayer::onRewardedVideo @ 0x43625a
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x4b198e
// > DailyLevelPage::dailyStatusFailed @ 0x4d39c8
// > GauntletSelectLayer::onPlay @ 0x4d6cda
// > GJShopLayer::didPurchaseItem @ 0x4e1b60
// > GJShopLayer::showReactMessage @ 0x4e25de
// > GJShopLayer::showReactMessage @ 0x4e2a3e
// > GJShopLayer::showCantAffordMessage @ 0x4e47d2
// > SecretLayer2::showCompletedLevel @ 0x4ea3fc
// > SecretLayer3::firstInteractionStep4 @ 0x4ea67e
// > SecretLayer3::revealStep2 @ 0x4ea834
// > SecretLayer3::revealStep5 @ 0x4eaa68
// > SecretLayer2::onSecretLevel @ 0x4eac00
// > SecretLayer3::showUnlockDialog @ 0x4eadf4
// > SecretLayer3::revealStep4 @ 0x4eb0cc
// > SecretLayer3::firstInteractionStep2 @ 0x4eb620
// > SecretLayer3::onClick @ 0x4ebb3e
// > SecretLayer2::onDoor @ 0x4edfbc
// > SecretLayer4::showFirstDialog @ 0x4f00d4
// > SecretLayer4::showDialog @ 0x4f06a6
// > WorldSelectLayer::showCompleteDialog @ 0x4fc7b6
// > FollowRewardPage::onRewardedVideo @ 0x4ffb74
// > CharacterColorPage::onMode @ 0x565036
// > LevelAreaLayer::showDialog @ 0x56b676
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x56b8a6
// > SecretRewardsLayer::showLockedChest @ 0x585486
// > SecretRewardsLayer::onSpecialItem @ 0x5859ca
// > SecretRewardsLayer::onSelectItem @ 0x585caa
// > SecretRewardsLayer::onGoldChest @ 0x587404
// > SecretRewardsLayer::showDialog01 @ 0x587d5e
// > SecretRewardsLayer::showDialog03 @ 0x5886c0
// > SecretRewardsLayer::showDialogMechanic @ 0x588f1a
// > SecretRewardsLayer::showDialogDiamond @ 0x589596
// > GJPathPage::showCantAffordMessage @ 0x58e8e6
// > LevelListLayer::onClaimReward @ 0x58ed7a
// > SecretLayer5::showFirstDialog @ 0x59c2c4
// > SecretLayer5::showDialog @ 0x59d9e2
//
// 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 DialogLayer::updateChatPlacement(DialogLayer *a1, DialogChatPlacement a2)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCLayer *m_mainLayer; // r6
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
float v7; // r1
float v8; // s15
float v9; // r2
cocos2d::CCSize v10; // [sp+4h] [bp-18h] BYREF
cocos2d::CCPoint v11; // [sp+Ch] [bp-10h] BYREF
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v10, v4);
if ( a2 == Center )
{
m_mainLayer = a1->m_mainLayer;
setPosition = m_mainLayer->setPosition;
v7 = v10.width * 0.5;
v8 = v10.height * 0.5;
LABEL_5:
v9 = v8;
goto LABEL_8;
}
if ( a2 == Top )
{
m_mainLayer = a1->m_mainLayer;
setPosition = m_mainLayer->setPosition;
v7 = v10.width * 0.5;
v8 = (float)(v10.height - 50.0) - 20.0;
goto LABEL_5;
}
if ( a2 != Bottom )
return;
m_mainLayer = a1->m_mainLayer;
v9 = 70.0;
setPosition = m_mainLayer->setPosition;
v7 = v10.width * 0.5;
LABEL_8:
cocos2d::CCPoint::CCPoint(&v11, v7, v9);
setPosition(m_mainLayer, &v11);
}