//
// GJBaseGameLayer::getCameraEdgeValue from 0x595e28 to 0x595ebc (148 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::updateCamera @ 0x5b6aa2
// > GJBaseGameLayer::updateCamera @ 0x5b6ac0
// > GJBaseGameLayer::updateCamera @ 0x5b6ada
// > GJBaseGameLayer::updateCamera @ 0x5b6b00
// > GJBaseGameLayer::updateCamera @ 0x5b6b1a
//
// 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:53:08 +0000
//
int __fastcall GJBaseGameLayer::getCameraEdgeValue(GJBaseGameLayer *this, int a2)
{
int v2; // r6
int v4; // r4
int MainObject; // r0
int result; // r0
_DWORD v7[2]; // [sp+4h] [bp-14h] BYREF
_BYTE v8[8]; // [sp+Ch] [bp-Ch] BYREF
v2 = a2 - 1;
switch ( a2 )
{
case 1:
v4 = *((_DWORD *)this + 223);
break;
case 2:
v4 = *((_DWORD *)this + 224);
break;
case 3:
v4 = *((_DWORD *)this + 225);
break;
case 4:
v4 = *((_DWORD *)this + 226);
break;
default:
v4 = 0;
break;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v7, (const cocos2d::CCPoint *)&unk_D2C400);
MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)this, v4);
if ( MainObject )
{
(*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)MainObject + 680))(v8, MainObject);
cocos2d::CCPoint::operator=(v7, v8);
}
switch ( v2 )
{
case 0:
case 1:
result = v7[0];
break;
case 2:
case 3:
result = v7[1];
break;
default:
result = 0;
break;
}
return result;
}