//
// OBB2D::create from 0x14006d8b0 to 0x14006da3f (399 bytes)
//
// 6 xrefs:
// > GameObject::updateOrientedBox @ 0x1401a1634
// > GJBaseGameLayer::init @ 0x1402073ff
// > GJBaseGameLayer::init @ 0x140207435
// > LevelEditorLayer::init @ 0x1402d277c
// > ??> @ 0x1406c609c
// > ??> @ 0x1406c60a8
//
// 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
//
// Hidden C++ exception states: #wind=2
OBB2D *OBB2D::create(cocos2d::CCPoint a1, float a2, float a3, float a4)
{
OBB2D *v5; // rsi
const struct cocos2d::CCPoint *v6; // rbx
cocos2d::CCPoint v7; // rax
OBB2D *v9; // [rsp+30h] [rbp-48h] BYREF
cocos2d::CCPoint v10; // [rsp+38h] [rbp-40h] BYREF
v5 = (OBB2D *)operator new(0x1B8u);
v9 = v5;
memset(v5, 0, sizeof(OBB2D));
cocos2d::CCNode::CCNode(v5);
v5->__vftable = (OBB2D_vtbl *)&OBB2D::`vftable';
cocos2d::CCPoint::CCPoint(v5->m_corners._Elems);
cocos2d::CCPoint::CCPoint(&v5->m_corners._Elems[1]);
cocos2d::CCPoint::CCPoint(&v5->m_corners._Elems[2]);
cocos2d::CCPoint::CCPoint(&v5->m_corners._Elems[3]);
cocos2d::CCPoint::CCPoint(v5->m_positions._Elems);
cocos2d::CCPoint::CCPoint(&v5->m_positions._Elems[1]);
cocos2d::CCPoint::CCPoint(&v5->m_positions._Elems[2]);
cocos2d::CCPoint::CCPoint(&v5->m_positions._Elems[3]);
cocos2d::CCPoint::CCPoint(v5->m_edges._Elems);
cocos2d::CCPoint::CCPoint(&v5->m_edges._Elems[1]);
cocos2d::CCPoint::CCPoint(&v5->m_edges._Elems[2]);
cocos2d::CCPoint::CCPoint(&v5->m_edges._Elems[3]);
cocos2d::CCPoint::CCPoint(&v5->m_center);
v6 = (const struct cocos2d::CCPoint *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v9,
*(const struct cocos2d::CCPoint **)&a1);
if ( cocos2d::CCNode::init(v5) )
{
v7 = (cocos2d::CCPoint)cocos2d::CCPoint::CCPoint(&v10, v6);
OBB2D::calculateWithCenter(v5, v7, a2, a3, a4);
cocos2d::CCObject::autorelease(v5);
return v5;
}
else
{
((void (__fastcall *)(OBB2D *, __int64))v5->~OBB2D)(v5, 1);
return nullptr;
}
}