//
// GJBaseGameLayer::removeReleasedButtons from 0x47e298 to 0x47e302 (106 bytes)
//
// 1 xrefs:
// > PlayLayer::resetLevel @ 0x31fdec
//
// 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 GJBaseGameLayer::removeReleasedButtons(GJBaseGameLayer *a1)
{
std::vector
*p_m_queuedButtons; // r6
unsigned int i; // r4
PlayerButtonCommand *m_start; // r0
unsigned int v4; // r3
unsigned int v5; // r2
int v6; // r8
PlayerButtonCommand *v7; // r12
unsigned int v8; // lr
char *v9; // r1
p_m_queuedButtons = &a1->m_queuedButtons;
for ( i = 0; ; i = v5 )
{
m_start = p_m_queuedButtons->m_start;
v4 = -1431655765 * (((char *)p_m_queuedButtons->m_finish - (char *)p_m_queuedButtons->m_start) >> 3);
if ( i >= v4 )
break;
v5 = i + 1;
v6 = i;
v7 = &m_start[i];
if ( v7->m_isPush )
{
v8 = i + 1;
v9 = (char *)&m_start[v6 + 1];
while ( v8 != v4 )
{
if ( v7->m_button == *(_DWORD *)v9 && !v9[4] )
{
std::vector::erase((int)p_m_queuedButtons, v9);
std::vector::erase((int)p_m_queuedButtons, (char *)&p_m_queuedButtons->m_start[v6]);
v5 = i;
break;
}
++v8;
v9 += 24;
}
}
}
}