//
// CreateParticlePopup::onSelectColor from 0xafc3f8 to 0xafc514 (284 bytes)
//
// 5 xrefs:
// > ??> @ 0x86b60
// > CreateParticlePopup::init @ 0xb02010
// > CreateParticlePopup::init @ 0xb029e8
// > CreateParticlePopup::init @ 0xb02ad4
// > ??> @ 0x1543898
//
// 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 13:01:18 +0000
//
__int64 __fastcall CreateParticlePopup::onSelectColor(CreateParticlePopup *this, cocos2d::CCObject *a2)
{
int v4; // w0
_QWORD *v5; // x19
cocos2d::CCObject *v6; // x0
__int64 (__fastcall *v7)(cocos2d::CCObject *); // x1
void (__fastcall *v8)(_QWORD *, _QWORD); // x20
unsigned int v9; // w0
__int64 v11; // x0
__int64 (*v12)(void); // x1
float *v13; // x0
ColorAction *v14; // [xsp+38h] [xbp+38h]
v4 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
switch ( v4 )
{
case 0:
v11 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 99) + 1200LL))(*((_QWORD *)this + 99));
LOWORD(v14) = *(_WORD *)v11;
BYTE2(v14) = *(_BYTE *)(v11 + 2);
break;
case 1:
v12 = *(__int64 (**)(void))(**((_QWORD **)this + 89) + 1352LL);
goto LABEL_7;
case 2:
v12 = *(__int64 (**)(void))(**((_QWORD **)this + 89) + 1384LL);
LABEL_7:
v13 = (float *)v12();
BYTE1(v14) = (unsigned int)(float)(v13[1] * 255.0);
BYTE2(v14) = (unsigned int)(float)(v13[2] * 255.0);
LOBYTE(v14) = (unsigned int)(float)(*v13 * 255.0);
break;
}
v5 = (_QWORD *)ColorSelectPopup::create(v14);
v6 = a2;
v7 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL);
v8 = *(void (__fastcall **)(_QWORD *, _QWORD))(*v5 + 72LL);
v9 = v7(v6);
v8(v5, v9);
v5[140] = (char *)this + 664;
return (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 1312LL))(v5);
}