//
// EditorUI::editHSV from 0x484154 to 0x484262 (270 bytes)
//
// 2 xrefs:
// > EditorUI::onEditColor @ 0x48428a
// > EditorUI::checkLiveColorSelect @ 0x6f4464
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:24 +0000
//
int __fastcall EditorUI::editHSV(GameObject **this)
{
int v2; // r1
GameObject *v3; // r0
int v4; // r8
int SelectedObjects; // r0
int v6; // r1
int v7; // r3
_DWORD *v8; // r2
GameObject **v9; // r6
GameObject **v10; // r5
GameObject *v11; // r0
GameObject *v12; // t1
int v13; // r0
int v15; // [sp+0h] [bp-18h]
int v16; // [sp+4h] [bp-14h]
ColorAction *v17; // [sp+8h] [bp-10h] BYREF
ColorAction *v18; // [sp+Ch] [bp-Ch] BYREF
EffectGameObject *v19; // [sp+10h] [bp-8h] BYREF
EditorUI::closeLiveHSVSelect((EditorUI *)this);
EditorUI::closeLiveColorSelect((EditorUI *)this);
v3 = *(this + 249);
if ( v3 )
{
GameObject::deselectObject(v3, v2);
v4 = 0;
}
else
{
SelectedObjects = EditorUI::getSelectedObjects((EditorUI *)this);
v7 = (int)*(this + 167);
v4 = SelectedObjects;
if ( v7 )
{
v8 = *(_DWORD **)(v7 + 52);
if ( *v8 )
{
v9 = (GameObject **)v8[3];
v10 = &v9[*v8] + 0x3FFFFFFF;
while ( v9 <= v10 )
{
v12 = *v9++;
v11 = v12;
if ( !v12 )
break;
GameObject::deselectObject(v11, v6);
}
}
}
}
v17 = nullptr;
v18 = nullptr;
v19 = nullptr;
EditorUI::getEditColorTargets((EditorUI *)this, &v17, &v18, &v19);
if ( v17 )
{
BYTE1(v15) = *((_BYTE *)v17 + 69);
BYTE2(v15) = *((_BYTE *)v17 + 70);
LOBYTE(v15) = *((_BYTE *)v17 + 68);
}
else
{
LOWORD(v15) = -1;
BYTE2(v15) = -1;
}
if ( v18 )
{
BYTE1(v16) = *((_BYTE *)v18 + 69);
BYTE2(v16) = *((_BYTE *)v18 + 70);
LOBYTE(v16) = *((_BYTE *)v18 + 68);
}
else
{
LOWORD(v16) = -1;
BYTE2(v16) = -1;
}
v13 = HSVLiveOverlay::create(*(this + 249), v4, v15, v16);
*(this + 257) = (GameObject *)v13;
*(_DWORD *)(v13 + 540) = this + 80;
*((_DWORD *)*(this + 257) + 113) = this;
return (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 257) + 656))(*(this + 257));
}