//
// ColorChannelSprite::updateOpacity from 0x140363020 to 0x140363177 (343 bytes)
//
// 9 xrefs:
// > CustomizeObjectLayer::updateColorSprite @ 0x1401426b9
// > CustomizeObjectLayer::updateColorSprite @ 0x140142752
// > GJColorSetupLayer::updateSpriteColor @ 0x14035f5a9
// > GJColorSetupLayer::updateSpriteColor @ 0x14035f636
// > LevelSettingsLayer::updateColorSprite @ 0x14045ad64
// > LevelSettingsLayer::updateColorSprite @ 0x14045ade5
// > ??> @ 0x1408ba804
// > ??> @ 0x1408ba814
// > ??> @ 0x140921500
//
// 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:53 +0000
//
void __fastcall ColorChannelSprite::updateOpacity(_QWORD **a1, float a2)
{
struct cocos2d::CCLabelBMFont **v2; // r14
struct cocos2d::CCLabelBMFont *v4; // rax
__int64 v5; // rcx
float *v6; // rbx
struct cocos2d::CCLabelBMFont *v7; // rsi
__int64 v8; // rdi
__int64 v9; // rax
__int64 v10; // rax
struct cocos2d::CCLabelBMFont *v11; // rdi
__int64 v12; // rax
__int64 v13; // rdx
struct cocos2d::CCLabelBMFont *v14; // rcx
void (__fastcall **v15)(__int64, const char *); // rbx
cocos2d::CCString *v16; // rax
const char *CString; // rax
char v18; // [rsp+60h] [rbp+18h] BYREF
v2 = (struct cocos2d::CCLabelBMFont **)(a1 + 76);
if ( a2 == 1.0 )
{
if ( !*v2 )
return;
}
else if ( !*v2 )
{
v4 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78);
v5 = (__int64)*a1;
*v2 = v4;
(*(void (__fastcall **)(_QWORD **, struct cocos2d::CCLabelBMFont *))(v5 + 464))(a1, v4);
v6 = (float *)((__int64 (__fastcall *)(_QWORD **))(*a1)[40])(a1);
v7 = *v2;
v8 = *(_QWORD *)*v2;
v9 = ((__int64 (__fastcall *)(_QWORD **))(*a1)[40])(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, *v6 * 0.5, (float)(*(float *)(v9 + 4) * 0.5) - 9.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v8 + 184))(v7, v10);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)*v2 + 160LL))(*v2);
}
v11 = *v2;
if ( a2 == 1.0 )
{
v12 = *(_QWORD *)v11;
v13 = 0;
v14 = *v2;
}
else
{
v15 = *((void (__fastcall ***)(__int64, const char *))v11 + 45);
v16 = cocos2d::CCString::createWithFormat("%0.2f", a2);
CString = cocos2d::CCString::getCString(v16);
(*v15)((__int64)v11 + 360, CString);
v14 = *v2;
LOBYTE(v13) = 1;
v12 = *(_QWORD *)*v2;
}
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v12 + 336))(v14, v13);
}