//
// SetupCameraOffsetTrigger::onEasing from 0x140416e80 to 0x140416f38 (184 bytes)
//
// 5 xrefs:
// > SetupCameraOffsetTrigger::init @ 0x140415e8d
// > SetupCameraOffsetTrigger::init @ 0x140415f4c
// > SetupMGTrigger::init @ 0x140427c7f
// > SetupMGTrigger::init @ 0x140427d42
// > ??> @ 0x1406d8f84
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Merged with: SetupCameraOffsetTrigger::onEasing, SetupMGTrigger::onEasing
__int64 __fastcall SetupCameraOffsetTrigger::onEasing(__int64 a1, __int64 a2)
{
int v3; // eax
int v4; // ecx
int v5; // edx
int v6; // ecx
unsigned int v7; // edi
int v8; // eax
__int64 v9; // rcx
struct cocos2d::CCObject *v10; // rax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = *(_DWORD *)(a1 + 968);
v5 = v4 - 1;
v6 = v4 + 1;
if ( v3 != 1 )
v6 = v5;
v7 = 0;
v8 = 0;
if ( v6 >= 0 )
v8 = v6;
if ( v8 > 18 )
v8 = 18;
v9 = *(_QWORD *)(a1 + 656);
*(_DWORD *)(a1 + 968) = v8;
if ( v9 )
{
*(_DWORD *)(v9 + 1512) = v8;
}
else if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664)) )
{
do
{
v10 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 664), v7++);
LODWORD(v10[27].__vftable) = *(_DWORD *)(a1 + 968);
}
while ( v7 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664)) );
}
SetupCameraOffsetTrigger::updateEasingLabel(a1);
return SetupCameraOffsetTrigger::toggleEasingRateVisibility(a1);
}