//
// DialogLayer::updateChatPlacement from 0x9165dc to 0x91671c (320 bytes)
//
// 50 xrefs:
// > PlayLayer::destroyPlayer @ 0x5d21ec
// > CreatorLayer::onMultiplayer @ 0x6caa90
// > CreatorLayer::onSecretVault @ 0x6caf98
// > CreatorLayer::onTreasureRoom @ 0x6cb414
// > CreatorLayer::onTreasureRoom @ 0x6cb62c
// > CreatorLayer::onOnlyFullVersion @ 0x6cbc30
// > GJGarageLayer::onRewardedVideo @ 0x790734
// > GJGarageLayer::showUnlockPopup @ 0x7966bc
// > LevelPage::onTheTower @ 0x79b8ec
// > LevelPage::onSecretDoor @ 0x79c118
// > OptionsLayer::onSecretVault @ 0x7c7980
// > SongInfoLayer::showCustomMusicUnlockInfo @ 0x7de38c
// > RetryLevelLayer::onRewardedVideo @ 0x7ee9b8
// > GameOptionsLayer::showPracticeMusicSyncUnlockInfo @ 0x8d5978
// > DailyLevelPage::dailyStatusFailed @ 0x912ea4
// > GauntletSelectLayer::onPlay @ 0x917ef0
// > GJShopLayer::didPurchaseItem @ 0x92afdc
// > GJShopLayer::showReactMessage @ 0x92c41c
// > GJShopLayer::showReactMessage @ 0x92c7f4
// > GJShopLayer::showCantAffordMessage @ 0x930b08
// > SecretLayer2::onSecretLevel @ 0x93af98
// > SecretLayer3::revealStep2 @ 0x93b2f8
// > SecretLayer3::firstInteractionStep4 @ 0x93b7c4
// > SecretLayer3::firstInteractionStep2 @ 0x93bd24
// > SecretLayer3::revealStep5 @ 0x93c2fc
// > SecretLayer3::revealStep4 @ 0x93ca30
// > SecretLayer2::showCompletedLevel @ 0x93d61c
// > SecretLayer3::showUnlockDialog @ 0x93df54
// > SecretLayer3::onClick @ 0x93e648
// > SecretLayer2::onDoor @ 0x94636c
// > SecretLayer4::showFirstDialog @ 0x946be4
// > SecretLayer4::showDialog @ 0x9472e0
// > WorldSelectLayer::showCompleteDialog @ 0x95eb84
// > FollowRewardPage::onRewardedVideo @ 0x9636f8
// > CharacterColorPage::onMode @ 0xa24cec
// > LevelAreaLayer::showDialog @ 0xa2dbe4
// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0xa2e098
// > SecretRewardsLayer::showLockedChest @ 0xa60e6c
// > SecretRewardsLayer::onSpecialItem @ 0xa618c4
// > SecretRewardsLayer::onSelectItem @ 0xa61f40
// > SecretRewardsLayer::onGoldChest @ 0xa64518
// > SecretRewardsLayer::showDialog01 @ 0xa647dc
// > SecretRewardsLayer::showDialog03 @ 0xa6657c
// > SecretRewardsLayer::showDialogMechanic @ 0xa67c04
// > SecretRewardsLayer::showDialogDiamond @ 0xa69184
// > GJPathPage::showCantAffordMessage @ 0xa71940
// > LevelListLayer::onClaimReward @ 0xa738ec
// > SecretLayer5::showFirstDialog @ 0xa90474
// > SecretLayer5::showDialog @ 0xa92cf0
// > ??> @ 0x44250
//
// 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 *v3; // x0
cocos2d::CCLayer *v4; // x20
void (__fastcall *v5)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21
cocos2d::CCLayer *v6; // x21
void (__fastcall *v7)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
cocos2d::CCLayer *m_mainLayer; // x21
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
float v11; // [xsp+48h] [xbp+48h]
float v12; // [xsp+4Ch] [xbp+4Ch]
cocos2d::CCPoint v13; // [xsp+50h] [xbp+50h] BYREF
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v3);
if ( a2 )
{
if ( a2 == Top )
{
m_mainLayer = a1->m_mainLayer;
setPosition = m_mainLayer->setPosition;
cocos2d::CCPoint::CCPoint(&v13, v11 * 0.5, (float)(v12 - 50.0) - 20.0);
setPosition(m_mainLayer, &v13);
}
else if ( a2 == Bottom )
{
v6 = a1->m_mainLayer;
v7 = v6->setPosition;
cocos2d::CCPoint::CCPoint(&v13, v11 * 0.5, 70.0);
v7(v6, &v13);
}
}
else
{
v4 = a1->m_mainLayer;
v5 = v4->setPosition;
cocos2d::CCPoint::CCPoint(&v13, v11 * 0.5, v12 * 0.5);
v5(v4, &v13);
}
}