//
// GJRobotSprite::setOpacity from 0x1006ae920 to 0x1006aea08 (232 bytes)
//
// 3 xrefs:
// > sub_1006AEA10 @ 0x1006aea1c
// > ??> @ 0x100b87b30
// > ??> @ 0x100b880f8
//
// 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 12:35:23 +0000
//
__int64 __fastcall GJRobotSprite::setOpacity(__int64 a1, unsigned __int8 a2)
{
unsigned int v2; // r15d
__int64 v3; // rax
__int64 v4; // r15
unsigned int v5; // r12d
__int64 v6; // rax
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 736)) )
{
v2 = 0;
do
{
v3 = sub_1007FEFE0(*(_QWORD *)(a1 + 736), v2);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 912LL))(v3, a2);
++v2;
}
while ( v2 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 736)) );
}
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 672) + 912LL))(*(_QWORD *)(a1 + 672), a2);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 744) + 488LL))(*(_QWORD *)(a1 + 744));
if ( (unsigned int)sub_1007FEF90(v4) )
{
v5 = 0;
do
{
v6 = sub_1007FEFE0(v4, v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 912LL))(v6, a2);
++v5;
}
while ( v5 < (unsigned int)sub_1007FEF90(v4) );
}
return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 752) + 912LL))(*(_QWORD *)(a1 + 752), a2);
}