//
// TeleportPortalObject::setStartPos from 0x760fec to 0x7610e4 (248 bytes)
//
// 2 xrefs:
// > ??> @ 0x96ed0
// > ??> @ 0x116ab88
//
// 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 TeleportPortalObject::setStartPos(TeleportPortalObject *a1, cocos2d::CCPoint a2)
{
const cocos2d::CCPoint *v2; // x1
float x; // s8
float TeleportXOff; // s0
TeleportPortalObject *m_orangePortal; // x19
__int64 v7; // x0
float v8; // [xsp+40h] [xbp+40h]
cocos2d::CCPoint v9; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v10; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v11; // 0:s0.4,4:s1.4
cocos2d::CCPoint v12; // 0:s0.4,4:s1.4
cocos2d::CCPoint::CCPoint(&v9, v2);
if ( a1->m_isYellowPortal )
{
((void (__fastcall *)(cocos2d::CCPoint *__return_ptr, TeleportPortalObject *))a1->getStartPos)(&v10, a1);
v9.x = v10.x;
}
cocos2d::CCPoint::CCPoint(&v10, &v9);
GameObject::setStartPos(a1, v11);
if ( a1->m_orangePortal )
{
x = v9.x;
TeleportXOff = TeleportPortalObject::getTeleportXOff(a1, nullptr);
m_orangePortal = a1->m_orangePortal;
v8 = x + TeleportXOff;
v7 = (__int64)m_orangePortal->getPosition(m_orangePortal);
cocos2d::CCPoint::CCPoint(&v10, v8, *(float *)(v7 + 4));
TeleportPortalObject::setStartPosOverride(m_orangePortal, v12);
}
}