//
// OBB2D::create from 0x2f284c to 0x2f291e (210 bytes)
//
// 4 xrefs:
// > GameObject::updateOrientedBox @ 0x357110
// > LevelEditorLayer::init @ 0x37691a
// > GJBaseGameLayer::init @ 0x490cda
// > GJBaseGameLayer::init @ 0x490cf8
//
// 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
//
OBB2D *OBB2D::create(cocos2d::CCPoint a1, float a2, float a3, float a4)
{
float x; // r10
float y; // r8
OBB2D *v8; // r5
cocos2d::CCPoint *elems; // r4
cocos2d::CCPoint v10; // r1
OBB2D_vtbl *v11; // r3
OBB2D *v12; // r0
float v14; // [sp+4h] [bp-18h]
cocos2d::CCPoint v15; // [sp+Ch] [bp-10h] BYREF
x = a1.x;
y = a1.y;
v8 = (OBB2D *)operator new(0x180u);
memset(v8, 0, sizeof(OBB2D));
cocos2d::CCNode::CCNode(v8);
elems = v8->m_corners.__elems_;
v8->__vftable = (OBB2D_vtbl *)&off_A3FEE8;
do
cocos2d::CCPoint::CCPoint(elems++);
while ( elems != (cocos2d::CCPoint *)&v8->m_positions );
do
cocos2d::CCPoint::CCPoint(elems++);
while ( elems != (cocos2d::CCPoint *)&v8->m_edges );
do
cocos2d::CCPoint::CCPoint(elems++);
while ( elems != (cocos2d::CCPoint *)&v8->m_projections );
cocos2d::CCPoint::CCPoint(&v8->m_center);
cocos2d::CCPoint::CCPoint(&v15, (const cocos2d::CCPoint *)LODWORD(x));
LODWORD(v10.x) = &v15;
v10.y = y;
if ( OBB2D::init(v8, v10, a2, a3, v14) )
{
cocos2d::CCObject::autorelease(v8);
}
else
{
v11 = v8->__vftable;
v12 = v8;
v8 = nullptr;
v11->~OBB2D_0(v12);
}
return v8;
}