//
// GJColorSetupLayer::onColor from 0x1001eefc0 to 0x1001ef076 (182 bytes)
//
// 1 xrefs:
// > GJColorSetupLayer::init @ 0x1001eec09
//
// 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 12:26:32 +0000
//
__int64 __fastcall GJColorSetupLayer::onColor(__int64 a1, __int64 a2, double a3)
{
int v4; // r14d
int v5; // eax
void (__fastcall ***v6)(_QWORD, _QWORD); // rdi
__int64 ColorAction; // rax
__int64 v9; // rax
v4 = *(_DWORD *)(a1 + 720) * *(_DWORD *)(a1 + 724);
v5 = v4 + (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( *(_BYTE *)(a1 + 752) == 1 )
{
*(_DWORD *)(a1 + 768) = v5;
v6 = *(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 760);
if ( v6 )
{
if ( v5 > 0 )
(**v6)(v6, (unsigned int)v5);
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
}
else
{
ColorAction = GJEffectManager::getColorAction(*(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL), (unsigned int)v5);
v9 = ColorSelectPopup::create_3(ColorAction, a3);
*(_QWORD *)(v9 + 1120) = a1 + 664;
*(_DWORD *)(v9 + 592) = 106;
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
}
}