//
// LevelEditorLayer::updateColor from 0x1402dda10 to 0x1402ddb7b (363 bytes)
//
// 2 xrefs:
// > ??> @ 0x140586348
// > ??> @ 0x1406d332c
//
// 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 LevelEditorLayer::updateColor(
LevelEditorLayer *a1,
cocos2d::ccColor3B *a2,
float a3,
int a4,
bool a5,
float a6,
cocos2d::ccHSVValue *a7,
int a8,
bool a9,
EffectGameObject *a10,
int a11,
int a12)
{
int v12; // edi
PlayerObject *m_player1; // rax
__int16 v16; // cx
GLubyte b; // dl
PlayerObject *v18; // rax
std::_Vector_val>::pointer Myfirst; // r11
char v20; // r9
unsigned __int64 v21; // r8
std::_Simple_types::value_type v22; // edx
int v23; // edx
std::_Vector_val>::pointer v24; // rcx
int v25; // eax
v12 = a4;
if ( a4 < 0 )
v12 = 0;
if ( v12 > 1101 )
v12 = 1101;
if ( a10 )
{
if ( a10->m_usesPlayerColor1 )
{
m_player1 = a1->m_player1;
v16 = *(_WORD *)&m_player1->m_playerColor1.r;
b = m_player1->m_playerColor1.b;
}
else
{
if ( !a10->m_usesPlayerColor2 )
goto LABEL_11;
v18 = a1->m_player1;
v16 = *(_WORD *)&v18->m_playerColor2.r;
b = v18->m_playerColor2.b;
}
*(_WORD *)&a2->r = v16;
a2->b = b;
}
LABEL_11:
GJBaseGameLayer::updateColor(a1, a2, a3, v12, a5, a6, a7, a8, a9, a10, a11, a12);
if ( a1->m_playbackMode )
{
Myfirst = a1->m_blendingColors._Myvec._Mypair._Myval2._Myfirst;
v20 = v12 & 0x1F;
v21 = (unsigned __int64)v12 >> 5;
v22 = Myfirst[v21];
if ( a5 == (((1 << (v12 & 0x1F)) & v22) != 0) )
{
v24 = a1->m_blendingColors2._Myvec._Mypair._Myval2._Myfirst;
v25 = v24[v21] & ~(1 << v20);
}
else
{
if ( a5 )
v23 = v22 | (1 << v20);
else
v23 = v22 & ~(1 << v20);
Myfirst[v21] = v23;
v24 = a1->m_blendingColors2._Myvec._Mypair._Myval2._Myfirst;
v25 = v24[v21] | (1 << v20);
}
v24[v21] = v25;
}
}