// // PlayerObject::updateMove from 0x62b290 to 0x62c818 (5512 bytes) // // 2 xrefs: // > PlayerObject::update @ 0x640018 // > @ 0x84a80 // // 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::updateMove(PlayerObject *a1, float a2) { double m_playerSpeed; // d8 _BOOL4 m_isOnSlope; // w0 double v6; // d8 _BOOL4 m_isOnIce; // w27 double m_platformerXVelocity; // d0 double v9; // d11 float v10; // s12 _BOOL4 m_holdingLeft; // w22 unsigned int m_holdingRight; // w20 unsigned int m_platformerMovingRight; // w24 double v14; // d12 _BOOL4 m_isOnGround2; // w26 double v16; // d9 _BOOL4 m_platformerMovingLeft; // w22 double v18; // d13 double v19; // d12 _BOOL4 v20; // w28 unsigned int v21; // w23 int v22; // w1 _BOOL4 v23; // w25 double m_yVelocityBeforeSlope; // d1 double v25; // d2 double m_maybeSlopeForce; // d1 int v27; // w26 double v28; // d1 _BOOL4 m_isRobot; // w26 _BOOL4 m_isSpider; // w26 unsigned __int64 v31; // x27 size_t v32; // x2 _DWORD *v33; // x3 unsigned __int64 v34; // x27 char *v35; // x0 char *v36; // x0 _BOOL4 m_maybeGoingCorrectSlopeDirection; // w0 unsigned int v38; // w1 unsigned int v39; // w2 float v40; // s4 double v41; // d4 double v42; // d2 double v43; // d2 double v44; // d3 bool v45; // cc double v46; // d13 double v47; // d2 double v48; // d2 bool v49; // nf bool v50; // cc double v51; // d2 double m_xVelocityRelated; // d0 double v53; // d1 float v54; // s9 float v55; // s8 double v56; // d1 float v57; // s0 double v58; // d8 float m_slopeRotation; // s0 void (__fastcall *v60)(PlayerObject *__hidden, float); // x20 float v61; // s0 float v62; // s0 double v63; // d1 float v64; // s0 float m_platformerVelocityRelated; // s3 float v66; // s2 float m_totalTime; // s0 double v68; // d3 double v69; // d0 _BOOL4 m_isDashing; // w0 unsigned int m_isGoingLeft; // w25 float v72; // s0 float v73; // s0 void (__fastcall *v74)(PlayerObject *__hidden, float); // x25 float v75; // s0 GJRobotSprite *v76; // x27 char *v77; // x0 unsigned int *v78; // x2 int v79; // w1 float v80; // s9 unsigned __int64 v81; // x27 size_t v82; // x2 _DWORD *v83; // x3 unsigned __int64 v84; // x27 char *v85; // x0 char *v86; // x0 int v87; // w0 _BOOL4 v88; // w1 float v89; // s2 GJSpiderSprite *v90; // x24 float v91; // s0 void (__fastcall *setRotation)(PlayerObject *__hidden, float); // x25 float v93; // s0 float m_xVelocityRelated2; // s0 float v95; // s3 double v96; // d2 double v97; // d4 unsigned __int64 v98; // x27 size_t v99; // x2 int v100; // w0 _DWORD *v101; // x3 unsigned __int64 v102; // x27 char *v103; // x0 unsigned __int64 v104; // x27 size_t v105; // x2 int v106; // w0 _DWORD *v107; // x3 unsigned __int64 v108; // x27 char *v109; // x0 unsigned int *v110; // x1 int v111; // w2 unsigned int *v112; // x1 int v113; // w2 unsigned int *v114; // x3 int v115; // w1 unsigned int *v116; // x3 int v117; // w1 _BOOL4 v118; // w2 char *v119; // x0 unsigned int *v120; // x26 int v121; // w1 GJRobotSprite *v122; // x24 char *v123; // x0 unsigned int *v124; // x2 int v125; // w1 float v126; // s3 unsigned int *v127; // x3 int v128; // w1 unsigned int *v129; // x3 int v130; // w1 unsigned int *v131; // x4 int v132; // w1 unsigned int *v133; // x4 int v134; // w1 float v135; // s3 unsigned __int64 v136; // [xsp+98h] [xbp+98h] unsigned __int64 v137; // [xsp+98h] [xbp+98h] _DWORD *v138; // [xsp+A8h] [xbp+A8h] _DWORD *v139; // [xsp+A8h] [xbp+A8h] _DWORD *v140; // [xsp+A8h] [xbp+A8h] _DWORD *v141; // [xsp+A8h] [xbp+A8h] unsigned __int64 v142; // [xsp+B0h] [xbp+B0h] GJSpiderSprite *m_spiderSprite; // [xsp+B0h] [xbp+B0h] unsigned __int64 v144; // [xsp+B0h] [xbp+B0h] _DWORD *v145; // [xsp+B0h] [xbp+B0h] _DWORD *v146; // [xsp+B0h] [xbp+B0h] GJRobotSprite *m_robotSprite; // [xsp+B0h] [xbp+B0h] _BOOL4 v148; // [xsp+B8h] [xbp+B8h] void *v149; // [xsp+D8h] [xbp+D8h] BYREF void *v150; // [xsp+E0h] [xbp+E0h] BYREF void *v151; // [xsp+E8h] [xbp+E8h] BYREF void *v152; // [xsp+F0h] [xbp+F0h] BYREF m_playerSpeed = a1->m_playerSpeed; m_isOnSlope = a1->m_isOnSlope; v6 = m_playerSpeed * a1->m_speedMultiplier; if ( m_isOnSlope && !a1->m_slopeFlipGravityRelated && !a1->m_maybeUpsideDownSlope ) { v148 = m_isOnSlope; v64 = cosf(a1->m_slopeAngle); m_isOnSlope = v148; v6 = v6 * v64; } m_isOnIce = a1->m_isOnIce; m_platformerXVelocity = a1->m_platformerXVelocity; v9 = m_platformerXVelocity; if ( a1->m_isOnIce ) v10 = 0.2; else v10 = 1.0; m_holdingLeft = a1->m_holdingLeft; m_holdingRight = a1->m_holdingRight; if ( !a1->m_holdingLeft ) { m_platformerMovingRight = 1; if ( !a1->m_holdingRight && !a1->m_platformerMovingLeft ) m_platformerMovingRight = a1->m_platformerMovingRight; LABEL_7: if ( a1->m_isOnIce ) { v14 = v10; m_isOnGround2 = a1->m_isOnGround2; goto LABEL_9; } goto LABEL_42; } if ( !a1->m_holdingRight ) { m_platformerMovingRight = 1; goto LABEL_7; } if ( a1->m_leftPressedFirst ) { m_isOnGround2 = a1->m_isOnGround2; if ( a1->m_isOnIce ) { m_platformerMovingRight = 1; m_holdingRight = 0; v14 = v10; goto LABEL_10; } if ( a1->m_isOnGround2 ) { v14 = v10; m_platformerMovingRight = 1; m_holdingRight = 0; goto LABEL_10; } m_holdingRight = 0; m_platformerMovingRight = 1; goto LABEL_43; } if ( a1->m_isOnIce ) { v14 = v10; m_isOnGround2 = a1->m_isOnGround2; m_platformerMovingRight = 1; goto LABEL_39; } m_platformerMovingRight = 1; m_holdingLeft = 0; LABEL_42: m_isOnGround2 = a1->m_isOnGround2; if ( a1->m_isOnGround2 ) { LABEL_136: v14 = v10; goto LABEL_9; } LABEL_43: if ( a1->m_isSlidingRight != m_holdingLeft ) { if ( a1->m_maybeSlidingTime > 0 ) { v14 = 0.200000003; m_isOnGround2 = 0; goto LABEL_9; } v63 = a1->m_totalTime - a1->m_maybeSlidingStartTime; if ( v63 < 0.5 ) { m_isOnGround2 = 0; v10 = (v63 + v63) * 0.800000012 + 0.200000003; goto LABEL_136; } } v14 = v10; m_isOnGround2 = 0; LABEL_9: if ( !m_holdingLeft ) { LABEL_39: v16 = a2; m_platformerMovingLeft = m_holdingRight; v20 = 0; v21 = 0; v22 = 1; v18 = a2 * 0.5; v19 = v14 * v18; goto LABEL_18; } LABEL_10: v16 = a2; m_platformerMovingLeft = a1->m_platformerMovingLeft; v18 = a2 * 0.5; v19 = v18 * v14; if ( a1->m_platformerMovingLeft ) { v20 = m_platformerXVelocity > 0.0; v21 = 1; v22 = -1; v23 = v20; goto LABEL_12; } m_platformerMovingLeft = 1; v22 = -1; v21 = 1; v20 = m_platformerXVelocity > 0.0; LABEL_18: if ( !m_holdingRight || !a1->m_platformerMovingRight ) { v23 = m_platformerXVelocity > 0.0; goto LABEL_21; } m_holdingRight = 1; v23 = m_platformerXVelocity > 0.0; LABEL_12: if ( fabs(m_platformerXVelocity) >= v6 * 0.949999988 && m_isOnSlope && !a1->m_maybeUpsideDownSlope ) { m_yVelocityBeforeSlope = a1->m_yVelocityBeforeSlope; if ( m_yVelocityBeforeSlope < 0.0 ) v25 = m_yVelocityBeforeSlope / -15.0 * 0.300000012 + 1.0; else v25 = 1.0; m_maybeSlopeForce = a1->m_maybeSlopeForce + v25 * (float)(a2 * 0.25); a1->m_maybeSlopeForce = m_maybeSlopeForce; goto LABEL_23; } LABEL_21: if ( a1->m_isSliding ) { m_maybeSlopeForce = a1->m_maybeSlopeForce; LABEL_23: v6 = v6 + m_maybeSlopeForce; a1->m_isSliding = 1; } if ( v20 || m_holdingRight && m_platformerXVelocity < 0.0 ) v19 = v19 * 1.5; if ( !m_platformerMovingLeft ) { if ( !m_isOnGround2 ) goto LABEL_62; m_isRobot = a1->m_isRobot; if ( a1->m_isRobot ) { sub_D18D28(&v149, &a1->m_robotSprite->m_animationManager->m_currentAnimation); sub_D153B8((int)&v150, "idle01"); v139 = v150; v81 = *((_QWORD *)v149 - 3); v144 = *((_QWORD *)v150 - 3); if ( v144 > v81 ) v82 = *((_QWORD *)v149 - 3); else v82 = *((_QWORD *)v150 - 3); if ( memcmp(v149, v150, v82) || (v83 = v139, v84 = v81 - v144, v84 + 0x80000000 > 0xFFFFFFFF) || (_DWORD)v84 ) { sub_D18D28(&v151, &a1->m_robotSprite->m_animationManager->m_currentAnimation); sub_D153B8((int)&v152, "idle02"); v140 = v151; v98 = *((_QWORD *)v151 - 3); v145 = v152; v136 = *((_QWORD *)v152 - 3); if ( v136 > v98 ) v99 = *((_QWORD *)v151 - 3); else v99 = *((_QWORD *)v152 - 3); v100 = memcmp(v151, v152, v99); v101 = v140; if ( !v100 ) { v102 = v98 - v136; if ( v102 + 0x80000000 <= 0xFFFFFFFF ) m_isRobot = v102 != 0; } if ( v145 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v131 = v145 - 2; do v132 = __ldaxr(v131); while ( __stlxr(v132 - 1, v131) ); } else { v132 = *(v145 - 2); *(v145 - 2) = v132 - 1; } if ( v132 <= 0 ) operator delete(v145 - 6); v101 = v151; } v103 = (char *)(v101 - 6); if ( v101 - 6 == (_DWORD *)&qword_124B6B0 ) goto LABEL_287; if ( &pthread_create ) { v114 = v101 - 2; do v115 = __ldaxr(v114); while ( __stlxr(v115 - 1, v114) ); } else { v115 = *(v101 - 2); *(v101 - 2) = v115 - 1; } if ( v115 > 0 ) { LABEL_287: v83 = v150; } else { operator delete(v103); v83 = v150; } } else { m_isRobot = 0; } v85 = (char *)(v83 - 6); if ( v83 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v127 = v83 - 2; do v128 = __ldaxr(v127); while ( __stlxr(v128 - 1, v127) ); } else { v128 = *(v83 - 2); *(v83 - 2) = v128 - 1; } if ( v128 <= 0 ) operator delete(v85); } v86 = (char *)v149 - 24; if ( (char *)v149 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v110 = (unsigned int *)((char *)v149 - 8); do v111 = __ldaxr(v110); while ( __stlxr(v111 - 1, v110) ); } else { v111 = *((_DWORD *)v149 - 2); *((_DWORD *)v149 - 2) = v111 - 1; } if ( v111 <= 0 ) operator delete(v86); } if ( m_isRobot ) { m_robotSprite = a1->m_robotSprite; sub_D153B8((int)&v152, "idle01"); CCAnimatedSprite::tweenToAnimation((__int64)m_robotSprite, (const std::string *)&v152, 0.2); v119 = (char *)v152 - 24; if ( (char *)v152 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v120 = (unsigned int *)((char *)v152 - 8); do v121 = __ldaxr(v120); while ( __stlxr(v121 - 1, v120) ); } else { v121 = *((_DWORD *)v152 - 2); *((_DWORD *)v152 - 2) = v121 - 1; } if ( v121 <= 0 ) operator delete(v119); } } } else { m_isSpider = a1->m_isSpider; if ( !a1->m_isSpider ) goto LABEL_62; sub_D18D28(&v149, &a1->m_spiderSprite->m_animationManager->m_currentAnimation); sub_D153B8((int)&v150, "idle01"); v138 = v150; v31 = *((_QWORD *)v149 - 3); v142 = *((_QWORD *)v150 - 3); if ( v142 > v31 ) v32 = *((_QWORD *)v149 - 3); else v32 = *((_QWORD *)v150 - 3); if ( memcmp(v149, v150, v32) || (v33 = v138, v34 = v31 - v142, v34 + 0x80000000 > 0xFFFFFFFF) || (_DWORD)v34 ) { sub_D18D28(&v151, &a1->m_spiderSprite->m_animationManager->m_currentAnimation); sub_D153B8((int)&v152, "idle02"); v141 = v151; v104 = *((_QWORD *)v151 - 3); v146 = v152; v137 = *((_QWORD *)v152 - 3); if ( v137 > v104 ) v105 = *((_QWORD *)v151 - 3); else v105 = *((_QWORD *)v152 - 3); v106 = memcmp(v151, v152, v105); v107 = v141; if ( !v106 ) { v108 = v104 - v137; if ( v108 + 0x80000000 <= 0xFFFFFFFF ) m_isSpider = v108 != 0; } if ( v146 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v133 = v146 - 2; do v134 = __ldaxr(v133); while ( __stlxr(v134 - 1, v133) ); } else { v134 = *(v146 - 2); *(v146 - 2) = v134 - 1; } if ( v134 <= 0 ) operator delete(v146 - 6); v107 = v151; } v109 = (char *)(v107 - 6); if ( v107 - 6 == (_DWORD *)&qword_124B6B0 ) goto LABEL_298; if ( &pthread_create ) { v116 = v107 - 2; do v117 = __ldaxr(v116); while ( __stlxr(v117 - 1, v116) ); } else { v117 = *(v107 - 2); *(v107 - 2) = v117 - 1; } if ( v117 > 0 ) { LABEL_298: v33 = v150; } else { operator delete(v109); v33 = v150; } } else { m_isSpider = 0; } v35 = (char *)(v33 - 6); if ( v33 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v129 = v33 - 2; do v130 = __ldaxr(v129); while ( __stlxr(v130 - 1, v129) ); } else { v130 = *(v33 - 2); *(v33 - 2) = v130 - 1; } if ( v130 <= 0 ) operator delete(v35); } v36 = (char *)v149 - 24; if ( (char *)v149 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v112 = (unsigned int *)((char *)v149 - 8); do v113 = __ldaxr(v112); while ( __stlxr(v113 - 1, v112) ); } else { v113 = *((_DWORD *)v149 - 2); *((_DWORD *)v149 - 2) = v113 - 1; } if ( v113 <= 0 ) operator delete(v36); } if ( m_isSpider ) { m_spiderSprite = a1->m_spiderSprite; sub_D153B8((int)&v152, "idle01"); CCAnimatedSprite::tweenToAnimation((__int64)m_spiderSprite, (const std::string *)&v152, 0.2); if ( (char *)v152 - 24 != (char *)&qword_124B6B0 ) sub_620F68((char *)v152 - 24); m_platformerXVelocity = a1->m_platformerXVelocity; m_isOnIce = a1->m_isOnIce; LABEL_62: if ( m_isOnIce ) { LABEL_63: v28 = 0.200000003; v27 = 1; goto LABEL_64; } LABEL_146: m_platformerVelocityRelated = a1->m_platformerVelocityRelated; v66 = 0.2; if ( (float)(m_platformerVelocityRelated + 0.2) < 1.0 ) v28 = (float)(m_platformerVelocityRelated + 0.2); else v28 = 1.0; if ( !a1->m_isOnGround2 ) { if ( a1->m_isShip || a1->m_isBall || a1->m_isBird ) { v66 = 0.02; } else if ( a1->m_isRobot || a1->m_isSpider ) { v66 = 0.1; } else { v66 = 0.05; } } v27 = 1; a1->m_platformerVelocityRelated = m_platformerVelocityRelated + (float)(a2 * v66); goto LABEL_64; } } m_platformerXVelocity = a1->m_platformerXVelocity; if ( a1->m_isOnIce ) goto LABEL_63; goto LABEL_146; } a1->m_platformerVelocityRelated = 0.0; if ( v21 && m_platformerXVelocity > -v6 ) { a1->m_platformerXVelocity = m_platformerXVelocity + (double)v22 * v19; } else if ( v6 > m_platformerXVelocity && m_holdingRight ) { a1->m_platformerXVelocity = m_platformerXVelocity + (double)v22 * v19; } if ( m_isOnGround2 ) { if ( a1->m_isRobot ) { v76 = a1->m_robotSprite; sub_D18D28(&v152, &a1->m_currentRobotAnimation); CCAnimatedSprite::runAnimation((__int64)v76, (__int64)&v152); v77 = (char *)v152 - 24; if ( (char *)v152 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v78 = (unsigned int *)((char *)v152 - 8); do v79 = __ldaxr(v78); while ( __stlxr(v79 - 1, v78) ); } else { v79 = *((_DWORD *)v152 - 2); *((_DWORD *)v152 - 2) = v79 - 1; } if ( v79 <= 0 ) operator delete(v77); } } else if ( a1->m_isSpider ) { v27 = 0; PlayerObject::playDynamicSpiderRun(a1); m_platformerXVelocity = a1->m_platformerXVelocity; v28 = 0.0500000007; goto LABEL_64; } } m_platformerXVelocity = a1->m_platformerXVelocity; v27 = 0; v28 = 0.0500000007; LABEL_64: if ( fabs(m_platformerXVelocity) >= 0.5 ) { if ( a1->m_affectedByForces ) { LABEL_190: v27 = 1; if ( a1->m_isOnIce ) goto LABEL_69; LABEL_191: if ( m_platformerMovingRight || a1->m_decreaseBoostSlide ) { m_maybeGoingCorrectSlopeDirection = a1->m_maybeGoingCorrectSlopeDirection; v28 = 0.0500000007; } else { m_maybeGoingCorrectSlopeDirection = a1->m_maybeGoingCorrectSlopeDirection; v28 = 0.200000003; } goto LABEL_70; } } else { a1->m_affectedByForces = 0; } if ( a1->m_isMoving ) goto LABEL_190; if ( a1->m_maybeHasStopped ) { if ( a1->m_isOnIce ) { LABEL_69: m_maybeGoingCorrectSlopeDirection = a1->m_maybeGoingCorrectSlopeDirection; goto LABEL_70; } goto LABEL_191; } m_maybeGoingCorrectSlopeDirection = a1->m_maybeGoingCorrectSlopeDirection; if ( a1->m_maybeGoingCorrectSlopeDirection ) { if ( !a1->m_isOnIce ) { v38 = a1->m_platformerMovingLeft; v28 = 0.100000001; if ( !a1->m_platformerMovingLeft ) goto LABEL_71; goto LABEL_158; } m_maybeGoingCorrectSlopeDirection = a1->m_isOnIce; } LABEL_70: v38 = a1->m_platformerMovingLeft; if ( !a1->m_platformerMovingLeft ) { LABEL_71: v39 = a1->m_platformerMovingRight; if ( !a1->m_platformerMovingRight ) goto LABEL_160; a1->m_isSlidingRight = 0; v40 = 1.0; LABEL_73: if ( m_holdingRight < v39 ) { v41 = v40; goto LABEL_75; } LABEL_160: if ( !m_maybeGoingCorrectSlopeDirection || a1->m_isOnIce || v38 || v39 ) goto LABEL_102; v49 = m_platformerXVelocity < 0.0; v50 = m_platformerXVelocity <= 0.0; if ( a1->m_isSlidingRight ) goto LABEL_100; goto LABEL_276; } LABEL_158: a1->m_isSlidingRight = 1; if ( v21 ) { v39 = a1->m_platformerMovingRight; v40 = -1.0; goto LABEL_73; } v41 = -1.0; LABEL_75: if ( a1->m_currentSlope ) { v42 = fabsf(a1->m_slopeAngleRadians * 57.296); if ( v42 > 80.0 ) goto LABEL_206; if ( v42 > 40.0 ) { if ( v42 <= 80.0 ) { v43 = (v42 - 40.0) / 40.0; v44 = v43 * 0.5 + 0.5; goto LABEL_80; } LABEL_206: v45 = m_platformerXVelocity <= 0.0; v43 = 1.0; v46 = 1.0 * v18 * 0.400000006; if ( a1->m_isShip ) goto LABEL_81; goto LABEL_207; } } v44 = 0.5; v43 = 0.0; LABEL_80: v45 = m_platformerXVelocity <= 0.0; v46 = v44 * v18 * 0.400000006; if ( a1->m_isShip ) { LABEL_81: v46 = v46 * 0.699999988; if ( v45 || !v38 ) { v118 = a1->m_platformerMovingRight; if ( m_platformerXVelocity >= 0.0 || !a1->m_platformerMovingRight ) goto LABEL_337; } v47 = v43 * 0.699999988 + 1.35000002 - 0.25; goto LABEL_84; } LABEL_207: if ( v45 || !v38 ) { v118 = a1->m_platformerMovingRight; if ( m_platformerXVelocity >= 0.0 || !a1->m_platformerMovingRight ) { LABEL_337: if ( m_holdingRight && v38 ) { v46 = v46 + v19; } else if ( v21 && v118 ) { v46 = v46 + v19; } goto LABEL_90; } } v47 = v43 * 0.699999988 + 1.35000002; if ( a1->m_isBall ) { v47 = v47 - 0.280000001; } else if ( a1->m_isSpider ) { v47 = v47 - 0.200000003; } LABEL_84: if ( a1->m_isOnIce ) v47 = v47 * 4.0; if ( v38 > m_holdingRight || a1->m_platformerMovingRight > v21 ) v47 = v47 * 0.800000012; v48 = v19 * v47; if ( fabs(v48) > fabs(v46) ) v46 = v48; LABEL_90: if ( a1->m_isOnSlope && !a1->m_isOnGround4 && a1->m_maybeSlidingTime > 0 && !a1->m_maybeUpsideDownSlope ) m_platformerXVelocity = m_platformerXVelocity * 0.800000012; m_platformerXVelocity = m_platformerXVelocity + v46 * v41; a1->m_platformerXVelocity = m_platformerXVelocity; if ( !m_maybeGoingCorrectSlopeDirection ) goto LABEL_103; if ( a1->m_isOnIce ) goto LABEL_103; if ( v38 ) goto LABEL_103; v27 = 0; if ( a1->m_platformerMovingRight ) goto LABEL_103; v49 = m_platformerXVelocity < 0.0; v50 = m_platformerXVelocity <= 0.0; if ( a1->m_isSlidingRight ) { LABEL_100: if ( !v50 ) a1->m_maybeGoingCorrectSlopeDirection = 0; goto LABEL_102; } LABEL_276: if ( v49 ) a1->m_maybeGoingCorrectSlopeDirection = 0; LABEL_102: if ( v27 ) { LABEL_167: if ( a1->m_isOnIce || a1->m_isMoving ) v68 = 0.150000006; else v68 = 1.0; v69 = m_platformerXVelocity + v16 * (-v28 * m_platformerXVelocity) * v68; a1->m_platformerXVelocity = v69; if ( fabs(v69) < 0.00999999978 || a1->m_isPlatformer && (v69 < 0.0 && v23 || v69 > 0.0 && v9 < 0.0) ) { m_isDashing = a1->m_isDashing; a1->m_maybeHasStopped = 0; a1->m_affectedByForces = 0; a1->m_maybeGoingCorrectSlopeDirection = 0; a1->m_isMoving = 0; a1->m_platformerXVelocity = 0.0; if ( m_isDashing ) goto LABEL_110; goto LABEL_177; } goto LABEL_105; } LABEL_103: v51 = fabs(m_platformerXVelocity); if ( v6 < v51 ) goto LABEL_167; if ( a1->m_isPlatformer && (v51 < 0.00999999978 || m_platformerXVelocity < 0.0 && v23 || m_platformerXVelocity > 0.0 && v9 < 0.0) ) { a1->m_maybeHasStopped = 0; a1->m_affectedByForces = 0; a1->m_maybeGoingCorrectSlopeDirection = 0; a1->m_isMoving = 0; goto LABEL_109; } LABEL_105: if ( !a1->m_maybeHasStopped ) goto LABEL_109; m_xVelocityRelated = a1->m_xVelocityRelated; v53 = v16 * (m_xVelocityRelated * -v28); if ( a1->m_isOnIce || a1->m_isMoving ) { v54 = m_xVelocityRelated + v53 * 0.150000006; a1->m_xVelocityRelated = v54; if ( fabsf(v54) >= 1.0 ) goto LABEL_109; } else { v80 = m_xVelocityRelated + v53 * 1.0; a1->m_xVelocityRelated = v80; if ( fabsf(v80) >= 1.0 ) goto LABEL_109; } a1->m_maybeHasStopped = 0; LABEL_109: if ( a1->m_isDashing ) { LABEL_110: a1->m_platformerXVelocity = v6; goto LABEL_111; } LABEL_177: m_isGoingLeft = a1->m_isGoingLeft; if ( m_isGoingLeft < v21 ) { PlayerObject::doReversePlayer(a1, 1); } else { if ( !m_holdingRight || !a1->m_isGoingLeft ) goto LABEL_111; PlayerObject::doReversePlayer(a1, 0); } if ( a1->m_isGoingLeft != m_isGoingLeft ) { PlayerObject::exitPlatformerAnimateJump(a1); if ( !PlayerObject::isInNormalMode(a1) || a1->m_isRotating ) { if ( a1->m_isShip || a1->m_isBird ) { setRotation = a1->setRotation; v93 = a1->getRotation(a1); setRotation(a1, -v93); } } else { a1->getRotation(a1); if ( a1->m_isOnSlope ) v72 = v72 - a1->m_slopeRotation * 57.2957802; v73 = fabsf(v72); if ( v73 > 45.0 && v73 < 135.0 || v73 > 225.0 && v73 < 315.0 ) { v74 = a1->setRotation; v75 = a1->getRotation(a1); v74(a1, v75 + 180.0); } } } LABEL_111: if ( PlayerObject::isInNormalMode(a1) ) { if ( a1->m_platformerXVelocity == 0.0 || a1->m_isRotating >= m_platformerMovingRight || fabs(a1->m_yVelocity) <= 1.0 ) { if ( !a1->m_isOnSlope && (m_platformerMovingRight == 0) > (unsigned int)a1->m_wasOnSlope && !a1->m_isOnGround2 && !a1->m_isRotating && (int)a1->getRotation(a1) % 90 ) { v91 = PlayerObject::convertToClosestRotation(a1, 0.0); PlayerObject::updateRotation(a1, a2, v91); } } else { PlayerObject::runRotateAction(a1, 1, 10); PlayerObject::exitPlatformerAnimateJump(a1); } } if ( m_platformerMovingLeft || !a1->m_isOnGround2 ) { m_totalTime = a1->m_totalTime; a1->m_somethingPlayerSpeedTime = m_totalTime; } else if ( a1->m_totalTime - a1->m_somethingPlayerSpeedTime > a1->m_playerSpeedAC ) { v87 = rand(); v88 = a1->m_isRobot; v89 = a1->m_totalTime; a1->m_somethingPlayerSpeedTime = v89; a1->m_playerSpeedAC = (float)((float)((float)v87 * 4.6566e-10) * 10.0) + 5.0; if ( v88 ) { v122 = a1->m_robotSprite; sub_D153B8((int)&v152, "idle02"); CCAnimatedSprite::runAnimation((__int64)v122, (__int64)&v152); v123 = (char *)v152 - 24; if ( (char *)v152 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v124 = (unsigned int *)((char *)v152 - 8); do v125 = __ldaxr(v124); while ( __stlxr(v125 - 1, v124) ); } else { v125 = *((_DWORD *)v152 - 2); *((_DWORD *)v152 - 2) = v125 - 1; } if ( v125 <= 0 ) operator delete(v123); } } else if ( a1->m_isSpider ) { v90 = a1->m_spiderSprite; sub_D153B8((int)&v152, "idle02"); CCAnimatedSprite::runAnimation((__int64)v90, (__int64)&v152); if ( (char *)v152 - 24 != (char *)&qword_124B6B0 ) sub_620F68((char *)v152 - 24); } } if ( a1->m_isBall && !a1->m_isBallRotating2 && !a1->m_isDashing ) { if ( a1->m_isSideways ) v55 = -1.0; else v55 = 1.0; v56 = a1->m_platformerXVelocity; if ( !a1->m_isOnIce ) { v57 = v56; LABEL_127: v58 = (float)((float)(v55 * (float)((float)(v57 * a2) * (float)PlayerObject::flipMod(a1))) * 2.8); if ( a1->m_isOnSlope ) { m_slopeRotation = a1->m_slopeRotation; v58 = v58 / cosf(m_slopeRotation); } v60 = a1->setRotation; v61 = a1->getRotation(a1) + v58; v60(a1, v61); goto LABEL_130; } m_xVelocityRelated2 = a1->m_xVelocityRelated2; if ( v56 < 0.0 && v21 && m_xVelocityRelated2 > 0.0 || v56 > 0.0 && m_holdingRight && m_xVelocityRelated2 < 0.0 ) goto LABEL_262; if ( m_xVelocityRelated2 <= 0.0 ) { if ( m_xVelocityRelated2 >= 0.0 ) { v95 = 0.1; goto LABEL_263; } v96 = m_xVelocityRelated2; v97 = m_xVelocityRelated2; if ( v56 < m_xVelocityRelated2 ) { LABEL_262: v95 = 0.2; LABEL_263: if ( m_xVelocityRelated2 <= 0.0 ) { LABEL_333: if ( m_xVelocityRelated2 >= 0.0 ) goto LABEL_268; v97 = m_xVelocityRelated2; LABEL_320: if ( v56 < v97 ) { if ( v21 ) { v95 = 0.3; goto LABEL_269; } LABEL_288: if ( !m_holdingRight ) { if ( a1->m_platformerMovingLeft || v56 < m_xVelocityRelated2 ) goto LABEL_269; if ( !a1->m_platformerMovingRight && v56 <= m_xVelocityRelated2 ) { if ( m_xVelocityRelated2 <= 0.0 ) { if ( m_xVelocityRelated2 < 0.0 ) { v135 = (float)(a2 * v95) * 0.5; if ( (float)-m_xVelocityRelated2 <= v135 ) v135 = -m_xVelocityRelated2; m_xVelocityRelated2 = m_xVelocityRelated2 + v135; a1->m_xVelocityRelated2 = m_xVelocityRelated2; } } else { v126 = (float)(a2 * v95) * 0.5; if ( v126 >= m_xVelocityRelated2 ) v126 = a1->m_xVelocityRelated2; m_xVelocityRelated2 = m_xVelocityRelated2 - v126; a1->m_xVelocityRelated2 = m_xVelocityRelated2; } goto LABEL_270; } } m_xVelocityRelated2 = m_xVelocityRelated2 + (float)(a2 * v95); a1->m_xVelocityRelated2 = m_xVelocityRelated2; goto LABEL_270; } LABEL_268: if ( v21 ) { LABEL_269: m_xVelocityRelated2 = m_xVelocityRelated2 - (float)(a2 * v95); a1->m_xVelocityRelated2 = m_xVelocityRelated2; LABEL_270: v57 = cocos2d::clampf(m_xVelocityRelated2, -5.0, 5.0); a1->m_xVelocityRelated2 = v57; goto LABEL_127; } goto LABEL_288; } v96 = m_xVelocityRelated2; LABEL_265: if ( v56 > v96 && m_holdingRight ) { v95 = 0.3; goto LABEL_268; } goto LABEL_333; } } else { v96 = m_xVelocityRelated2; v97 = m_xVelocityRelated2; if ( v56 > m_xVelocityRelated2 ) goto LABEL_347; if ( m_xVelocityRelated2 >= 0.0 ) { LABEL_274: v95 = 0.1; goto LABEL_265; } if ( v56 < v96 ) { LABEL_347: v95 = 0.2; goto LABEL_265; } } if ( m_xVelocityRelated2 <= 0.0 ) { v95 = 0.1; goto LABEL_320; } goto LABEL_274; } LABEL_130: if ( !a1->m_isOnIce ) { v62 = a1->m_platformerXVelocity; a1->m_xVelocityRelated2 = v62; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source