//
// EditorUI::centerCameraOnObject from 0x38143c to 0x3814de (162 bytes)
//
// 1 xrefs:
// > EditorUI::findAndSelectObject @ 0x3a2ebc
//
// 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 EditorUI::centerCameraOnObject(EditorUI *a1, GameObject *a2)
{
cocos2d::CCDirector *v4; // r0
float v5; // s17
const cocos2d::CCPoint *v6; // r0
float v7; // s16
const cocos2d::CCPoint *v8; // r0
cocos2d::CCSize v9; // [sp+4h] [bp-14h] BYREF
cocos2d::CCPoint v10; // [sp+Ch] [bp-Ch] BYREF
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v9, v4);
v5 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer));
v6 = a2->getPosition(a2);
v7 = (float)(v9.width * 0.5) - (float)(v6->x * v5);
v8 = a2->getPosition(a2);
cocos2d::CCPoint::CCPoint(&v10, v7, (float)(v9.height * 0.5) - (float)(v8->y * v5));
a1->m_editorLayer->m_objectLayer->setPosition(a1->m_editorLayer->m_objectLayer, &v10);
EditorUI::constrainGameLayerPosition(a1);
}