//
// OBB2D::calculateWithCenter from 0x2f26c4 to 0x2f27f2 (302 bytes)
//
// 7 xrefs:
// > OBB2D::init @ 0x2f282e
// > GameObject::updateOrientedBox @ 0x3571a0
// > LevelEditorLayer::getObjectRect @ 0x3661bc
// > GJBaseGameLayer::updateGroundShadows @ 0x46d3ae
// > GJBaseGameLayer::updateOBB2 @ 0x46e9d6
// > GJBaseGameLayer::preUpdateVisibility @ 0x488ff4
// > GJBaseGameLayer::preUpdateVisibility @ 0x48905a
//
// 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
//
void OBB2D::calculateWithCenter(OBB2D *a1, cocos2d::CCPoint a2, float a3, float x, float a5)
{
float v6; // r10
float y; // s18
float v9; // r4
float v10; // r5
cocos2d::CCPoint v11; // [sp+4h] [bp-24h] BYREF
cocos2d::CCPoint v12; // [sp+Ch] [bp-1Ch] BYREF
_BYTE v13[8]; // [sp+14h] [bp-14h] BYREF
_BYTE v14[8]; // [sp+1Ch] [bp-Ch] BYREF
v6 = a2.x;
y = a2.y;
cocos2d::CCPoint::operator=(&a1->m_center, LODWORD(a2.x));
v9 = cosf(x);
v10 = sinf(x);
cocos2d::CCPoint::CCPoint(&v11, v9, v10);
cocos2d::CCPoint::CCPoint(&v12, COERCE_FLOAT(LODWORD(v10) ^ 0x80000000), v9);
cocos2d::CCPoint::operator*(v14, &v11, y * 0.5);
cocos2d::CCPoint::operator=(&v11, v14);
cocos2d::CCPoint::operator*(v14, &v12, a3 * 0.5);
cocos2d::CCPoint::operator=(&v12, v14);
cocos2d::CCPoint::operator-(v13, LODWORD(v6), &v11);
cocos2d::CCPoint::operator-(v14, v13, &v12);
cocos2d::CCPoint::operator=(&a1->m_corners, v14);
cocos2d::CCPoint::operator+(v13, LODWORD(v6), &v11);
cocos2d::CCPoint::operator-(v14, v13, &v12);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[1], v14);
cocos2d::CCPoint::operator+(v13, LODWORD(v6), &v11);
cocos2d::CCPoint::operator+(v14, v13, &v12);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[2], v14);
cocos2d::CCPoint::operator-(v13, LODWORD(v6), &v11);
cocos2d::CCPoint::operator+(v14, v13, &v12);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[3], v14);
OBB2D::computeAxes(a1);
OBB2D::orderCorners(a1);
}