//
// GameObject::updateOrientedBox from 0x100261924 to 0x100261a94 (368 bytes)
//
// 47 xrefs:
// > ??> @ 0x1007c41c8
// > ??> @ 0x1007cfe98
// > ??> @ 0x1007d0680
// > ??> @ 0x1007d0e90
// > ??> @ 0x1007f5700
// > ??> @ 0x1007f5f38
// > ??> @ 0x1007f6730
// > ??> @ 0x1007f6f28
// > ??> @ 0x1007f7720
// > ??> @ 0x1007f7f18
// > ??> @ 0x1007f8710
// > ??> @ 0x1007f8f08
// > ??> @ 0x1007f96f0
// > ??> @ 0x1007f9f00
// > ??> @ 0x1007fa768
// > ??> @ 0x1007faf78
// > ??> @ 0x1007fb788
// > ??> @ 0x1007fbf98
// > ??> @ 0x1007fc7a8
// > ??> @ 0x1007fcfb8
// > ??> @ 0x1007fd7c8
// > ??> @ 0x1007fdfd8
// > ??> @ 0x1007fe7e8
// > ??> @ 0x1007feff8
// > ??> @ 0x1007ff820
// > ??> @ 0x100800078
// > ??> @ 0x1008008a0
// > ??> @ 0x1008010c8
// > ??> @ 0x1008018f0
// > ??> @ 0x100802118
// > ??> @ 0x100802928
// > ??> @ 0x100803138
// > ??> @ 0x100803948
// > ??> @ 0x100804158
// > ??> @ 0x100804968
// > ??> @ 0x100805178
// > ??> @ 0x100805988
// > ??> @ 0x100806198
// > ??> @ 0x1008069a8
// > ??> @ 0x1008071b8
// > ??> @ 0x1008079c8
// > ??> @ 0x1008081d8
// > ??> @ 0x1008089e8
// > ??> @ 0x1008091f8
// > ??> @ 0x100809a08
// > ??> @ 0x10080a218
// > ??> @ 0x100816538
//
// 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 __fastcall GameObject::updateOrientedBox(GameObject *a1)
{
float32x2_t *BoxOffset; // x0
OBB2D *m_orientedBox; // x20
float v4; // s8
float v5; // s9
float v6; // s2
float v7; // s3
float v8; // s4
float32x2_t *v9; // x0
float v10; // s8
float v11; // s9
float v12; // s2
float v13; // s3
float v14; // s4
OBB2D *v15; // x0
float32x2_t v16; // [xsp+0h] [xbp-30h] BYREF
float32x2_t v17; // [xsp+8h] [xbp-28h] BYREF
cocos2d::CCPoint v18; // 0:s0.4,4:s1.4
cocos2d::CCPoint v19; // 0:s0.4,4:s1.4
if ( a1->m_orientedBox )
{
if ( a1->m_isOrientedBoxDirty )
{
((void (__fastcall *)(float32x2_t *__return_ptr, GameObject *))a1->getRealPosition)(&v16, a1);
BoxOffset = (float32x2_t *)GameObject::getBoxOffset(a1);
sub_1000229DC(&v16, BoxOffset, &v17);
m_orientedBox = a1->m_orientedBox;
sub_1000229B8((__int64 *)&v16, (__int64 *)&v17);
v4 = (float)(a1->m_width * a1->m_spriteWidthScale) * a1->m_scaleX;
v5 = (float)(a1->m_height * a1->m_spriteHeightScale) * a1->m_scaleY;
v6 = ((float (__fastcall *)(GameObject *))a1->getObjectRotation)(a1) * -0.017453;
v18.x = v4;
v18.y = v5;
OBB2D::calculateWithCenter(m_orientedBox, v18, v6, v7, v8);
a1->m_isOrientedBoxDirty = 0;
}
}
else
{
((void (__fastcall *)(float32x2_t *__return_ptr, GameObject *))a1->getRealPosition)(&v16, a1);
v9 = (float32x2_t *)GameObject::getBoxOffset(a1);
sub_1000229DC(&v16, v9, &v17);
sub_1000229B8((__int64 *)&v16, (__int64 *)&v17);
v10 = (float)(a1->m_width * a1->m_spriteWidthScale) * a1->m_scaleX;
v11 = (float)(a1->m_height * a1->m_spriteHeightScale) * a1->m_scaleY;
v12 = ((float (__fastcall *)(GameObject *))a1->getObjectRotation)(a1) * -0.017453;
v19.x = v10;
v19.y = v11;
v15 = OBB2D::create(v19, v12, v13, v14);
a1->m_orientedBox = v15;
cocos2d::CCObject::retain(v15);
}
}