//
// GJBaseGameLayer::getPortalTargetPos from 0x8588f0 to 0x8589ac (188 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x889c80
// > ??> @ 0x511b0
//
// 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
//
cocos2d::CCPoint GJBaseGameLayer::getPortalTargetPos(
GJBaseGameLayer *a1,
TeleportPortalObject *a2,
GameObject *a3,
PlayerObject *a4)
{
cocos2d::CCPoint *v4; // x8
cocos2d::CCPoint *v5; // x20
float x; // [xsp+20h] [xbp+20h]
__int64 v10; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v11; // 0:kr00_8.8
cocos2d::CCPoint result; // 0:s0.4,4:s1.4
v5 = v4;
if ( !a3 || a2->m_objectID == 747 )
{
x = a4->getPosition(a4)->x;
((void (__fastcall *)(__int64 *__return_ptr, TeleportPortalObject *))a2->getRealPosition)(&v10, a2);
cocos2d::CCPoint::CCPoint(v5, x, *((float *)&v10 + 1) + a2->m_teleportYOffset);
}
else
{
v11 = a3->getRealPosition(a3);
result.x = v11.x;
result.y = v11.y;
}
return result;
}