//
// GameToolbox::hsvFromString from 0x3d14c8 to 0x3d15dc (276 bytes)
//
// 6 xrefs:
// > GameObject::objectFromVector @ 0x45c91e
// > GameObject::objectFromVector @ 0x45c982
// > EffectGameObject::customObjectSetup @ 0x4ed1d6
// > EffectGameObject::customObjectSetup @ 0x4ee896
// > EnterEffectObject::customObjectSetup @ 0x4f3f3c
// > ColorAction::setupFromMap @ 0x5ce964
//
// 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:46:41 +0000
//
int __fastcall GameToolbox::hsvFromString(int a1, unsigned __int8 *a2, char *a3)
{
int v4; // r0
int v5; // r3
const char *v6; // r0
float v7; // s18
const char *v8; // r0
float v9; // s17
const char *v10; // r0
double v11; // r0
int v12; // r5
double v13; // d7
const char *v14; // r0
float v15; // s16
int v16; // r0
char v17; // r8
const char *v18; // r0
int v19; // r0
float v20; // r1
float v21; // r2
int v22; // r3
int v24; // [sp+0h] [bp-10h] BYREF
int v25; // [sp+4h] [bp-Ch]
int v26; // [sp+8h] [bp-8h]
v4 = *a2;
if ( (v4 & 1) != 0 )
v5 = *((_DWORD *)a2 + 1);
else
v5 = v4 >> 1;
if ( !v5 )
goto LABEL_25;
v24 = 0;
v25 = 0;
v26 = 0;
sub_3D1370(a2, a3, &v24);
if ( (unsigned int)(-1431655765 * ((v25 - v24) >> 2)) <= 4 )
{
std::__vector_base::~__vector_base((int)&v24);
LABEL_25:
v20 = flt_D2A6C0;
v21 = flt_D2A6C4;
v22 = *(_DWORD *)&word_D2A6C8;
*(float *)a1 = flt_D2A6BC;
*(float *)(a1 + 4) = v20;
*(float *)(a1 + 8) = v21;
*(_DWORD *)(a1 + 12) = v22;
return a1;
}
if ( (*(_BYTE *)v24 & 1) != 0 )
v6 = *(const char **)(v24 + 8);
else
v6 = (const char *)(v24 + 1);
v7 = atof(v6);
if ( (byte_9[v24 + 3] & 1) != 0 )
v8 = *(const char **)(v24 + 20);
else
v8 = (const char *)(v24 + 13);
v9 = atof(v8);
if ( (*((_BYTE *)&dword_18 + v24) & 1) != 0 )
v10 = *(const char **)(v24 + 32);
else
v10 = (const char *)(v24 + 25);
v11 = atof(v10);
v12 = v24;
v13 = v11;
if ( (*((_BYTE *)&dword_24 + v24) & 1) != 0 )
v14 = *(const char **)((char *)&word_2C + v24);
else
v14 = (const char *)(v24 + 37);
v16 = atoi(v14);
v17 = v16;
if ( v16 )
v17 = 1;
if ( (*((_BYTE *)&word_30 + v12) & 1) != 0 )
v18 = *(const char **)((char *)&dword_38 + v12);
else
v18 = (const char *)(v12 + 49);
v19 = atoi(v18);
*(float *)a1 = v7;
*(_BYTE *)(a1 + 12) = v17;
*(float *)(a1 + 4) = v9;
v15 = v13;
*(float *)(a1 + 8) = v15;
*(_BYTE *)(a1 + 13) = v19 != 0;
std::__vector_base::~__vector_base((int)&v24);
return a1;
}