// // PlayerObject::switchedDirTo from 0x34dbbc to 0x34dcac (240 bytes) // // 2 xrefs: // > PlayerObject::pushButton @ 0x34ea80 // > PlayerObject::enablePlayerControls @ 0x34eb18 // // 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 PlayerObject::switchedDirTo(PlayerObject *a1, PlayerButton a2) { _BOOL4 m_inputsLocked; // r2 std::map *p_m_holdingButtons; // r6 _BOOL4 m_isSliding; // r0 double *p_m_platformerXVelocity; // r1 _DWORD v9[2]; // [sp+0h] [bp-Ch] BYREF v9[0] = a1; v9[1] = a2; m_inputsLocked = a1->m_inputsLocked; if ( !a1->m_inputsLocked ) { p_m_holdingButtons = &a1->m_holdingButtons; v9[0] = 3; *(_BYTE *)std::map::operator[](&a1->m_holdingButtons.compare.pad, v9, m_inputsLocked) = a2 == 3; v9[0] = 2; *(_BYTE *)std::map::operator[](p_m_holdingButtons, v9, a2 - 3) = a2 == 2; } if ( !a1->m_controlsDisabled ) { m_isSliding = a1->m_isSliding; p_m_platformerXVelocity = &a1->m_platformerXVelocity; if ( a2 == 3 ) { a1->m_holdingRight = 1; a1->m_leftPressedFirst = 0; if ( m_isSliding && a1->m_isSlidingRight ) { a1->m_isSliding = 0; a1->m_maybeSlopeForce = 0.0; } if ( *p_m_platformerXVelocity >= 0.0 ) return 1; } else { a1->m_holdingLeft = 1; a1->m_leftPressedFirst = 1; if ( m_isSliding && !a1->m_isSlidingRight ) { a1->m_isSliding = 0; a1->m_maybeSlopeForce = 0.0; } if ( *p_m_platformerXVelocity <= 0.0 ) return 1; } a1->m_isMoving = 0; return 1; } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source