//
// GameObject::addToOpacityGroup from 0x44dd02 to 0x44dd4a (72 bytes)
//
// 1 xrefs:
// > PlayLayer::optimizeOpacityGroups @ 0x408e2a
//
// 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:48:35 +0000
//
int __fastcall GameObject::addToOpacityGroup(int this, int a2)
{
int v2; // r4
int v4; // r1
int i; // r3
int v6; // r2
v2 = this;
if ( *(__int16 *)(this + 1036) <= 9 && (unsigned int)(a2 - 1) <= 0x270E )
{
this = GameObject::createOpacityGroupContainer(this, 0xAu);
v4 = *(__int16 *)(v2 + 1036);
for ( i = 0; ; ++i )
{
v6 = *(_DWORD *)(v2 + 1032);
if ( i >= v4 )
break;
if ( *(__int16 *)(v6 + 2 * i) == a2 )
return this;
}
*(_WORD *)(v6 + 2 * v4) = a2;
++*(_WORD *)(v2 + 1036);
}
return this;
}