//
// GJBaseGameLayer::shouldUseSubstepForButton from 0x864370 to 0x864434 (196 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::update @ 0x89dca8
// > ??> @ 0x2ab10
//
// 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
//
bool GJBaseGameLayer::shouldUseSubstepForButton(GJBaseGameLayer *a1, float a2)
{
double v2; // d9
PlayerButtonCommand *m_start; // x19
PlayerButtonCommand *m_finish; // x21
double m_timestamp; // d10
double v6; // d0
double v7; // d9
double v9; // d10
double v10; // d8
bool result; // w0
if ( !a1->m_clickBetweenSteps )
return 0;
v2 = a2;
m_start = a1->m_queuedButtons.m_start;
m_finish = a1->m_queuedButtons.m_finish;
m_timestamp = a1->m_timestamp;
v6 = a2 * 0.5;
v7 = v2 + m_timestamp;
if ( m_start == m_finish )
return 0;
v9 = v6 + m_timestamp;
while ( 1 )
{
v10 = m_start->m_timestamp;
if ( v10 >= v9 && v7 > v10 )
{
result = GJBaseGameLayer::buttonIsRelevant(a1, m_start);
if ( result )
break;
}
++m_start;
if ( v7 <= v10 || m_finish == m_start )
return 0;
}
return result;
}