//
// ColorChannelSprite::updateOpacity from 0x5c227c to 0x5c2386 (266 bytes)
//
// 2 xrefs:
// > ColorChannelSprite::updateValues @ 0x5c2492
// > ColorChannelSprite::updateValues @ 0x5c24ee
//
// 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 11:53:50 +0000
//
int __fastcall ColorChannelSprite::updateOpacity(int this, const char *a2)
{
_DWORD *v2; // r4
int v4; // r3
int v5; // r0
int v6; // r3
int v7; // r7
void (__fastcall *v8)(int, _BYTE *); // r8
float v9; // s18
int v10; // r0
int *v11; // r5
int v12; // r3
void (__fastcall *v13)(int *, int); // r7
cocos2d::CCString *v14; // r0
int CString; // r0
_BYTE v16[8]; // [sp+4h] [bp-Ch] BYREF
v2 = (_DWORD *)this;
v4 = *(_DWORD *)(this + 512);
if ( *(float *)&a2 != 1.0 || v4 )
{
if ( !v4 )
{
v5 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", _stack_chk_guard);
v6 = *v2;
v2[128] = v5;
(*(void (__fastcall **)(_DWORD *, int))(v6 + 228))(v2, v5);
v7 = v2[128];
v8 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 92);
v9 = *(float *)(*(int (__fastcall **)(_DWORD *))(*v2 + 164))(v2);
v10 = (*(int (__fastcall **)(_DWORD *))(*v2 + 164))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, v9 * 0.5, (float)(*(float *)(v10 + 4) * 0.5) - 9.5);
v8(v7, v16);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)v2[128] + 80))(v2[128], 1050253722);
}
v11 = (int *)v2[128];
v12 = *v11;
if ( *(float *)&a2 == 1.0 )
{
return (*(int (__fastcall **)(_DWORD, _DWORD))(v12 + 172))(v2[128], 0);
}
else
{
v13 = *(void (__fastcall **)(int *, int))(v12 + 464);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%0.2f", a2, *(float *)&a2);
CString = cocos2d::CCString::getCString(v14);
v13(v11, CString);
return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)v2[128] + 172))(v2[128], 1);
}
}
return this;
}