//
// GJEffectManager::updatePulseEffects from 0x49acf0 to 0x49ae0e (286 bytes)
//
// 1 xrefs:
// > GJEffectManager::updateEffects @ 0x49e67a
//
// 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 GJEffectManager::updatePulseEffects(GJEffectManager *a1, float a2)
{
unsigned int v4; // r7
PulseEffectAction *m_start; // r2
PulseEffectAction *v6; // r8
std::__detail::_Hash_node_base *i; // r5
std::__detail::_Hash_node_base *M_nxt; // r7
int v9; // r8
int v10; // r4
unsigned int v11; // r0
char v12; // r7
std::uintptr_t *m_bitptr; // r3
PulseEffectAction *v14; // [sp+8h] [bp-1Ch]
_DWORD v15[2]; // [sp+14h] [bp-10h] BYREF
v4 = 0;
while ( 1 )
{
m_start = a1->m_pulseEffectVector.m_start;
if ( v4 >= 954437177 * (((char *)a1->m_pulseEffectVector.m_finish - (char *)m_start) >> 3) )
break;
v6 = &m_start[v4];
PulseEffectAction::step(v6, a2);
if ( PulseEffectAction::isFinished(v6) )
std::vector
::erase((int)&a1->m_pulseEffectVector, (int)&a1->m_pulseEffectVector.m_start[v4]);
else
++v4;
}
for ( i = a1->m_pulseEffectMap._M_h._M_before_begin._M_nxt; i; i = i->_M_nxt )
{
M_nxt = i[1]._M_nxt;
v9 = 0;
v10 = 954437177 * (((char *)i[3]._M_nxt - (char *)i[2]._M_nxt) >> 3);
while ( v9 < v10 )
{
v14 = (PulseEffectAction *)&i[2]._M_nxt[18 * v9];
PulseEffectAction::step(v14, a2);
if ( PulseEffectAction::isFinished(v14) )
{
std::vector::erase((int)&i[2], (int)&i[2]._M_nxt[18 * v9]);
v10 = 954437177 * (((char *)i[3]._M_nxt - (char *)i[2]._M_nxt) >> 3);
}
else
{
++v9;
}
}
v11 = (unsigned int)M_nxt >> 5;
v12 = (unsigned __int8)M_nxt & 0x1F;
m_bitptr = a1->m_unkVector2f0.m_start.m_bitptr;
if ( 954437177 * (((char *)i[3]._M_nxt - (char *)i[2]._M_nxt) >> 3) )
{
m_bitptr[v11] |= 1 << v12;
}
else
{
v15[0] = &m_bitptr[v11];
v15[1] = 1 << v12;
std::_Bit_reference::operator=((int)v15, 0);
}
}
}