// // PlayerObject::updateJump from 0x444690 to 0x4454d2 (3650 bytes) // // 2 xrefs: // > PlayerObject::update @ 0x448bfe // > PlayerObject::pushButton @ 0x44a1e4 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:48:29 +0000 // int __fastcall PlayerObject::updateJump(PlayerObject *this, float a2) { __int64 v2; // d0 float v3; // s16 int v6; // r6 int v7; // r8 float v8; // s15 int v9; // r7 unsigned int v10; // r0 int v11; // r9 int v12; // s15 int v13; // r7 double v14; // d9 float v15; // s17 float *v16; // r10 float v17; // s19 float v18; // s20 bool v19; // zf float v20; // s19 int v21; // r2 int v22; // r6 _BOOL4 v23; // r8 int result; // r0 int v25; // r1 float v26; // s17 int v27; // r8 int v28; // r3 double v29; // d6 double v30; // d7 int v31; // s15 double v32; // r0 int v33; // r0 float v34; // r1 float v35; // r2 int v36; // r3 float v37; // s16 double *v38; // r6 float v39; // s16 double v40; // r0 float v41; // s15 double v42; // r0 double v43; // r2 int v44; // r9 int v45; // r2 PlayerObject *v46; // r0 int v47; // r1 GameManager *v48; // r0 float v49; // s16 double v50; // d6 int v51; // s15 double v52; // r0 int v53; // s15 double v54; // r0 int v55; // s15 double v56; // r0 double v57; // r0 double v58; // d6 double v59; // r2 double v60; // d6 int v62; // r3 int v63; // r7 int v64; // r3 int v65; // r7 float v66; // s13 double *v67; // r6 int v68; // r1 double v69; // d5 float v70; // s14 float v71; // s12 float v72; // s18 float v73; // s16 int v74; // s15 double v75; // r0 double v76; // r0 int v77; // r2 PlayerObject *v78; // r0 int v79; // r1 int v80; // r7 float v81; // s17 double v82; // r0 double v83; // d7 double v84; // r0 float v85; // s13 float v86; // s17 double v87; // r0 double v88; // r2 float v89; // s17 float v90; // s18 float v91; // s16 int v92; // s15 double v93; // r0 int v94; // r8 float v95; // s17 double v96; // r0 float v97; // s21 float v98; // s18 int v99; // s15 double v100; // r0 int v101; // s15 double v102; // r0 float v103; // s14 float v104; // s15 float v105; // s14 double v106; // d8 int v107; // s15 double v108; // r0 double v109; // d8 double v110; // d7 double v111; // d7 double v112; // r2 double v113; // r0 double v114; // r2 double v115; // r2 int v116; // r3 int v117; // r3 int v118; // r7 int v119; // r7 int v120; // [sp+0h] [bp-18h] int v121; // [sp+0h] [bp-18h] int v122; // [sp+0h] [bp-18h] int v123; // [sp+8h] [bp-10h] BYREF int v124; // [sp+Ch] [bp-Ch] int v125; // [sp+10h] [bp-8h] v6 = *((unsigned __int8 *)this + 2209); v7 = *((unsigned __int8 *)this + 2208); if ( *((_BYTE *)this + 2209) && *((_BYTE *)this + 2208) ) { if ( *((_BYTE *)this + 2210) ) v7 = 0; else v6 = 0; } if ( *((_BYTE *)this + 2320) ) { if ( *((_BYTE *)this + 1944) ) { v8 = fabsf(*((float *)this + 357) * 57.296); if ( v8 >= 80.0 || v8 >= 40.0 && *(_BYTE *)(*((_DWORD *)this + 350) + 1117) ) *((_BYTE *)this + 1961) = 0; } } if ( *((_BYTE *)this + 1961) ) v9 = 213; else v9 = 0; *((_DWORD *)this + 480) = v9; v10 = rand(); v11 = *((unsigned __int8 *)this + 1901); v12 = (int)(float)(vcvts_n_f32_s32(v10, 0x1Fu) * 1000.0); *((_DWORD *)this + 479) = v12; *((_DWORD *)this + 478) = v12 + v9; v13 = *((unsigned __int8 *)this + 1961); v14 = *((double *)this + 197); if ( *((_BYTE *)this + 1957) && !*((_BYTE *)this + 1902) ) v11 = 0; if ( *((_BYTE *)this + 1955) || PlayerObject::isFlying(this) || *((_BYTE *)this + 1958) ) v15 = 0.9582; else v15 = v14; v16 = (float *)((char *)this + 2008); v17 = *((float *)this + 585); v18 = 1.0; v19 = v17 == 1.0; if ( v17 != 1.0 ) v3 = v15 * v17; v20 = 0.8; if ( v19 ) v3 = v15; if ( *((float *)this + 502) == 1.0 ) v20 = 1.0; if ( PlayerObject::isFlying(this) ) { v66 = *v16; v67 = (double *)((char *)this + 1928); v68 = *((unsigned __int8 *)this + 1959); v69 = *((double *)this + 241); if ( *v16 != 1.0 ) v20 = 0.85; v70 = 8.0 / v20; v71 = -6.4 / v20; if ( *((_BYTE *)this + 1959) ) { if ( (v69 > 0.0 || v69 <= (float)-v70) && (v69 < 0.0 || v69 >= (float)-v71) ) { LABEL_163: if ( *((_BYTE *)this + 1953) ) { if ( *((_BYTE *)this + 1901) && !*((_BYTE *)this + 1850) ) { v72 = -1.0; } else { if ( *((_BYTE *)this + 1850) ) { if ( v68 ) { v72 = 0.8; if ( *v67 > 0.0 ) v72 = -1.0; } else { v72 = 0.8; if ( *v67 < 0.0 ) v72 = -1.0; } } else { v72 = 0.8; } if ( !*((_BYTE *)this + 1901) && !PlayerObject::playerIsFallingBugged(this) ) v72 = 1.2; } if ( *((_BYTE *)this + 2320) ) v3 = v3 * 0.8; if ( v72 >= 0.0 ) v15 = v3; if ( *((_BYTE *)this + 1901) && PlayerObject::playerIsFallingBugged(this) ) v73 = 0.5; else v73 = 0.4; v74 = PlayerObject::flipMod(this); LODWORD(v75) = this; PlayerObject::addToYVelocity( v75, (float)-(float)((float)((float)((float)((float)(v15 * a2) * (float)v74) * v72) * v73) / v20), 64); v77 = *((unsigned __int8 *)this + 1901); if ( *((_BYTE *)this + 1901) ) *((_BYTE *)this + 2036) = 0; if ( !*((_DWORD *)this + 610) || *((unsigned __int8 *)this + 1903) == v77 ) goto LABEL_236; v78 = this; if ( v77 ) { v79 = 16; v77 = 0; } else { v79 = 17; } LABEL_234: PlayerObject::gameEventTriggered(v78, v79, v77); LABEL_236: v89 = 0.8; LABEL_237: if ( !*((_BYTE *)this + 1850) && !*((_BYTE *)this + 1956) ) { v111 = *v67; if ( *((_BYTE *)this + 1959) ) { LODWORD(v76) = this; if ( v111 < (float)(-8.0 / v20) ) v115 = (float)(-8.0 / v20); else v115 = *v67; PlayerObject::setYVelocity(v76, v115, 15); LODWORD(v113) = this; v122 = 16; if ( *v67 > (float)((float)(v89 * 8.0) / v20) ) v114 = (float)((float)(v89 * 8.0) / v20); else v114 = *v67; } else { LODWORD(v76) = this; if ( v111 < (float)((float)(v89 * -8.0) / v20) ) v112 = (float)((float)(v89 * -8.0) / v20); else v112 = *v67; PlayerObject::setYVelocity(v76, v112, 13); LODWORD(v113) = this; v122 = 14; if ( *v67 > (float)(8.0 / v20) ) v114 = (float)(8.0 / v20); else v114 = *v67; } PlayerObject::setYVelocity(v113, v114, v122); } result = PlayerObject::playerIsFallingBugged(this); if ( result ) *((_BYTE *)this + 2052) = 0; goto LABEL_255; } v80 = *((unsigned __int8 *)this + 1954); if ( !*((_BYTE *)this + 1954) ) { v94 = *((unsigned __int8 *)this + 1964); if ( *((_BYTE *)this + 1964) ) { if ( *((_BYTE *)this + 1902) ) { if ( *((_BYTE *)this + 1901) ) { *((_BYTE *)this + 1902) = v80; v95 = *v67; PlayerObject::flipGravity((unsigned __int8 *)this, v68 ^ 1, 1); LODWORD(v96) = this; PlayerObject::setYVelocity(v96, (float)(v95 * 0.8), 10); if ( *((_DWORD *)this + 610) ) PlayerObject::gameEventTriggered(this, 20, v80); } } v97 = v3 * a2; v98 = 0.6; if ( *v16 == 1.0 ) v98 = 0.4; v99 = PlayerObject::flipMod(this); LODWORD(v100) = this; PlayerObject::addToYVelocity(v100, (float)-(float)(v98 * (float)(v97 * (float)v99)), 67); if ( *((_BYTE *)this + 1901) ) *((_BYTE *)this + 2036) = 0; v89 = 1.0; v20 = 1.0; goto LABEL_237; } v101 = PlayerObject::flipMod(this); LODWORD(v102) = this; v103 = (float)v101; v104 = 1.0; v105 = v103 * 8.0; if ( !*((_BYTE *)this + 1901) ) v104 = -1.0; PlayerObject::setYVelocity(v102, (float)(v105 * v104), 11); v106 = *((float *)this + 503) * *((double *)this + 195); v107 = PlayerObject::flipMod(this); LODWORD(v108) = this; v109 = v106 * (double)v107; v110 = 1.0; if ( !*((_BYTE *)this + 1901) ) v110 = -1.0; PlayerObject::setYVelocity(v108, v109 * v110, 12); if ( !*((_DWORD *)this + 610) ) goto LABEL_236; v77 = *((unsigned __int8 *)this + 1901); if ( *((unsigned __int8 *)this + 1903) == v77 ) goto LABEL_236; v78 = this; if ( *((_BYTE *)this + 1901) ) { v79 = 21; v77 = v94; } else { v79 = 22; } goto LABEL_234; } if ( !*((_BYTE *)this + 1902) || !*((_BYTE *)this + 1901) ) { LABEL_212: v89 = 0.8; v90 = 1.2; v91 = v3 * a2; if ( PlayerObject::playerIsFallingBugged(this) ) v90 = 0.8; v92 = PlayerObject::flipMod(this); LODWORD(v93) = this; PlayerObject::addToYVelocity( v93, (float)-(float)((float)((float)((float)(v91 * (float)v92) * v90) * 0.5) / v20), 66); if ( *((_BYTE *)this + 1901) ) *((_BYTE *)this + 2036) = 0; goto LABEL_237; } *((_BYTE *)this + 1902) = 0; v81 = 8.0; if ( v66 == 1.0 ) v81 = 7.0; v83 = (float)((float)(v81 * (float)PlayerObject::flipMod(this)) * v20); if ( *((_BYTE *)this + 1959) ) { if ( v83 >= *v67 ) goto LABEL_210; } else if ( v83 <= *v67 ) { LABEL_210: PlayerObject::playBurstEffect((cocos2d::CCParticleSystem **)this); if ( *((_DWORD *)this + 610) ) PlayerObject::gameEventTriggered(this, 15, 0); goto LABEL_212; } LODWORD(v82) = this; PlayerObject::setYVelocity(v82, v83, 7); if ( *((_BYTE *)this + 1945) || *((_BYTE *)this + 1944) ) { v85 = *((float *)this + 487); if ( v85 > 0.0 ) { LODWORD(v84) = this; v86 = *v67 * 1.39999998; PlayerObject::addToYVelocity(v84, (float)(v85 * 0.5), 8); LODWORD(v87) = this; if ( *v67 > v86 ) v88 = v86; else v88 = *v67; PlayerObject::setYVelocity(v87, v88, 9); } } goto LABEL_210; } } else if ( (v69 < 0.0 || v69 >= v70) && (v69 > 0.0 || v69 <= v71) ) { goto LABEL_163; } *((_BYTE *)this + 1850) = 0; goto LABEL_163; } if ( *((_BYTE *)this + 1955) || *((_BYTE *)this + 1958) || *((_BYTE *)this + 1964) ) { v18 = 0.6; } else if ( *((_BYTE *)this + 1957) ) { v18 = 0.9; } v21 = *((unsigned __int8 *)this + 2297); if ( *((_BYTE *)this + 2297) && !v6 ) goto LABEL_258; v22 = *((unsigned __int8 *)this + 2298); if ( *((_BYTE *)this + 2298) ) { if ( v7 ) { v22 = 0; goto LABEL_40; } LABEL_258: if ( *((unsigned __int8 *)this + 2299) != v21 && !*((_BYTE *)this + 1300) ) *((_DWORD *)this + 567) = *((unsigned __int8 *)this + 1300); v22 = 1; v23 = *((_DWORD *)this + 567) <= 1; goto LABEL_41; } LABEL_40: v23 = 1; LABEL_41: if ( v11 && *((_BYTE *)this + 1961) ) { if ( *((_BYTE *)this + 1958) && !*((_BYTE *)this + 1996) ) { result = PlayerObject::spiderTestJump(this, 0); goto LABEL_255; } if ( !*((_BYTE *)this + 1996) ) { v25 = *((unsigned __int8 *)this + 2320); if ( !*((_BYTE *)this + 2320) || v23 ) { *((_BYTE *)this + 2052) = 1; *((_BYTE *)this + 2036) = 0; *((_BYTE *)this + 1961) = 0; *((_BYTE *)this + 1902) = 0; *((_BYTE *)this + 1924) = 0; *((_QWORD *)this + 210) = 0; if ( !v21 && !*((_BYTE *)this + 2298) && *((int *)this + 567) > 0 ) { *((_DWORD *)this + 567) = 0; *((_QWORD *)this + 284) = *((_QWORD *)this + 266); } v26 = *((double *)this + 196); if ( *((_BYTE *)this + 1957) ) v26 = v26 * 0.5; if ( *((_DWORD *)this + 478) - *((_DWORD *)this + 479) == 213 ) { v27 = 0; } else { v27 = 1; v26 = 9999.0; *((_BYTE *)this + 1850) = 1; } if ( v25 && v22 ) { v28 = *((_DWORD *)this + 567); if ( *((_BYTE *)this + 2296) && (v29 = *((float *)this + 503) * *((double *)this + 195), v30 = fabs(*((double *)this + 275)), v30 > v29) ) { v26 = v26 + v30 / v29; } else if ( v28 > 0 ) { v26 = v26 * (float)(1.0 - (float)((float)v28 * 0.3)); } *((_DWORD *)this + 567) = v28 + 1; } v31 = PlayerObject::flipMod(this); LODWORD(v32) = this; v33 = PlayerObject::setYVelocity(v32, (float)((float)(v26 * (float)v31) * v20), 2); if ( *((_BYTE *)this + 1945) || (v36 = *((unsigned __int8 *)this + 1944), *((_BYTE *)this + 1944)) ) { v37 = *((float *)this + 487); v33 = PlayerObject::flipMod(this); if ( (float)(v37 * (float)v33) > 0.0 ) { if ( !*((_BYTE *)this + 2320) || (v36 = (int)this + 2200, fabs(*((double *)this + 275)) > 4.0) ) { v38 = (double *)((char *)this + 1928); v39 = *((double *)this + 241) * 1.39999998; v41 = COERCE_FLOAT(PlayerObject::getModifiedSlopeYVel(this)); if ( *((_BYTE *)this + 1955) ) v41 = *((float *)this + 487); LODWORD(v40) = this; PlayerObject::addToYVelocity(v40, (float)(v41 * 0.25), 60); if ( *((_BYTE *)this + 1959) ) { v120 = 4; LODWORD(v42) = this; if ( *v38 < v39 ) v43 = v39; else v43 = *v38; } else { v120 = 3; LODWORD(v42) = this; if ( *v38 > v39 ) v43 = v39; else v43 = *v38; } v33 = PlayerObject::setYVelocity(v42, v43, v120); } } } *((_BYTE *)this + 1603) = 1; sub_434688(v33, v34, v35, v36); *((_QWORD *)this + 203) = v2; result = (int)PlayerObject::incrementJumps(this); if ( *((_BYTE *)this + 1955) ) { result = (int)PlayerObject::flipGravity((unsigned __int8 *)this, *((unsigned __int8 *)this + 1959) ^ 1, 1); *((double *)this + 241) = *((double *)this + 241) * 0.600000024; *((_BYTE *)this + 1608) = 0; *((_BYTE *)this + 1901) = 0; } else if ( !*((_BYTE *)this + 1957) && !*((_BYTE *)this + 1958) ) { result = (int)PlayerObject::runRotateAction(this, 1, 11); } if ( *((_BYTE *)this + 1957) ) { v44 = *((_DWORD *)this + 433); v123 = 0; v124 = 0; v125 = 0; std::string::__init(&v123, "jump_loop", 9u); CCAnimatedSprite::tweenToAnimation(v44, (int)&v123, (cocos2d::CCDelayTime *)0x3DCCCCCD); result = std::string::~string((int)&v123); } if ( !*((_DWORD *)this + 610) ) goto LABEL_92; result = PlayerObject::isInNormalMode(this); v45 = result; if ( result ) { v46 = this; v47 = 12; v45 = 0; } else if ( *((_BYTE *)this + 1957) ) { v46 = this; v47 = 13; } else { if ( !*((_BYTE *)this + 1955) ) goto LABEL_92; v46 = this; v47 = 19; v45 = *((unsigned __int8 *)this + 1957); } result = PlayerObject::gameEventTriggered(v46, v47, v45); LABEL_92: if ( !v27 && !v13 ) { v48 = (GameManager *)GameManager::sharedState((GameManager *)result); result = GameManager::setGameVariable(v48, "0055", (_BYTE *)&dword_0 + 1); } if ( *((_BYTE *)this + 2320) ) result = (int)PlayerObject::animatePlatformerJump(this, 1.0); goto LABEL_255; } } } v49 = v3 * a2; if ( *((_BYTE *)this + 2052) ) { if ( *((_BYTE *)this + 1957) ) { if ( *((_BYTE *)this + 1901) ) { if ( !*((_BYTE *)this + 1924) ) { v50 = *((double *)this + 210); if ( v50 < 1.5 ) { *((double *)this + 210) = v50 + (float)(a2 * 0.1); v51 = PlayerObject::flipMod(this); LODWORD(v52) = this; PlayerObject::addToYVelocity(v52, (float)((float)(v49 * (float)v51) * v18), 61); } } } } v53 = PlayerObject::flipMod(this); LODWORD(v54) = this; PlayerObject::addToYVelocity(v54, (float)-(float)(v18 * (float)(v49 * (float)v53)), 62); if ( *((_BYTE *)this + 1957) && *((_BYTE *)this + 1924) && !*((_BYTE *)this + 1904) && *((_DWORD *)this + 610) ) PlayerObject::gameEventTriggered(this, 14, *((unsigned __int8 *)this + 1904)); result = PlayerObject::playerIsFallingBugged(this); if ( result || *((_BYTE *)this + 2320) && (result = PlayerObject::playerIsMovingUp(this)) == 0 ) { *((_BYTE *)this + 1602) = 1; v116 = *(_DWORD *)this; *((_BYTE *)this + 2052) = 0; *((_BYTE *)this + 2036) = 0; result = (*(int (__fastcall **)(PlayerObject *))(v116 + 96))(this); *((_DWORD *)this + 614) = *(_DWORD *)(result + 4); v117 = *((unsigned __int8 *)this + 1957); if ( *((_BYTE *)this + 1957) ) { v118 = *((_DWORD *)this + 433); v123 = 0; v124 = 0; v125 = 0; std::string::__init(&v123, "fall_loop", 9u); CCAnimatedSprite::tweenToAnimation(v118, (int)&v123, (cocos2d::CCDelayTime *)0x3DCCCCCD); result = std::string::~string((int)&v123); if ( !*((_BYTE *)this + 1924) && *((_DWORD *)this + 610) ) result = PlayerObject::gameEventTriggered(this, 14, *((unsigned __int8 *)this + 1924)); } else if ( *((_BYTE *)this + 1958) ) { v119 = *((_DWORD *)this + 434); v123 = *((unsigned __int8 *)this + 1957); v124 = v117; v125 = v117; std::string::__init(&v123, "fall_loop", 9u); CCAnimatedSprite::tweenToAnimation(v119, (int)&v123, (cocos2d::CCDelayTime *)0x3DCCCCCD); result = std::string::~string((int)&v123); } } goto LABEL_255; } if ( *((_BYTE *)this + 1961) ) *((_DWORD *)this + 614) = *(_DWORD *)((*(int (__fastcall **)(PlayerObject *))(*(_DWORD *)this + 96))(this) + 4); if ( PlayerObject::playerIsFallingBugged(this) && (!*((_BYTE *)this + 2320) || *((double *)this + 266) - *((double *)this + 255) >= 0.0500000045 || !v23) ) { *((_BYTE *)this + 1961) = 0; } v55 = PlayerObject::flipMod(this); LODWORD(v56) = this; PlayerObject::addToYVelocity(v56, (float)-(float)(v18 * (float)(v49 * (float)v55)), 63); v58 = *((double *)this + 241); if ( *((_BYTE *)this + 1959) ) { v121 = 6; LODWORD(v57) = this; if ( v58 <= 15.0 ) v59 = *((double *)this + 241); else v59 = 15.0; } else { LODWORD(v57) = this; v121 = 5; if ( v58 >= -15.0 ) v59 = *((double *)this + 241); else v59 = -15.0; } PlayerObject::setYVelocity(v57, v59, v121); if ( PlayerObject::playerIsFalling(this, -0.25) && !*((_BYTE *)this + 1955) && !*((_BYTE *)this + 1958) && !*((_BYTE *)this + 1957) && !*((_BYTE *)this + 1480) && !*((_BYTE *)this + 1944) && !*((_BYTE *)this + 1384) && (!*((_BYTE *)this + 2320) || !*((_BYTE *)this + 2036)) ) { PlayerObject::runRotateAction(this, 1, 12); } result = PlayerObject::playerIsFallingBugged(this); if ( result ) { v60 = *((double *)this + 241); if ( *((_BYTE *)this + 1959) ? v60 > 4.0 : v60 < -4.0 ) { if ( *((_BYTE *)this + 1957) && *((_BYTE *)this + 2036) && (v62 = *((unsigned __int8 *)this + 1740), !*((_BYTE *)this + 1740)) ) { v63 = *((_DWORD *)this + 433); v123 = *((unsigned __int8 *)this + 1740); v124 = v62; v125 = v62; std::string::__init(&v123, "fall_loop", 9u); CCAnimatedSprite::tweenToAnimation(v63, (int)&v123, (cocos2d::CCDelayTime *)0x3DCCCCCD); } else { if ( !*((_BYTE *)this + 1958) ) goto LABEL_149; if ( !*((_BYTE *)this + 2036) ) goto LABEL_149; v64 = *((unsigned __int8 *)this + 1740); if ( *((_BYTE *)this + 1740) ) goto LABEL_149; v65 = *((_DWORD *)this + 434); v123 = *((unsigned __int8 *)this + 1740); v124 = v64; v125 = v64; std::string::__init(&v123, "fall_loop", 9u); CCAnimatedSprite::tweenToAnimation(v65, (int)&v123, (cocos2d::CCDelayTime *)0x3DCCCCCD); } result = std::string::~string((int)&v123); LABEL_149: *((_BYTE *)this + 2036) = 0; } } LABEL_255: *((_BYTE *)this + 1903) = *((_BYTE *)this + 1901); *((_BYTE *)this + 1904) = *((_BYTE *)this + 1924); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source