//
// GameObject::updateOrientedBox from 0x647fdc to 0x648188 (428 bytes)
//
// 48 xrefs:
// > ??> @ 0x99f18
// > ??> @ 0x1152cf0
// > ??> @ 0x1153ac0
// > ??> @ 0x1154290
// > ??> @ 0x1154a90
// > ??> @ 0x1162440
// > ??> @ 0x1162c40
// > ??> @ 0x1163440
// > ??> @ 0x1163c40
// > ??> @ 0x1164440
// > ??> @ 0x1164c40
// > ??> @ 0x1165440
// > ??> @ 0x1165c40
// > ??> @ 0x1166410
// > ??> @ 0x1166c10
// > ??> @ 0x1167410
// > ??> @ 0x1167c10
// > ??> @ 0x1168410
// > ??> @ 0x1168c50
// > ??> @ 0x1169450
// > ??> @ 0x1169c50
// > ??> @ 0x116a450
// > ??> @ 0x116ac50
// > ??> @ 0x116b460
// > ??> @ 0x116bc60
// > ??> @ 0x116c460
// > ??> @ 0x116cc60
// > ??> @ 0x116d460
// > ??> @ 0x116dc60
// > ??> @ 0x116e460
// > ??> @ 0x116ec60
// > ??> @ 0x116f460
// > ??> @ 0x116fc60
// > ??> @ 0x1170460
// > ??> @ 0x1170c60
// > ??> @ 0x1171460
// > ??> @ 0x1171c60
// > ??> @ 0x1172460
// > ??> @ 0x1172c60
// > ??> @ 0x1173460
// > ??> @ 0x1173c60
// > ??> @ 0x1174460
// > ??> @ 0x1174c60
// > ??> @ 0x1175460
// > ??> @ 0x1175c60
// > ??> @ 0x1176460
// > ??> @ 0x1176c60
// > ??> @ 0x1177480
//
// 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 GameObject::updateOrientedBox(GameObject *a1)
{
const cocos2d::CCPoint *BoxOffset; // x0
OBB2D *m_orientedBox; // x23
float v4; // s8
float v5; // s3
float v6; // s4
const cocos2d::CCPoint *v7; // x0
float v8; // s8
float v9; // s3
float v10; // s4
OBB2D *v11; // x0
float v12; // [xsp+40h] [xbp+40h]
float v13; // [xsp+40h] [xbp+40h]
cocos2d::CCPoint v14; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v15; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v16; // 0:s0.4,4:s1.4
cocos2d::CCPoint v17; // 0:s0.4,4:s1.4
if ( a1->m_orientedBox )
{
if ( a1->m_isOrientedBoxDirty )
{
a1->getRealPosition((GameObject *)&v15);
BoxOffset = GameObject::getBoxOffset(a1);
cocos2d::CCPoint::operator+(&v14, &v15, BoxOffset);
m_orientedBox = a1->m_orientedBox;
cocos2d::CCPoint::CCPoint(&v15, &v14);
v4 = (float)(a1->m_width * a1->m_spriteWidthScale) * a1->m_scaleX;
v12 = (float)(a1->m_height * a1->m_spriteHeightScale) * a1->m_scaleY;
v5 = -a1->getObjectRotation(a1);
v16.y = v12;
v16.x = v4;
OBB2D::calculateWithCenter(m_orientedBox, v16, v5 * 0.017453, v5, v6);
a1->m_isOrientedBoxDirty = 0;
}
}
else
{
a1->getRealPosition((GameObject *)&v15);
v7 = GameObject::getBoxOffset(a1);
cocos2d::CCPoint::operator+(&v14, &v15, v7);
cocos2d::CCPoint::CCPoint(&v15, &v14);
v8 = (float)(a1->m_width * a1->m_spriteWidthScale) * a1->m_scaleX;
v13 = (float)(a1->m_height * a1->m_spriteHeightScale) * a1->m_scaleY;
v9 = -a1->getObjectRotation(a1);
v17.y = v13;
v17.x = v8;
v11 = OBB2D::create(v17, v9 * 0.017453, v9, v10);
a1->m_orientedBox = v11;
cocos2d::CCObject::retain(v11);
}
}