//
// GJBaseGameLayer::updateColor from 0x14032b610 to 0x14032b7e2 (466 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::updateColor @ 0x1403fc583
// > PlayLayer::updateColor @ 0x140510a99
// > ??> @ 0x14076b7b0
// > ??> @ 0x14091f178
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:30:29 +0000
//
__int64 __fastcall GJBaseGameLayer::updateColor(
__int64 a1,
__int64 a2,
float a3,
unsigned int a4,
char a5,
float a6,
_OWORD *a7,
int a8,
char a9,
__int64 a10,
int a11)
{
unsigned int v11; // ebx
__int64 ColorSprite; // rdi
__int64 ColorAction; // rbx
float v16; // xmm0_4
char v17; // al
cocos2d::CCDictionary *v18; // rcx
__int64 v19; // rcx
__int64 result; // rax
v11 = a4;
if ( a4 > 0x44D )
v11 = 0;
ColorSprite = GJEffectManager::getColorSprite(*(_QWORD *)(a1 + 2408), v11);
ColorAction = GJEffectManager::getColorAction(*(_QWORD *)(a1 + 2408), v11);
*(_DWORD *)(ColorAction + 128) = a11;
*(_BYTE *)(a1 + 12669) = *(_BYTE *)(ColorAction + 84);
*(_WORD *)(ColorAction + 72) = *(_WORD *)(ColorSprite + 324);
*(_BYTE *)(ColorAction + 74) = *(_BYTE *)(ColorSprite + 326);
*(_WORD *)(ColorAction + 75) = *(_WORD *)a2;
*(_BYTE *)(ColorAction + 77) = *(_BYTE *)(a2 + 2);
*(_BYTE *)(ColorAction + 84) = a5;
*(float *)(ColorAction + 80) = a3;
v16 = *(float *)(ColorSprite + 320) / 255.0;
*(float *)(ColorAction + 100) = a6;
*(float *)(ColorAction + 96) = v16;
v17 = a10;
*(_OWORD *)(ColorAction + 104) = *a7;
if ( a10 )
v17 = *(_BYTE *)(a10 + 1652);
*(_BYTE *)(ColorAction + 136) = v17;
*(_DWORD *)(ColorAction + 120) = a8;
*(_BYTE *)(ColorAction + 125) = a9;
*(_DWORD *)(ColorAction + 68) = 0;
*(_WORD *)(ColorAction + 56) = 0;
ColorAction::step(ColorAction);
v18 = *(cocos2d::CCDictionary **)(*(_QWORD *)(a1 + 2408) + 632LL);
if ( *(int *)(ColorAction + 120) <= 0 )
cocos2d::CCDictionary::removeObjectForKey(v18, *(int *)(ColorAction + 92));
else
cocos2d::CCDictionary::setObject(v18, (struct cocos2d::CCObject *)ColorAction, *(int *)(ColorAction + 92));
if ( a3 > 0.0 )
return ColorAction;
v19 = *(_QWORD *)(ColorAction + 144);
if ( !*(_DWORD *)(ColorAction + 120) )
{
*(_WORD *)(v19 + 324) = *(_WORD *)a2;
*(_BYTE *)(v19 + 326) = *(_BYTE *)(a2 + 2);
*(float *)(v19 + 320) = a6 * 255.0;
return ColorAction;
}
result = ColorAction;
if ( !*(_BYTE *)(ColorAction + 125) )
*(float *)(v19 + 320) = a6 * 255.0;
return result;
}