//
// HSVLiveOverlay::createHSVWidget from 0xb50798 to 0xb50938 (416 bytes)
//
// 3 xrefs:
// > HSVLiveOverlay::init @ 0xb50b08
// > HSVLiveOverlay::onSelectTab @ 0xb5100c
// > ??> @ 0xa6060
//
// 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:58 +0000
//
__int64 __fastcall HSVLiveOverlay::createHSVWidget(HSVLiveOverlay *this, unsigned int a2)
{
cocos2d::CCArray *v4; // x0
unsigned int v5; // w19
unsigned int v6; // w1
ButtonSprite *v7; // x21
const char *v8; // x1
cocos2d::CCDirector *v9; // x0
cocos2d::CCDirector *v10; // x0
unsigned __int64 HSV; // x0
__int64 v12; // x1
__int64 v13; // x0
__int64 v14; // x21
void (__fastcall *v15)(__int64, _BYTE *); // x19
char *v16; // x1
__int64 v18; // [xsp+68h] [xbp+68h] BYREF
_BYTE v19[8]; // [xsp+70h] [xbp+70h] BYREF
v4 = *((cocos2d::CCArray **)this + 87);
*((_DWORD *)this + 178) = a2;
if ( v4 )
{
v5 = 0;
while ( v5 < (unsigned int)cocos2d::CCArray::count(v4) )
{
v6 = v5++;
v7 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 87), v6);
if ( a2 == (*(unsigned int (__fastcall **)(ButtonSprite *))(*(_QWORD *)v7 + 64LL))(v7) )
v8 = "GJ_button_01.png";
else
v8 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v7, v8);
v4 = *((cocos2d::CCArray **)this + 87);
}
}
v9 = *((cocos2d::CCDirector **)this + 90);
if ( v9 )
{
v9 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(cocos2d::CCDirector *))(*(_QWORD *)v9 + 536LL))(v9);
*((_QWORD *)this + 90) = 0;
}
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(&v18, v10);
HSV = ConfigureHSVWidget::getHSV(
*((ConfigureHSVWidget **)this + 84),
*((GameObject **)this + 85),
(cocos2d::CCArray *)a2);
v13 = ConfigureHSVWidget::create(HSV, v12, 0, 0);
*((_QWORD *)this + 90) = v13;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v13 + 72LL))(v13, a2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 90));
v14 = *((_QWORD *)this + 90);
v15 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, 157.0, 163.0);
v15(v14, v19);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 90) + 160LL))(*((_QWORD *)this + 90), 0.6);
v16 = (char *)this + 731;
if ( a2 != 1 )
v16 = (char *)this + 734;
*(_QWORD *)(*((_QWORD *)this + 90) + 400LL) = (char *)this + 664;
ConfigureHSVWidget::setBaseColor(*((_QWORD *)this + 90), *(_QWORD *)v16);
return _stack_chk_guard;
}