//
// cocos2d::CCLayerRGBA::setColor from 0x7d7680 to 0x7d771a (154 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCControlButton::setColor @ 0x7a8160
// > `non-virtual thunk to'cocos2d::CCLayerRGBA::setColor @ 0x7d7730
// > cocos2d::CCLayerColor::setColor @ 0x7d7738
//
// 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 12:00:40 +0000
//
int __fastcall cocos2d::CCLayerRGBA::setColor(int result, int a2, int a3)
{
int v3; // r4
char v4; // r3
__int16 v5; // r1
int v6; // r3
const void *v7; // r0
void *v8; // r0
void *v9; // r7
int v10; // r0
char v11; // r3
_DWORD v12[3]; // [sp+0h] [bp-Ch] BYREF
v12[0] = result;
v12[1] = a2;
v12[2] = a3;
v3 = result;
*(_WORD *)(result + 325) = *(_WORD *)a2;
v4 = *(_BYTE *)(a2 + 2);
v5 = *(_WORD *)(result + 325);
*(_BYTE *)(result + 327) = v4;
*(_BYTE *)(result + 324) = v4;
v6 = *(unsigned __int8 *)(result + 329);
*(_WORD *)(result + 322) = v5;
if ( v6 )
{
v7 = *(const void **)(result + 196);
LOWORD(v12[0]) = -1;
BYTE2(v12[0]) = -1;
if ( v7 )
{
v8 = _dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
v9 = v8;
if ( v8 )
{
if ( (*(int (__fastcall **)(void *))(*(_DWORD *)v8 + 32))(v8) )
{
v10 = (*(int (__fastcall **)(void *))(*(_DWORD *)v9 + 8))(v9);
v11 = *(_BYTE *)(v10 + 2);
LOWORD(v12[0]) = *(_WORD *)v10;
BYTE2(v12[0]) = v11;
}
}
}
return (*(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v3 + 612))(v3, v12);
}
return result;
}