//
// OBB2D::calculateWithCenter from 0x58d670 to 0x58d83c (460 bytes)
//
// 8 xrefs:
// > OBB2D::init @ 0x58d8b4
// > GameObject::updateOrientedBox @ 0x6480b0
// > LevelEditorLayer::getObjectRect @ 0x65d4f8
// > GJBaseGameLayer::updateGroundShadows @ 0x85752c
// > GJBaseGameLayer::updateOBB2 @ 0x859418
// > GJBaseGameLayer::preUpdateVisibility @ 0x881bd4
// > GJBaseGameLayer::preUpdateVisibility @ 0x881c38
// > ??> @ 0xace78
//
// 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 a4, float a5)
{
__int64 v5; // x1
float y; // s11
__int64 v9; // x25
float x; // s12
float v11; // s10
float v12; // s9
float v13; // s0
float v14; // s1
float v15; // s0
float v16; // s1
float v17; // s0
float v18; // s1
float v19; // s0
float v20; // s1
float v21; // s0
float v22; // s1
float v23; // s0
float v24; // s1
cocos2d::CCPoint v25; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCPoint v26; // [xsp+80h] [xbp+80h] BYREF
__int64 v27; // [xsp+88h] [xbp+88h] BYREF
__int64 v28; // [xsp+90h] [xbp+90h] BYREF
y = a2.y;
v9 = v5;
x = a2.x;
cocos2d::CCPoint::operator=(&a1->m_center, a2.x, a2.y);
v11 = cosf(a3);
v12 = sinf(a3);
cocos2d::CCPoint::CCPoint(&v25, v11, v12);
cocos2d::CCPoint::CCPoint(&v26, -v12, v11);
cocos2d::CCPoint::operator*(&v25, x * 0.5);
cocos2d::CCPoint::operator=(&v25, v13, v14);
cocos2d::CCPoint::operator*(&v26, y * 0.5);
cocos2d::CCPoint::operator=(&v26, v15, v16);
cocos2d::CCPoint::operator-(&v27, v9, &v25);
cocos2d::CCPoint::operator-(&v28, &v27, &v26);
cocos2d::CCPoint::operator=(&a1->m_corners, v17, v18);
cocos2d::CCPoint::operator+(&v27, v9, &v25);
cocos2d::CCPoint::operator-(&v28, &v27, &v26);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[1], v19, v20);
cocos2d::CCPoint::operator+(&v27, v9, &v25);
cocos2d::CCPoint::operator+(&v28, &v27, &v26);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[2], v21, v22);
cocos2d::CCPoint::operator-(&v27, v9, &v25);
cocos2d::CCPoint::operator+(&v28, &v27, &v26);
cocos2d::CCPoint::operator=(&a1->m_corners.__elems_[3], v23, v24);
OBB2D::computeAxes(a1);
OBB2D::orderCorners(a1);
}