//
// OBB2D::getBoundingRect from 0x58dc94 to 0x58dd94 (256 bytes)
//
// 5 xrefs:
// > GameObject::getOuterObjectRect @ 0x6481bc
// > LevelEditorLayer::getObjectRect @ 0x65d50c
// > GJBaseGameLayer::preUpdateVisibility @ 0x881be0
// > GJBaseGameLayer::preUpdateVisibility @ 0x881c44
// > ??> @ 0x6bec8
//
// 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 OBB2D::getBoundingRect(OBB2D *a1)
{
cocos2d::CCRect *v1; // x8
std::array *p_m_positions; // x21
float y; // s8
std::array *p_m_corners; // x19
float v5; // s9
cocos2d::CCRect *v6; // x23
float x; // s11
float v8; // s10
cocos2d::CCPoint v13; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
p_m_positions = &a1->m_positions;
y = 0.0;
p_m_corners = &a1->m_corners;
v5 = 0.0;
v6 = v1;
x = 0.0;
v8 = 0.0;
do
{
cocos2d::CCPoint::CCPoint(&v13, p_m_corners->__elems_);
if ( v13.x > x )
x = v13.x;
if ( v13.x < v8 || v8 == 0.0 )
v8 = v13.x;
if ( v13.y > y )
y = v13.y;
if ( v13.y < v5 || v5 == 0.0 )
v5 = v13.y;
p_m_corners = (std::array *)((char *)p_m_corners + 8);
}
while ( p_m_corners != p_m_positions );
cocos2d::CCRect::CCRect(v6, v8, v5, x - v8, y - v5);
return result;
}