// // PlayerObject::redirectPlayerForce from 0x341990 to 0x341b26 (406 bytes) // // 1 xrefs: // > GJBaseGameLayer::teleportPlayer @ 0x49157e // // 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 // void PlayerObject::redirectPlayerForce(PlayerObject *a1, float a2, float a3, float a4, float a5) { float v8; // s17 float m_platformerXVelocity; // s13 float m_yVelocity; // s15 float v11; // r0 float v12; // r0 float v13; // s20 float v14; // s19 float v15; // r0 float Length; // r0 float v17; // s15 float v18; // s18 float v19; // r0 float y; // r2 bool v21; // r3 cocos2d::CCPoint x; // [sp+4h] [bp-14h] BYREF cocos2d::CCPoint v23; // [sp+Ch] [bp-Ch] BYREF v8 = a2 * 0.017453; m_platformerXVelocity = a1->m_platformerXVelocity; m_yVelocity = a1->m_yVelocity; cocos2d::CCPoint::CCPoint(&x, m_platformerXVelocity, m_yVelocity); v11 = atan2f(x.y, x.x); v12 = GJBaseGameLayer::convertToClosestDirection(v8 - v11, 3.1416); v13 = v12; if ( v12 != 0.0 ) { v14 = cosf(v12); v15 = sinf(v13); cocos2d::CCPoint::CCPoint(&v23, (float)(x.x * v14) - (float)(x.y * v15), (float)(x.x * v15) + (float)(x.y * v14)); cocos2d::CCPoint::operator=(&x, &v23); } cocos2d::CCPoint::operator*(&v23, &x, LODWORD(a3)); cocos2d::CCPoint::operator=(&x, &v23); Length = cocos2d::CCPoint::getLength(&x); if ( a5 > 0.0 && Length > a5 ) { v17 = a5 / Length; goto LABEL_11; } if ( a4 > 0.0 && Length < a4 ) { if ( Length == 0.0 ) { v18 = cosf(v8); v19 = sinf(v8); cocos2d::CCPoint::CCPoint(&v23, a4 * v18, a4 * v19); LABEL_12: cocos2d::CCPoint::operator=(&x, &v23); goto LABEL_13; } v17 = a4 / Length; LABEL_11: cocos2d::CCPoint::operator*(&v23, &x, LODWORD(v17)); goto LABEL_12; } LABEL_13: if ( a1->m_isSideways ) { y = x.y; x.y = x.x; x.x = y; } cocos2d::CCPoint::CCPoint(&v23, &x); PlayerObject::updatePlayerForce(a1, (cocos2d::CCPoint)(unsigned int)&v23, v21); }
GD Web Decomp Icon

GD Web Decomp

Raw Source