//
// GJBaseGameLayer::shouldUseSubstepForButton from 0x1001fae00 to 0x1001faeb4 (180 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::update @ 0x1001fe85c
//
// 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 __fastcall GJBaseGameLayer::shouldUseSubstepForButton(GJBaseGameLayer *a1, float a2)
{
std::__vector_base
::pointer begin; // x8
std::__vector_base::pointer end; // x20
double v5; // d0
double m_timestamp; // d1
double v7; // d8
double v8; // d9
std::__vector_base::pointer i; // x21
double v10; // d10
bool v11; // nf
if ( !a1->m_clickBetweenSteps )
return 0;
begin = a1->m_queuedButtons.__begin_;
end = a1->m_queuedButtons.__end_;
if ( begin == end )
return 0;
v5 = a2;
m_timestamp = a1->m_timestamp;
v7 = m_timestamp + v5;
v8 = v5 * 0.5 + m_timestamp;
for ( i = begin + 1; ; ++i )
{
v10 = i[-1].m_timestamp;
v11 = v10 >= v8 && v10 < v7;
if ( v11 && GJBaseGameLayer::buttonIsRelevant(a1, i - 1) )
break;
if ( v10 >= v7 || i == end )
return 0;
}
return 1;
}