//
// ColorAction::setupFromMap from 0x49d930 to 0x49dc76 (838 bytes)
//
// 1 xrefs:
// > ColorAction::setupFromString @ 0x49dd02
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void ColorAction::setupFromMap(ColorAction *a1, std::map *a2)
{
int v4; // r2
const char **v5; // r0
GLubyte v6; // r11
int v7; // r2
const char **v8; // r0
GLubyte v9; // r10
int v10; // r2
const char **v11; // r0
GLubyte v12; // r8
int v13; // r2
const char **v14; // r0
GLubyte v15; // r11
int v16; // r2
const char **v17; // r0
GLubyte v18; // r10
int v19; // r2
const char **v20; // r0
GLubyte v21; // r8
int v22; // r2
const char **v23; // r0
int v24; // r2
const char **v25; // r0
float v26; // s15
int v27; // r2
const char **v28; // r0
int v29; // r2
const char **v30; // r0
int v31; // r2
const char **v32; // r0
int v33; // r2
const char **v34; // r0
int v35; // r8
int v36; // r2
const char **v37; // r0
float v38; // s15
int v39; // r2
const char **v40; // r0
float v41; // s15
int v42; // r2
const char **v43; // r0
int v44; // r2
_DWORD *v45; // r0
float v46; // r1
float v47; // r2
int v48; // r3
int v49; // r2
const char **v50; // r0
float v51; // s15
int v52; // r2
const char **v53; // r0
_DWORD v54[6]; // [sp+0h] [bp-14h] BYREF
int v55; // [sp+18h] [bp+4h] BYREF
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[1]);
v5 = (const char **)std::map::operator[](a2, &v55, v4);
v6 = atoi(*v5);
sub_774008(&v55);
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[3]);
v8 = (const char **)std::map::operator[](a2, &v55, v7);
v9 = atoi(*v8);
sub_774008(&v55);
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[5]);
v11 = (const char **)std::map::operator[](a2, &v55, v10);
v12 = atoi(*v11);
sub_774008(&v55);
a1->m_fromColor.r = v6;
a1->m_fromColor.g = v9;
a1->m_fromColor.b = v12;
sub_776584((int)&v55, "11");
v14 = (const char **)std::map::operator[](a2, &v55, v13);
v15 = atoi(*v14);
sub_774008(&v55);
sub_776584((int)&v55, "12");
v17 = (const char **)std::map::operator[](a2, &v55, v16);
v18 = atoi(*v17);
sub_774008(&v55);
sub_776584((int)&v55, "13");
v20 = (const char **)std::map::operator[](a2, &v55, v19);
v21 = atoi(*v20);
sub_774008(&v55);
a1->m_toColor.r = v15;
a1->m_toColor.g = v18;
a1->m_toColor.b = v21;
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[7]);
v23 = (const char **)std::map::operator[](a2, &v55, v22);
a1->m_playerColor = atoi(*v23);
sub_774008(&v55);
sub_776584((int)&v55, "16");
v25 = (const char **)std::map::operator[](a2, &v55, v24);
v26 = atof(*v25);
a1->m_duration = v26;
sub_774008(&v55);
if ( !a1->m_colorID )
{
sub_776584((int)&v55, "6");
v28 = (const char **)std::map::operator[](a2, &v55, v27);
a1->m_colorID = atoi(*v28);
sub_774008(&v55);
}
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[8]);
v30 = (const char **)std::map::operator[](a2, &v55, v29);
a1->m_blending = atof(*v30) != 0.0;
sub_774008(&v55);
sub_776584((int)&v55, "17");
v32 = (const char **)std::map::operator[](a2, &v55, v31);
a1->m_copyOpacity = atoi(*v32) != 0;
sub_774008(&v55);
a1->m_fromOpacity = 1.0;
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[12]);
v34 = (const char **)std::map::operator[](a2, &v55, v33);
v35 = atoi(*v34);
sub_774008(&v55);
if ( v35 > 0 )
{
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[10]);
v37 = (const char **)std::map::operator[](a2, &v55, v36);
v38 = atof(*v37);
a1->m_fromOpacity = v38;
sub_774008(&v55);
}
sub_776584((int)&v55, "15");
v40 = (const char **)std::map::operator[](a2, &v55, v39);
v41 = atof(*v40);
a1->m_toOpacity = v41;
sub_774008(&v55);
sub_776584((int)&v55, (char *)&aO1i2r3e45s7t89[13]);
v43 = (const char **)std::map::operator[](a2, &v55, v42);
a1->m_copyID = atoi(*v43);
sub_774008(&v55);
sub_776584((int)&v55, "10");
v45 = (_DWORD *)std::map::operator[](a2, &v55, v44);
GameToolbox::hsvFromString((int)v54, v45, "a");
v46 = *(float *)&v54[1];
v47 = *(float *)&v54[2];
v48 = v54[3];
LODWORD(a1->m_copyHSV.h) = v54[0];
a1->m_copyHSV.s = v46;
a1->m_copyHSV.v = v47;
*(_DWORD *)&a1->m_copyHSV.absoluteSaturation = v48;
sub_774008(&v55);
sub_776584((int)&v55, "14");
v50 = (const char **)std::map::operator[](a2, &v55, v49);
v51 = atof(*v50);
a1->m_deltaTime = v51;
sub_774008(&v55);
sub_776584((int)&v55, "19");
v53 = (const char **)std::map::operator[](a2, &v55, v52);
a1->m_paused = atoi(*v53) != 0;
sub_774008(&v55);
}