//
// LevelEditorLayer::updateColor from 0x65c71c to 0x65c858 (316 bytes)
//
// 2 xrefs:
// > ??> @ 0x37a40
// > ??> @ 0x1155250
//
// 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)
{
_BOOL4 v13; // w21
int v14; // w19
PlayerObject *v15; // x0
GLubyte v16; // w3
GLubyte v17; // w2
std::uintptr_t *m_bitptr; // x4
unsigned __int64 v19; // x2
__int64 v20; // x1
std::uintptr_t v21; // x3
std::uintptr_t *v22; // x5
__int64 v23; // x6
__int64 v24; // x3
PlayerObject *m_player1; // x0
GLubyte r; // w3
GLubyte g; // w2
v13 = a5;
v14 = 1101;
if ( a4 <= 1100 )
{
if ( a4 < 0 )
v14 = 0;
else
v14 = a4;
}
if ( a10 )
{
if ( a10->m_usesPlayerColor1 )
{
m_player1 = a1->m_player1;
r = m_player1->m_playerColor1.r;
g = m_player1->m_playerColor1.g;
a2->b = m_player1->m_playerColor1.b;
a2->r = r;
a2->g = g;
}
else if ( a10->m_usesPlayerColor2 )
{
v15 = a1->m_player1;
v16 = v15->m_playerColor2.r;
v17 = v15->m_playerColor2.g;
a2->b = v15->m_playerColor2.b;
a2->r = v16;
a2->g = v17;
}
}
GJBaseGameLayer::updateColor(a1, a2, a3, v14, v13, a6, a7, a8, a9, a10, a11, a12);
if ( a1->m_playbackMode )
{
m_bitptr = a1->m_blendingColors.m_start.m_bitptr;
v19 = (unsigned __int64)v14 >> 6;
v20 = 1LL << (v14 & 0x3F);
v21 = m_bitptr[v19];
if ( ((v21 & v20) != 0) == v13 )
{
a1->m_blendingColors2.m_start.m_bitptr[v19] &= ~v20;
}
else
{
v22 = a1->m_blendingColors2.m_start.m_bitptr;
v23 = v21 | v20;
v24 = v21 & ~v20;
if ( v13 )
v24 = v23;
m_bitptr[v19] = v24;
v22[v19] |= v20;
}
}
}