//
// HSVLiveOverlay::init from 0x100254a10 to 0x100254e1d (1037 bytes)
//
// 1 xrefs:
// > HSVLiveOverlay::create @ 0x1002549b2
//
// 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:27:25 +0000
//
__int64 __fastcall HSVLiveOverlay::init(__int64 a1, __int64 a2, __int64 a3, int a4, int a5)
{
__int64 v8; // r14
__int64 v9; // rbx
__int64 result; // rax
__int64 v11; // rax
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // r14
int v15; // eax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
__int64 v20; // rax
__int64 v21; // r14
__int64 v22; // rsi
__int64 v23; // rax
char *v24; // r13
__int64 v25; // r14
char *v26; // r13
__int64 v27; // r15
__int64 v28; // r14
_BYTE v29[8]; // [rsp+0h] [rbp-70h] BYREF
_BYTE v30[8]; // [rsp+8h] [rbp-68h] BYREF
_BYTE v31[8]; // [rsp+10h] [rbp-60h] BYREF
_BYTE v32[8]; // [rsp+18h] [rbp-58h] BYREF
__int64 v33; // [rsp+20h] [rbp-50h]
__int64 v34; // [rsp+28h] [rbp-48h]
_BYTE v35[8]; // [rsp+34h] [rbp-3Ch] BYREF
_BYTE v36[11]; // [rsp+3Ch] [rbp-34h] BYREF
unsigned __int8 v37; // [rsp+47h] [rbp-29h]
v8 = a2;
v9 = a1;
result = FLAlertLayer::init_1(a1, 0);
if ( (_BYTE)result )
{
v37 = result;
*(_WORD *)(a1 + 731) = a4;
*(_BYTE *)(a1 + 733) = BYTE2(a4);
*(_WORD *)(a1 + 734) = a5;
*(_BYTE *)(a1 + 736) = BYTE2(a5);
v11 = 672;
if ( a2 || (v11 = 680, (v8 = a3) != 0) )
{
*(_QWORD *)(a1 + v11) = v8;
a1 = v8;
cocos2d::CCObject::retain(v8);
}
*(_BYTE *)(v9 + 596) = 1;
v12 = cocos2d::CCDirector::sharedDirector(a1, 0);
cocos2d::CCDirector::getWinSize(v29, v12);
v13 = sub_1007FE900(v29);
*(_QWORD *)(v9 + 688) = v13;
cocos2d::CCObject::retain(v13);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 1000LL))(v9, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 1072LL))(v9, 0);
v14 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.5);
v15 = CCMenuItemSpriteExtra::create(v14, 0, v9, HSVLiveOverlay::closeColorSelect, 0);
v20 = sub_1008735E0(v15, 0, v16, v17, v18, v19);
*(_QWORD *)(v9 + 552) = v20;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v9 + 584) + 464LL))(*(_QWORD *)(v9 + 584), v20, 10);
v21 = *(_QWORD *)(v9 + 552);
sub_100278250(v36, 157.0, 163.0);
sub_100278250(v31, -81.0, 48.0);
sub_100278350(v35, v36, v31);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v21 + 184LL))(v21, v35);
HSVLiveOverlay::determineStartValues(v9);
v22 = 2;
if ( *(_BYTE *)(v9 + 728) == 1 )
{
if ( *(_BYTE *)(v9 + 729) != 1 )
goto LABEL_8;
v23 = sub_1007FE900(v9);
*(_QWORD *)(v9 + 696) = v23;
cocos2d::CCObject::retain(v23);
v24 = ButtonSprite::create_1(
(__int64)"1",
0x14u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.5,
30.0);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v24 + 160LL))(v24, 0.60000002);
v25 = CCMenuItemSpriteExtra::create(v24, 0, v9, HSVLiveOverlay::onSelectTab, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v9 + 552) + 456LL))(*(_QWORD *)(v9 + 552), v25);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v25 + 72LL))(v25, 1);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v24 + 72LL))(v24, 1);
sub_1007FEBF0(*(_QWORD *)(v9 + 696), v24);
v26 = ButtonSprite::create_1(
(__int64)"2",
0x14u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
30.0);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v26 + 160LL))(v26, 0.60000002);
v27 = CCMenuItemSpriteExtra::create(v26, 0, v9, HSVLiveOverlay::onSelectTab, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v9 + 552) + 456LL))(*(_QWORD *)(v9 + 552), v27);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v27 + 72LL))(v27, 2);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v26 + 72LL))(v26, 2);
sub_1007FEBF0(*(_QWORD *)(v9 + 696), v26);
v33 = *(_QWORD *)(v9 + 552);
v34 = *(_QWORD *)(v9 + 584);
sub_100278250(v32, 157.0, 163.0);
sub_100278250(v30, 97.0, 36.0);
sub_100278350(v31, v32, v30);
cocos2d::CCNode::convertToWorldSpace(v36, v34, v31);
cocos2d::CCNode::convertToNodeSpace(v35, v33, v36);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v25 + 184LL))(v25, v35);
v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 192LL))(v25);
sub_100278250(v36, 0.0, -24.0);
sub_100278350(v35, v28, v36);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v27 + 184LL))(v27, v35);
v22 = 2;
if ( (*(_BYTE *)(v9 + 728) & 1) != 0 )
LABEL_8:
v22 = 1;
}
HSVLiveOverlay::createHSVWidget(v9, v22);
return v37;
}
return result;
}