// // GameObject::slopeYPos from 0x100261784 to 0x10026188c (264 bytes) // // 3 xrefs: // > PlayerObject::collidedWithSlopeInternal @ 0x100220aec // > PlayerObject::spiderTestJumpInternal @ 0x100225050 // > GameObject::slopeYPos_1 @ 0x100261780 // // 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 // double __fastcall GameObject::slopeYPos(GameObject *a1, float a2) { __int64 v4; // x0 float v5; // s9 float v6; // s10 double v7; // d11 double v8; // d0 double v9; // d1 double v10; // d3 double v11; // d4 double v12; // d3 double v13; // d2 double result; // d0 unsigned int m_slopeDirection; // w8 double v16; // d1 __int64 v17; // [xsp+0h] [xbp-40h] BYREF float v18; // [xsp+8h] [xbp-38h] float v19; // [xsp+Ch] [xbp-34h] v4 = ((__int64 (__fastcall *)(GameObject *))a1->getObjectRect)(a1); sub_100022B98(&v17, v4); v5 = sub_100022C40((__int64)&v17); v6 = sub_100022C30((float *)&v17); v7 = sub_100022C58((__int64)&v17); v8 = sub_100022C48((__int64)&v17); v9 = (float)(v19 / v18); v10 = a2 - v6; v11 = v8 + v10 * v9; v12 = v7 - v10 * v9; if ( a1->m_slopeUphill ) v12 = v11; v13 = v5 - a2; result = v8 + v13 * v9; if ( a1->m_slopeUphill ) result = v7 - v13 * v9; if ( v5 < a2 ) result = v12; if ( a1->m_slopeIsHazard ) { m_slopeDirection = a1->m_slopeDirection; if ( m_slopeDirection <= 6 && ((1 << m_slopeDirection) & 0x6A) != 0 ) v16 = -4.0; else v16 = 4.0; return result + v16; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source