//
// TeleportPortalObject::getTeleportXOff from 0x4e88f8 to 0x4e8998 (160 bytes)
//
// 3 xrefs:
// > PlayLayer::addObject @ 0x4003e4
// > TeleportPortalObject::setStartPos @ 0x4e89f6
// > TeleportPortalObject::setPosition @ 0x4e8a80
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:51:07 +0000
//
int __fastcall TeleportPortalObject::getTeleportXOff(TeleportPortalObject *this, cocos2d::CCNode *a2)
{
const cocos2d::CCPoint *v3; // r5
float v4; // s15
float v6[2]; // [sp+4h] [bp-1Ch] BYREF
float v7[2]; // [sp+Ch] [bp-14h] BYREF
_BYTE v8[8]; // [sp+14h] [bp-Ch] BYREF
v3 = a2;
if ( a2
|| (v3 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(TeleportPortalObject *))(*(_DWORD *)this + 256))(this)) != nullptr )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v8, -10.0, 0.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v6, this);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v8, v3);
cocos2d::CCPoint::operator=(v6, v8);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v7, this);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v8, v3);
cocos2d::CCPoint::operator=(v7, v8);
v4 = -fabsf(v6[0] - v7[0]);
}
else
{
v4 = -10.0;
}
return LODWORD(v4);
}