//
// OBB2D::getBoundingRect from 0x10012d22c to 0x10012d2e8 (188 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::preUpdateVisibility @ 0x1001fd678
// > GJBaseGameLayer::preUpdateVisibility @ 0x1001fd6d0
// > GameObject::getObjectRect2 @ 0x10025ae44
// > LevelEditorLayer::getObjectRect @ 0x10035b188
//
// 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
//
cocos2d::CCRect __fastcall OBB2D::getBoundingRect(OBB2D *a1)
{
float *v1; // x8
float *v2; // x19
__int64 *p_m_corners; // x20
__int64 v4; // x21
float v5; // s11
float v6; // s8
float v7; // s12
float v8; // s9
__int64 v15; // [xsp+8h] [xbp-58h] BYREF
cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v2 = v1;
p_m_corners = (__int64 *)&a1->m_corners;
v4 = 4;
v5 = 0.0;
v6 = 0.0;
v7 = 0.0;
v8 = 0.0;
do
{
sub_1000229B8(&v15, p_m_corners);
if ( *(float *)&v15 > v7 )
v7 = *(float *)&v15;
if ( *(float *)&v15 < v8 || v8 == 0.0 )
v8 = *(float *)&v15;
if ( *((float *)&v15 + 1) > v5 )
v5 = *((float *)&v15 + 1);
if ( *((float *)&v15 + 1) < v6 || v6 == 0.0 )
v6 = *((float *)&v15 + 1);
++p_m_corners;
--v4;
}
while ( v4 );
sub_100022990(v2, v8, v6, v7 - v8, v5 - v6);
return result;
}