//
// GJEffectManager::runOpacityActionOnGroup from 0x5c9c50 to 0x5c9e44 (500 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x467b50
// > EffectGameObject::triggerObject @ 0x4f4f82
//
// 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:55 +0000
//
_DWORD *__fastcall GJEffectManager::runOpacityActionOnGroup(
GJEffectManager *this,
int a2,
float a3,
float a4,
int a5,
int a6)
{
int v6; // r6
_DWORD *v9; // r8
int v10; // r1
int v12; // r9
unsigned int v13; // r10
unsigned int v14; // r7
float v15; // s16
unsigned int v16; // r4
_DWORD *v17; // r2
unsigned int v18; // r0
int v19; // r1
int v20; // r0
int v21; // r4
float v22; // s13
float v23; // s15
bool v24; // r9
unsigned int v25; // r9
unsigned int v26; // r1
_DWORD *v27; // r2
int v28; // r2
unsigned int v29; // r0
int v30; // r1
unsigned int v32; // [sp+Ch] [bp-8h] BYREF
v9 = (_DWORD *)((char *)this + 308);
if ( a2 > 9998 )
v10 = 9999;
else
v10 = a2 & ~(a2 >> 31);
v32 = v10;
v12 = GJEffectManager::opacityModForGroup(this, v10, LODWORD(a3));
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::__erase_unique(
v9,
&v32);
v13 = *((_DWORD *)this + 78);
v14 = v32;
if ( a3 > 0.0 )
v15 = *(float *)&v12;
else
v15 = a4;
if ( v13 )
{
v16 = v13 - 1;
v6 = ((v13 - 1) & v13) != 0 ? v32 % v13 : v16 & v32;
v17 = *(_DWORD **)(*((_DWORD *)this + 77) + 4 * v6);
if ( v17 )
{
while ( 1 )
{
v17 = (_DWORD *)*v17;
if ( !v17 )
break;
v18 = v17[1];
v19 = ((v13 - 1) & v13) != 0 ? v18 % v13 : v16 & v18;
if ( v19 != v6 )
break;
if ( v17[2] == v32 )
return std::unordered_map::operator[]((int)v9, &v32);
}
}
}
v20 = operator new(0x38u);
*(_DWORD *)(v20 + 8) = v32;
v21 = v20;
*(float *)(v20 + 12) = a3;
*(_DWORD *)(v20 + 16) = v12;
*(float *)(v20 + 20) = a4;
*(_WORD *)(v20 + 24) = a3 <= 0.0;
*(_DWORD *)(v20 + 28) = 0;
*(_DWORD *)(v20 + 32) = v14;
*(float *)(v20 + 36) = v15;
*(_DWORD *)(v20 + 48) = 0;
*(_DWORD *)(v20 + 52) = 0;
*(_DWORD *)(v20 + 40) = a5;
*(_DWORD *)v20 = 0;
*(_DWORD *)(v20 + 4) = v14;
*(_DWORD *)(v20 + 44) = a6;
v22 = *((float *)this + 81);
v23 = (float)(unsigned int)(*((_DWORD *)this + 80) + 1);
if ( v23 > (float)((float)v13 * v22) )
{
v24 = v13 > 2 && ((v13 - 1) & v13) == 0;
goto LABEL_20;
}
if ( !v13 )
{
v24 = 0;
LABEL_20:
v25 = 2 * v13 + !v24;
v26 = (unsigned int)ceilf(v23 / v22);
if ( v26 < v25 )
v26 = v25;
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::rehash(
(int)v9,
v26);
v13 = *((_DWORD *)this + 78);
if ( ((v13 - 1) & v13) != 0 )
v6 = v14 % v13;
else
v6 = (v13 - 1) & v14;
}
v27 = *(_DWORD **)(*((_DWORD *)this + 77) + 4 * v6);
if ( v27 )
{
*(_DWORD *)v21 = *v27;
*v27 = v21;
}
else
{
*(_DWORD *)v21 = *((_DWORD *)this + 79);
v28 = *((_DWORD *)this + 77);
*((_DWORD *)this + 79) = v21;
*(_DWORD *)(v28 + 4 * v6) = (char *)this + 316;
if ( *(_DWORD *)v21 )
{
v29 = *(_DWORD *)(*(_DWORD *)v21 + 4);
if ( ((v13 - 1) & v13) != 0 )
v30 = v29 % v13;
else
v30 = (v13 - 1) & v29;
*(_DWORD *)(*((_DWORD *)this + 77) + 4 * v30) = v21;
}
}
++*((_DWORD *)this + 80);
return std::unordered_map::operator[]((int)v9, &v32);
}