// // PlayLayer::getCurrentPercent from 0x5cef48 to 0x5cefd4 (140 bytes) // // 3 xrefs: // > PlayLayer::updateProgressbar @ 0x5cf03c // > PlayLayer::getCurrentPercentInt @ 0x5cf3c0 // > @ 0xa8960 // // 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 // float PlayLayer::getCurrentPercent(PlayLayer *a1) { float x; // s0 float m_levelLength; // s1 int m_timestamp; // w1 float result; // s0 x = a1->m_player1->getPosition(a1->m_player1)->x; m_levelLength = a1->m_levelLength; m_timestamp = a1->m_level->GJBaseGameLayer::m_timestamp; if ( m_timestamp > 0 ) { m_levelLength = (float)(2 * m_timestamp); x = (float)(int)a1->m_gameState.m_currentProgress; } result = (float)(x / m_levelLength) * 100.0; if ( result <= 0.0 ) return 0.0; if ( result >= 100.0 ) return 100.0; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source