//
// EditorUI::centerCameraOnObject from 0x1000335b0 to 0x100033687 (215 bytes)
//
// 0 xrefs:
//
// 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 EditorUI::centerCameraOnObject(EditorUI *a1, GameObject *a2)
{
cocos2d::CCDirector *v4; // rsi
float *v5; // rax
__int64 v6; // rax
_BYTE v7[8]; // [rsp+8h] [rbp-28h] BYREF
float v8[2]; // [rsp+10h] [rbp-20h] BYREF
float v9; // [rsp+18h] [rbp-18h]
float v10; // [rsp+1Ch] [rbp-14h]
double v11; // 0:xmm0_8.8
v4 = cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v11 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v8);
v10 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCDirector *, double))a1->m_editorLayer->m_objectLayer->getScale)(
a1->m_editorLayer->m_objectLayer,
v4,
v11);
v5 = (float *)((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);
v9 = (float)(v8[0] * 0.5) - (float)(*v5 * v10);
v6 = ((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);
sub_10028CBE0(v7, v9, (float)(0.5 * v8[1]) - (float)(v10 * *(float *)(v6 + 4)));
((void (__fastcall *)(cocos2d::CCLayer *, _BYTE *))a1->m_editorLayer->m_objectLayer->setPosition)(
a1->m_editorLayer->m_objectLayer,
v7);
EditorUI::constrainGameLayerPosition(a1, -100.0, -100.0);
}