//
// GameObject::getBoxOffset from 0x356ec4 to 0x356f7a (182 bytes)
//
// 3 xrefs:
// > GameObject::getObjectRect @ 0x356ffc
// > GameObject::updateOrientedBox @ 0x3570ae
// > GameObject::updateOrientedBox @ 0x357138
//
// 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
//
const cocos2d::CCPoint *GameObject::getBoxOffset(GameObject *a1)
{
cocos2d::CCPoint *p_m_customBoxOffset; // r5
cocos2d::CCNode *m_pParent; // r1
int v5; // r2
bool v6; // r3
int v7; // r2
bool v8; // r3
int v9; // r2
cocos2d::CCPoint v10; // [sp+4h] [bp-20h] BYREF
cocos2d::CCPoint v11; // [sp+Ch] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+14h] [bp-10h] BYREF
p_m_customBoxOffset = &a1->m_customBoxOffset;
if ( cocos2d::CCPoint::equals(&a1->m_customBoxOffset, &stru_AC5CA0) )
return p_m_customBoxOffset;
if ( GameManager::sharedState()->m_editorEnabled || a1->m_boxOffsetCalculated )
{
cocos2d::CCNode::convertToWorldSpace(&v10, a1, p_m_customBoxOffset);
cocos2d::CCNode::convertToWorldSpace(&v11, a1, &stru_AC5CA0);
m_pParent = a1->m_pParent;
if ( m_pParent )
{
cocos2d::CCNode::convertToNodeSpace(&v12, m_pParent, &v10);
cocos2d::CCPoint::operator=((PlayerObject *)&v10, COERCE_FLOAT(&v12), v5, v6);
cocos2d::CCNode::convertToNodeSpace(&v12, a1->m_pParent, &v11);
cocos2d::CCPoint::operator=((PlayerObject *)&v11, COERCE_FLOAT(&v12), v7, v8);
}
cocos2d::CCPoint::operator-(&v12, &v10, &v11);
a1->m_boxOffsetCalculated = 0;
cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_boxOffset, COERCE_FLOAT(&v12), v9, 0);
}
return &a1->m_boxOffset;
}