// // PlayerObject::setPosition from 0x6246f8 to 0x6252c0 (3016 bytes) // // 2 xrefs: // > @ 0x5db40 // > @ 0x1152798 // // 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::setPosition(PlayerObject *a1, const cocos2d::CCPoint *a2) { const cocos2d::CCPoint *v4; // x0 float v5; // s0 cocos2d::CCNode *v6; // x27 float v7; // s1 cocos2d::CCNode *v8; // x0 cocos2d::CCParticleSystemQuad *m_trailingParticles; // x26 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCNode *v11; // x0 cocos2d::CCParticleSystemQuad *m_shipClickParticles; // x24 void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 const cocos2d::CCPoint *v14; // x0 cocos2d::CCParticleSystemQuad *m_ufoClickParticles; // x24 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 const cocos2d::CCPoint *v17; // x0 cocos2d::CCParticleSystemQuad *m_dashParticles; // x24 void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 const cocos2d::CCPoint *v20; // x0 PlayerFireBoostSprite *m_robotFire; // x26 CCSpritePart *m_footSprite; // x24 void (__fastcall *v23)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCNode *v24; // x28 float *v25; // x0 PlayerFireBoostSprite *v26; // x26 CCSpritePart *v27; // x0 float (__fastcall *getRotation)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *setRotation)(cocos2d::CCSprite *__hidden, float); // x24 float v30; // s9 float v31; // s8 float v32; // s0 cocos2d::CCParticleSystemQuad *m_robotBurstParticles; // x24 void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCNode *v35; // x27 cocos2d::CCNode *v36; // x28 const cocos2d::CCPoint *v37; // x0 cocos2d::CCParticleSystemQuad *m_swingBurstParticles1; // x24 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCNode *v40; // x27 cocos2d::CCNode *v41; // x28 const cocos2d::CCPoint *v42; // x0 cocos2d::CCParticleSystemQuad *m_swingBurstParticles2; // x24 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCNode *v45; // x27 cocos2d::CCNode *v46; // x28 const cocos2d::CCPoint *v47; // x0 int v48; // w0 int v49; // w26 int v50; // w26 float v51; // s8 int v52; // w0 float m_vehicleSize; // s8 float v54; // s11 float v55; // s9 double v56; // d12 double m_slopeAngleRadians; // d10 double v58; // d8 float v59; // s0 int v60; // w0 double v61; // d0 double v62; // d10 float v63; // s10 double v64; // d9 int v65; // w24 double v66; // d8 int v67; // w0 float v68; // s0 float v69; // s1 float x; // w1 cocos2d::CCParticleSystemQuad *m_playerGroundParticles; // x24 void (__fastcall *v72)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 int v73; // w0 float v74; // w1 cocos2d::CCMotionStreak *v75; // x24 void (__fastcall *v76)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // x25 const cocos2d::CCPoint *v77; // x26 cocos2d::CCMotionStreak *m_shipStreak; // x25 void (__fastcall *v79)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCNode *v80; // x27 cocos2d::CCNode *v81; // x28 float v82; // s8 float v83; // s0 float v84; // s1 float v85; // s0 HardStreak *m_waveTrail; // x21 const cocos2d::CCPoint *v87; // x0 float v88; // s0 float v89; // s1 HardStreak *v90; // x20 PlayerObject *v91; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 __int64 v94; // x0 float v95; // s8 int v96; // w0 cocos2d::CCMotionStreak *v97; // x22 void (__fastcall *v98)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // x24 const cocos2d::CCPoint *v99; // x0 float y; // w0 cocos2d::CCParticleSystemQuad *v101; // x26 void (__fastcall *v102)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 float v103; // s8 float v104; // s0 float v105; // s8 int v106; // w0 float v107; // w1 cocos2d::CCParticleSystemQuad *m_vehicleGroundParticles; // x24 const cocos2d::CCPoint *v109; // x0 void (__fastcall *v110)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 long double v111; // q0 cocos2d::CCParticleSystemQuad *v112; // x24 void (__fastcall *setGravity)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // x25 int v114; // w0 long double v115; // q0 cocos2d::CCNode *m_mainLayer; // x26 float v117; // s0 float v118; // s1 cocos2d::CCMotionStreak *m_regularTrail; // x24 void (__fastcall *v120)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCNode *v121; // x26 cocos2d::CCNode *v122; // x27 cocos2d::CCMotionStreak *v123; // x21 void (__fastcall *v124)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // x22 const cocos2d::CCPoint *v125; // x0 const cocos2d::CCPoint *v126; // x0 float v127; // s0 float v128; // s1 const cocos2d::CCPoint *v129; // [xsp+98h] [xbp+98h] float v130; // [xsp+A0h] [xbp+A0h] cocos2d::CCPoint v131; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCPoint v132; // [xsp+C0h] [xbp+C0h] BYREF cocos2d::CCPoint v133; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCPoint v134; // [xsp+D0h] [xbp+D0h] BYREF cocos2d::CCPoint v135; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCPoint v136; // [xsp+E0h] [xbp+E0h] BYREF cocos2d::CCPoint v137; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCPoint v138; // [xsp+F0h] [xbp+F0h] BYREF cocos2d::CCPoint v139; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCPoint v140; // [xsp+100h] [xbp+100h] BYREF cocos2d::CCPoint v141; // 0:kr00_8.8 cocos2d::CCPoint v142; // 0:kr08_8.8 cocos2d::CCPoint v143; // 0:kr18_8.8 cocos2d::CCPoint v144; // 0:kr28_8.8 cocos2d::CCPoint v145; // 0:kr38_8.8 cocos2d::CCPoint v146; // 0:kr48_8.8 cocos2d::CCPoint v147; // 0:kr58_8.8 cocos2d::CCPoint v148; // 0:kr68_8.8 a1->m_isObjectRectDirty = 1; a1->m_isOrientedBoxDirty = 1; GameObject::setPosition(a1, a2); cocos2d::CCPoint::CCPoint(&v131); v4 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); cocos2d::CCPoint::CCPoint(&v132, v4); if ( a1->m_isSwing ) { m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v139, a1->m_vehicleSize * -10.0, 0.0); v8 = m_mainLayer; } else { if ( a1->m_isPlatformer && a1->m_isShip ) { v7 = -18.0; v6 = a1->m_mainLayer; v5 = a1->m_vehicleSize * -10.0; } else if ( a1->m_isBird ) { v5 = 0.0; v6 = a1->m_mainLayer; v7 = -3.0; } else { v7 = -4.0; v6 = a1->m_mainLayer; v5 = a1->m_vehicleSize * -12.0; } cocos2d::CCPoint::CCPoint(&v138, v5, v7); cocos2d::CCPoint::operator+(&v139, &v132, &v138); v8 = v6; } v141 = cocos2d::CCNode::convertToWorldSpace(v8, &v139); cocos2d::CCPoint::operator=(&v131, v141.x, v141.y); if ( a1->m_trailingParticles->getParent(a1->m_trailingParticles) ) { m_trailingParticles = a1->m_trailingParticles; setPosition = m_trailingParticles->setPosition; v11 = m_trailingParticles->getParent(m_trailingParticles); v142 = cocos2d::CCNode::convertToNodeSpace(v11, &v131); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCPoint *, float, float))setPosition)( m_trailingParticles, &v140, v142.x, v142.y); } m_shipClickParticles = a1->m_shipClickParticles; v13 = m_shipClickParticles->setPosition; v14 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); v13(m_shipClickParticles, v14); m_ufoClickParticles = a1->m_ufoClickParticles; v16 = m_ufoClickParticles->setPosition; v17 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); v16(m_ufoClickParticles, v17); m_dashParticles = a1->m_dashParticles; v19 = m_dashParticles->setPosition; v20 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); v19(m_dashParticles, v20); m_robotFire = a1->m_robotFire; m_footSprite = a1->m_robotSprite->m_footSprite; v23 = m_robotFire->setPosition; v24 = m_robotFire->getParent(m_robotFire); v25 = (float *)m_footSprite->getContentSize(m_footSprite); cocos2d::CCPoint::CCPoint(&v138, *v25 * 0.5, 2.5); cocos2d::CCNode::convertToWorldSpace(m_footSprite, &v138); v143 = cocos2d::CCNode::convertToNodeSpace(v24, &v139); ((void (__fastcall *)(PlayerFireBoostSprite *, cocos2d::CCPoint *, float, float))v23)( m_robotFire, &v140, v143.x, v143.y); v26 = a1->m_robotFire; v27 = m_footSprite; getRotation = m_footSprite->getRotation; setRotation = v26->setRotation; v30 = getRotation(v27); v31 = a1->m_robotSprite->m_paSprite->getScaleX(a1->m_robotSprite->m_paSprite); v32 = a1->m_robotSprite->m_paSprite->getRotation(a1->m_robotSprite->m_paSprite); setRotation(v26, v32 + (float)(v30 * v31)); if ( a1->m_robotBurstParticles->getParent(a1->m_robotBurstParticles) ) { m_robotBurstParticles = a1->m_robotBurstParticles; v34 = m_robotBurstParticles->setPosition; v35 = m_robotBurstParticles->getParent(m_robotBurstParticles); v36 = a1->m_robotFire->getParent(a1->m_robotFire); v37 = a1->m_robotFire->getPosition(a1->m_robotFire); cocos2d::CCNode::convertToWorldSpace(v36, v37); v144 = cocos2d::CCNode::convertToNodeSpace(v35, &v139); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCPoint *, float, float))v34)( m_robotBurstParticles, &v140, v144.x, v144.y); } if ( a1->m_swingBurstParticles1->getParent(a1->m_swingBurstParticles1) ) { m_swingBurstParticles1 = a1->m_swingBurstParticles1; v39 = m_swingBurstParticles1->setPosition; v40 = m_swingBurstParticles1->getParent(m_swingBurstParticles1); v41 = a1->m_swingFireBottom->getParent(a1->m_swingFireBottom); v42 = a1->m_swingFireBottom->getPosition(a1->m_swingFireBottom); cocos2d::CCNode::convertToWorldSpace(v41, v42); v145 = cocos2d::CCNode::convertToNodeSpace(v40, &v139); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCPoint *, float, float))v39)( m_swingBurstParticles1, &v140, v145.x, v145.y); } if ( a1->m_swingBurstParticles2->getParent(a1->m_swingBurstParticles2) ) { m_swingBurstParticles2 = a1->m_swingBurstParticles2; v44 = m_swingBurstParticles2->setPosition; v45 = m_swingBurstParticles2->getParent(m_swingBurstParticles2); v46 = a1->m_swingFireTop->getParent(a1->m_swingFireTop); v47 = a1->m_swingFireTop->getPosition(a1->m_swingFireTop); cocos2d::CCNode::convertToWorldSpace(v46, v47); v146 = cocos2d::CCNode::convertToNodeSpace(v45, &v139); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCPoint *, float, float))v44)( m_swingBurstParticles2, &v140, v146.x, v146.y); } v48 = PlayerObject::flipMod(a1); if ( a1->m_isSwing ) v49 = 1; else v49 = v48; v50 = (v49 ^ -!a1->m_isOnGround3) + !a1->m_isOnGround3; cocos2d::CCPoint::CCPoint(&v133, 0.0, 0.0); if ( a1->m_isRobot ) { cocos2d::CCPoint::CCPoint(&v140, 0.0, -2.0); cocos2d::CCPoint::operator=(&v133, v117, v118); } v51 = (float)(v133.x - 10.0) * a1->m_vehicleSize; v52 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v134, v51 * (float)v52, (float)((float)(v133.y - 13.0) * (float)v50) * a1->m_vehicleSize); if ( a1->m_isOnSlope ) { m_vehicleSize = a1->m_vehicleSize; v54 = m_vehicleSize * a1->m_height; v55 = m_vehicleSize * 20.0; if ( a1->m_slopeSlidingMaybeRotated ) { m_slopeAngleRadians = a1->m_slopeAngleRadians; v56 = 1.0; } else { v56 = -1.0; m_slopeAngleRadians = -a1->m_slopeAngleRadians; } v58 = (float)(sqrtf((float)(v54 * v54) + (float)(v55 * v55)) * 0.5); v59 = atanf(v54 / v55); v60 = a1->m_slopeSlidingMaybeRotated ^ a1->m_isGoingLeft; if ( a1->m_isUpsideDown ) v60 ^= 1u; v61 = v59; if ( v60 ) v62 = m_slopeAngleRadians + v61 * v56; else v62 = m_slopeAngleRadians - v61 * v56; v63 = v62; v64 = cosf(v63) * v58; v65 = PlayerObject::reverseMod(a1); v66 = sinf(v63) * v58; v67 = PlayerObject::reverseMod(a1); v68 = v64 * (double)v65; v69 = v66 * (double)v67; cocos2d::CCPoint::CCPoint(&v139, v68, v69); if ( a1->m_isSideways ) { x = v139.x; v139.x = v139.y; v139.y = x; } m_playerGroundParticles = a1->m_playerGroundParticles; v72 = m_playerGroundParticles->setPosition; cocos2d::CCPoint::operator-(&v140, a2, &v139); v72(m_playerGroundParticles, &v140); LABEL_30: if ( !a1->m_unkA29 ) goto LABEL_31; goto LABEL_52; } if ( !a1->m_isOnGround2 ) goto LABEL_30; if ( a1->m_isSideways ) { y = v134.y; v134.y = v134.x; v134.x = y; } v101 = a1->m_playerGroundParticles; v102 = v101->setPosition; cocos2d::CCPoint::operator+(&v140, a2, &v134); v102(v101, &v140); if ( a1->m_unkA29 ) { LABEL_52: v103 = a1->m_vehicleSize; v104 = v103 * (float)PlayerObject::reverseMod(a1); v105 = a1->m_vehicleSize * -15.0; v130 = v104; v106 = PlayerObject::flipMod(a1); cocos2d::CCPoint::CCPoint(&v139, v130, v105 * (float)v106); if ( a1->m_isSideways ) { v107 = v139.x; v139.x = v139.y; v139.y = v107; } m_vehicleGroundParticles = a1->m_vehicleGroundParticles; v109 = a2; v110 = m_vehicleGroundParticles->setPosition; cocos2d::CCPoint::operator+(&v140, v109, &v139); v110(m_vehicleGroundParticles, &v140); if ( a1->m_isUpsideDown ) LODWORD(v111) = 1133576192; else LODWORD(v111) = 1121714176; a1->m_vehicleGroundParticles->setAngle(a1->m_vehicleGroundParticles, v111); v112 = a1->m_vehicleGroundParticles; setGravity = v112->setGravity; v114 = PlayerObject::flipMod(a1); cocos2d::CCPoint::CCPoint(&v140, -350.0, (float)(-300 * v114)); setGravity(v112, &v140); LODWORD(v115) = 0; if ( a1->m_isSideways ) LODWORD(v115) = 1119092736; a1->m_vehicleGroundParticles->setRotation(a1->m_vehicleGroundParticles, v115); } LABEL_31: if ( a1->m_isShip ) { if ( a1->m_isPlatformer ) { m_regularTrail = a1->m_regularTrail; v120 = m_regularTrail->setPosition; v121 = m_regularTrail->getParent(m_regularTrail); v122 = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v138, a1->m_vehicleSize * -10.0, a1->m_vehicleSize * -12.0); cocos2d::CCNode::convertToWorldSpace(v122, &v138); v148 = cocos2d::CCNode::convertToNodeSpace(v121, &v139); ((void (__fastcall *)(cocos2d::CCMotionStreak *, cocos2d::CCPoint *, float, float))v120)( m_regularTrail, &v140, v148.x, v148.y); goto LABEL_38; } v73 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v135, (float)(4 * v73), 0.0); if ( a1->m_isSideways ) { v74 = v135.x; v135.x = v135.y; v135.y = v74; } v75 = a1->m_regularTrail; v76 = v75->setPosition; v77 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); cocos2d::CCPoint::CCPoint(&v139, v135.x, v135.y); cocos2d::CCPoint::operator+(&v140, v77, &v139); v76(v75, &v140); if ( a1->m_shipStreak ) { offsetForStreak(a1->m_shipStreakType, &v136); m_shipStreak = a1->m_shipStreak; v79 = m_shipStreak->setPosition; v80 = a1->m_regularTrail->getParent(a1->m_regularTrail); v81 = a1->m_mainLayer; v129 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); v82 = v136.x; v83 = (float)PlayerObject::reverseMod(a1); v84 = v136.y; v85 = v82 * v83; LABEL_37: cocos2d::CCPoint::CCPoint(&v137, v85, v84); cocos2d::CCPoint::operator+(&v138, v129, &v137); cocos2d::CCNode::convertToWorldSpace(v81, &v138); v147 = cocos2d::CCNode::convertToNodeSpace(v80, &v139); ((void (__fastcall *)(cocos2d::CCMotionStreak *, cocos2d::CCPoint *, float, float))v79)( m_shipStreak, &v140, v147.x, v147.y); } } else { if ( a1->m_isBird ) { if ( !a1->m_regularTrail->getParent(a1->m_regularTrail) ) goto LABEL_38; m_shipStreak = a1->m_regularTrail; v79 = m_shipStreak->setPosition; v80 = m_shipStreak->getParent(m_shipStreak); v81 = a1->m_mainLayer; v126 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); v85 = 0.0; v129 = v126; v84 = 0.0; goto LABEL_37; } if ( a1->m_isSwing ) { v123 = a1->m_regularTrail; v124 = v123->setPosition; v125 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); v124(v123, v125); } else { v95 = a1->m_vehicleSize * -2.0; v96 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v139, v95 * (float)v96, 0.0); if ( a1->m_isSideways ) { cocos2d::CCPoint::CCPoint(&v140, v139.y, v139.x); cocos2d::CCPoint::operator=(&v139, v127, v128); } v97 = a1->m_regularTrail; v98 = v97->setPosition; v99 = a1->getPosition(a1); cocos2d::CCPoint::operator+(&v140, v99, &v139); v98(v97, &v140); } } LABEL_38: if ( a1->m_fadeOutStreak && a1->m_isDart ) { m_waveTrail = a1->m_waveTrail; v87 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v140, v87); cocos2d::CCPoint::operator=(&m_waveTrail->m_currentPoint, v88, v89); } v90 = a1->m_waveTrail; v91 = a1; getPosition = a1->getPosition; v93 = v90->setPosition; v94 = (__int64)getPosition(v91); v93(v90, (const cocos2d::CCPoint *)v94); }
GD Web Decomp Icon

GD Web Decomp

Raw Source