//
// SetupCameraOffsetTrigger::onTargetMode from 0x1405ae940 to 0x1405aea19 (217 bytes)
//
// 3 xrefs:
// > SetupCameraOffsetTrigger::init @ 0x1405ad92d
// > SetupCameraOffsetTrigger::init @ 0x1405ada26
// > ??> @ 0x14092d974
//
// This function is hookable on this platform (idp: pc, 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:34:41 +0000
//
__int64 __fastcall SetupCameraOffsetTrigger::onTargetMode(__int64 a1, __int64 a2)
{
__int64 v4; // rdx
unsigned int v5; // edi
int v6; // eax
__int64 v7; // rcx
cocos2d::CCArray *v8; // rcx
struct cocos2d::CCObject *v9; // rax
__int64 v10; // rdx
v5 = 0;
if ( *(_DWORD *)(a1 + 1096) == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) )
v6 = 0;
else
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
*(_DWORD *)(a1 + 1096) = v6;
v7 = *(_QWORD *)(a1 + 680);
if ( v7 )
{
*(_DWORD *)(v7 + 1528) = v6;
}
else
{
v8 = *(cocos2d::CCArray **)(a1 + 688);
if ( v8 && cocos2d::CCArray::count(v8) )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 688), v5++);
*((_DWORD *)v9 + 382) = *(_DWORD *)(a1 + 1096);
}
while ( v5 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688)) );
}
}
LOBYTE(v4) = *(_DWORD *)(a1 + 1096) == 1;
CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1104), v4);
LOBYTE(v10) = *(_DWORD *)(a1 + 1096) == 2;
return CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1112), v10);
}