//
// GJRobotSprite::setOpacity from 0x1402a7380 to 0x1402a7478 (248 bytes)
//
// 3 xrefs:
// > ??> @ 0x14057c4e8
// > ??> @ 0x14057c588
// > ??> @ 0x1406d2138
//
// 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 GJRobotSprite::setOpacity(GJRobotSprite *a1, unsigned __int8 a2)
{
unsigned int v3; // ebx
unsigned int i; // edi
struct cocos2d::CCObject *v6; // rax
cocos2d::CCArray *v7; // rdi
struct cocos2d::CCObject *v8; // rax
v3 = 0;
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)&a1->m_bRectRotated); ++i )
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)&a1->m_bRectRotated, i);
(*(void (__fastcall **)(int *, _QWORD))(*(_QWORD *)&v6[5].m_unknown2 + 40LL))(&v6[5].m_unknown2, a2);
}
((void (__fastcall *)(cocos2d::CCTextureProtocol *, _QWORD))a1->m_pobBatchNode->CCAnimatedSprite::__vftable[1].getBlendFunc)(
&a1->m_pobBatchNode->cocos2d::CCTextureProtocol,
a2);
v7 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_obOffsetPosition.y + 464LL))(*(_QWORD *)&a1->m_obOffsetPosition.y);
if ( cocos2d::CCArray::count(v7) )
{
do
{
v8 = cocos2d::CCArray::objectAtIndex(v7, v3);
(*(void (__fastcall **)(int *, _QWORD))(*(_QWORD *)&v8[5].m_unknown2 + 40LL))(&v8[5].m_unknown2, a2);
++v3;
}
while ( v3 < cocos2d::CCArray::count(v7) );
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)&a1->m_obUnflippedOffsetPositionFromCenter.y + 320LL)
+ 40LL))(
*(_QWORD *)&a1->m_obUnflippedOffsetPositionFromCenter.y + 320LL,
a2);
}