//
// OBB2D::getBoundingRect from 0x2f29dc to 0x2f2ab2 (214 bytes)
//
// 4 xrefs:
// > GameObject::getOuterObjectRect @ 0x3571e4
// > LevelEditorLayer::getObjectRect @ 0x3661ce
// > GJBaseGameLayer::preUpdateVisibility @ 0x489000
// > GJBaseGameLayer::preUpdateVisibility @ 0x489066
//
// 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(cocos2d::CCRect *__return_ptr retstr, OBB2D *a2)
{
std::array *p_m_corners; // r6
std::array *p_m_positions; // r5
float v5; // s16
float v6; // s18
float v7; // s17
float i; // s19
float x; // s14
float y; // s15
cocos2d::CCPoint v12; // [sp+Ch] [bp-Ch] BYREF
p_m_corners = &a2->m_corners;
p_m_positions = &a2->m_positions;
v5 = 0.0;
v6 = 0.0;
v7 = 0.0;
for ( i = 0.0; ; i = x )
{
cocos2d::CCPoint::CCPoint(&v12, p_m_corners->__elems_);
x = v12.x;
if ( v12.x > v7 )
v7 = v12.x;
if ( v12.x >= i && i != 0.0 )
x = i;
y = v12.y;
if ( v12.y > v5 )
v5 = v12.y;
if ( v12.y >= v6 && v6 != 0.0 )
y = v6;
p_m_corners = (std::array *)((char *)p_m_corners + 8);
if ( p_m_corners == p_m_positions )
break;
v6 = y;
}
cocos2d::CCRect::CCRect(retstr, x, y, v7 - x, v5 - y);
return retstr;
}