//
// GJBaseGameLayer::getCameraEdgeValue from 0x9a85f4 to 0x9a8750 (348 bytes)
//
// 7 xrefs:
// > GJBaseGameLayer::updateCamera @ 0x9e3988
// > GJBaseGameLayer::updateCamera @ 0x9e39a4
// > GJBaseGameLayer::updateCamera @ 0x9e39c0
// > GJBaseGameLayer::updateCamera @ 0x9e39d0
// > GJBaseGameLayer::updateCamera @ 0x9e39e4
// > GJBaseGameLayer::updateCamera @ 0x9e3f9c
// > ??> @ 0x95770
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:58:11 +0000
//
__int64 __fastcall GJBaseGameLayer::getCameraEdgeValue(GJBaseGameLayer *this, int a2)
{
__int64 MainObject; // x0
int v4; // w23
int v6; // w23
int v7; // [xsp+58h] [xbp+58h] BYREF
__int64 v8; // [xsp+60h] [xbp+60h] BYREF
switch ( a2 )
{
case 1:
v6 = *((_DWORD *)this + 264);
goto LABEL_9;
case 2:
v6 = *((_DWORD *)this + 265);
LABEL_9:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v7, (const cocos2d::CCPoint *)&unk_155D2C8);
MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)this, v6);
if ( !MainObject )
return _stack_chk_guard;
goto LABEL_3;
case 3:
v4 = *((_DWORD *)this + 266);
goto LABEL_6;
case 4:
v4 = *((_DWORD *)this + 267);
LABEL_6:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v7, (const cocos2d::CCPoint *)&unk_155D2C8);
MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)this, v4);
if ( !MainObject )
return _stack_chk_guard;
goto LABEL_3;
default:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v7, (const cocos2d::CCPoint *)&unk_155D2C8);
MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)this, 0);
if ( MainObject )
{
LABEL_3:
(*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)MainObject + 1360LL))(&v8);
cocos2d::CCPoint::operator=(&v7, &v8);
}
return _stack_chk_guard;
}
}