//
// GJBaseGameLayer::positionForShaderTarget from 0x10028d59c to 0x10028d664 (200 bytes)
//
// 7 xrefs:
// > GJBaseGameLayer::updateShaderLayer @ 0x10028ce34
// > GJBaseGameLayer::updateShaderLayer @ 0x10028ce68
// > GJBaseGameLayer::updateShaderLayer @ 0x10028ce94
// > GJBaseGameLayer::updateShaderLayer @ 0x10028ceb4
// > GJBaseGameLayer::updateShaderLayer @ 0x10028ced8
// > GJBaseGameLayer::updateShaderLayer @ 0x10028cefc
// > GJBaseGameLayer::updateShaderLayer @ 0x10028cf24
//
// 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 11:02:01 +0000
//
double __usercall GJBaseGameLayer::positionForShaderTarget@(__int64 a1@, __int64 a2@, _QWORD *a3@)
{
__int64 v6; // x0
double *v7; // x0
__int64 MainObject; // x0
__int64 v10; // [xsp+8h] [xbp-28h] BYREF
sub_1000262EC(a3);
if ( (_DWORD)a2 == -1 )
goto LABEL_5;
if ( (_DWORD)a2 == -2 )
{
if ( (*(_BYTE *)(a1 + 1010) & 1) != 0 )
{
v6 = *(_QWORD *)(a1 + 3264);
LABEL_6:
v7 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
return sub_10002630C(a3, v7);
}
LABEL_5:
v6 = *(_QWORD *)(a1 + 3256);
goto LABEL_6;
}
MainObject = GJBaseGameLayer::tryGetMainObject(a1, a2);
if ( MainObject )
(*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)MainObject + 1360LL))(&v10);
else
sub_1000262F4(&v10, (double *)&qword_1009F5820);
return sub_10002630C(a3, (double *)&v10);
}