// // PlayerObject::setPosition from 0x33e5c0 to 0x33eea6 (2278 bytes) // // 0 xrefs: // // 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) { float *p_m_vehicleSize; // r7 const cocos2d::CCPoint *v5; // r0 cocos2d::CCNode *m_mainLayer; // r9 float v7; // r2 float v8; // r1 cocos2d::CCParticleSystemQuad *m_trailingParticles; // r9 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCNode *v11; // r0 cocos2d::CCParticleSystemQuad *m_shipClickParticles; // r6 void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 const cocos2d::CCPoint *v14; // r0 cocos2d::CCParticleSystemQuad *m_ufoClickParticles; // r6 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 const cocos2d::CCPoint *v17; // r0 cocos2d::CCParticleSystemQuad *m_dashParticles; // r6 void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 const cocos2d::CCPoint *v20; // r0 PlayerFireBoostSprite *m_robotFire; // r10 CCSpritePart *m_footSprite; // r6 cocos2d::CCNode *v23; // r11 float *v24; // r0 PlayerFireBoostSprite *v25; // r10 void (__fastcall *setRotation)(cocos2d::CCSprite *__hidden, float); // r11 float v27; // s22 float v28; // s20 float v29; // r0 cocos2d::CCParticleSystemQuad *m_robotBurstParticles; // r6 void (__fastcall *v31)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCNode *v32; // r11 const cocos2d::CCPoint *v33; // r0 cocos2d::CCParticleSystemQuad *m_swingBurstParticles1; // r6 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCNode *v36; // r11 cocos2d::CCNode *v37; // r9 const cocos2d::CCPoint *v38; // r0 cocos2d::CCParticleSystemQuad *m_swingBurstParticles2; // r6 void (__fastcall *v40)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCNode *v41; // r11 cocos2d::CCNode *v42; // r9 const cocos2d::CCPoint *v43; // r0 int v44; // r0 int v45; // r6 float v46; // s22 float v47; // s20 int v48; // r0 float v49; // s22 float v50; // s20 float v51; // s21 float v52; // r0 double m_slopeAngleRadians; // d9 float v54; // s16 float v55; // r0 double v56; // d8 int v57; // r3 double v58; // d6 double v59; // d7 double v60; // d9 float v61; // s18 double v62; // d10 int v63; // s19 double v64; // d8 int v65; // r0 float v66; // s15 float v67; // r1 float v68; // s15 float y; // r2 cocos2d::CCParticleSystemQuad *m_playerGroundParticles; // r9 void (__fastcall *v71)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float v72; // r2 cocos2d::CCParticleSystemQuad *v73; // r9 void (__fastcall *v74)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 float v75; // s16 float v76; // s17 float v77; // s16 int v78; // r0 float v79; // r2 cocos2d::CCParticleSystemQuad *m_vehicleGroundParticles; // r9 void (__fastcall *v81)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v82; // r1 cocos2d::CCParticleSystemQuad *v83; // r8 void (__fastcall *setGravity)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // r9 int v85; // r0 int v86; // r1 int v87; // r0 float v88; // r2 cocos2d::CCMotionStreak *v89; // r7 void (__fastcall *v90)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // r8 const cocos2d::CCPoint *v91; // r9 cocos2d::CCMotionStreak *m_shipStreak; // r8 cocos2d::CCNode *v93; // r0 cocos2d::CCNode *v94; // r11 const cocos2d::CCPoint *v95; // r0 float x; // s16 const cocos2d::CCPoint *v97; // r10 int v98; // r0 cocos2d::CCMotionStreak *v99; // r0 cocos2d::CCMotionStreak *m_regularTrail; // r8 void (__fastcall *v101)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // r9 int v102; // r0 cocos2d::CCNode *v103; // r10 cocos2d::CCNode *v104; // r11 cocos2d::CCMotionStreak *v105; // r6 int v106; // r0 cocos2d::CCNode *v107; // r11 cocos2d::CCNode *v108; // r10 const cocos2d::CCPoint *v109; // r9 cocos2d::CCMotionStreak *v110; // r5 void (__fastcall *v111)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // r6 const cocos2d::CCPoint *v112; // r0 float v113; // s16 int v114; // r0 cocos2d::CCMotionStreak *v115; // r6 void (__fastcall *v116)(cocos2d::CCMotionStreak *__hidden, const cocos2d::CCPoint *); // r8 const cocos2d::CCPoint *v117; // r0 HardStreak *m_waveTrail; // r6 const cocos2d::CCPoint *v119; // r0 HardStreak *v120; // r5 void (__fastcall *v121)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 const cocos2d::CCPoint *v122; // r0 cocos2d::CCPoint *v123; // [sp+4h] [bp-68h] cocos2d::CCNode *v124; // [sp+4h] [bp-68h] cocos2d::CCPoint *v125; // [sp+4h] [bp-68h] cocos2d::CCNode *v126; // [sp+Ch] [bp-60h] cocos2d::CCPoint v127; // [sp+14h] [bp-58h] BYREF cocos2d::CCPoint v128; // [sp+1Ch] [bp-50h] BYREF cocos2d::CCPoint v129; // [sp+24h] [bp-48h] BYREF cocos2d::CCPoint v130; // [sp+2Ch] [bp-40h] BYREF cocos2d::CCPoint v131; // [sp+34h] [bp-38h] BYREF cocos2d::CCPoint v132; // [sp+3Ch] [bp-30h] BYREF cocos2d::CCPoint v133; // [sp+44h] [bp-28h] BYREF cocos2d::CCPoint v134; // [sp+4Ch] [bp-20h] BYREF cocos2d::CCPoint v135; // [sp+54h] [bp-18h] BYREF cocos2d::CCPoint v136; // [sp+5Ch] [bp-10h] BYREF p_m_vehicleSize = &a1->m_vehicleSize; a1->m_isObjectRectDirty = 1; a1->m_isOrientedBoxDirty = 1; GameObject::setPosition(a1, a2); cocos2d::CCPoint::CCPoint(&v127); v5 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); cocos2d::CCPoint::CCPoint(&v128, v5); m_mainLayer = a1->m_mainLayer; if ( a1->m_isSwing ) { cocos2d::CCPoint::CCPoint(&v135, *p_m_vehicleSize * -10.0, 0.0); } else { if ( a1->m_isPlatformer && a1->m_isShip ) { v7 = -18.0; v8 = *p_m_vehicleSize * -10.0; } else if ( a1->m_isBird ) { v7 = -3.0; v8 = 0.0; } else { v7 = -4.0; v8 = *p_m_vehicleSize * -12.0; } cocos2d::CCPoint::CCPoint(&v134, v8, v7); cocos2d::CCPoint::operator+(&v135, &v128, &v134); } cocos2d::CCNode::convertToWorldSpace(&v136, m_mainLayer, &v135); cocos2d::CCPoint::operator=(&v127, &v136); if ( a1->m_trailingParticles->getParent(a1->m_trailingParticles) ) { m_trailingParticles = a1->m_trailingParticles; setPosition = m_trailingParticles->setPosition; v11 = m_trailingParticles->getParent(m_trailingParticles); cocos2d::CCNode::convertToNodeSpace(&v136, v11, &v127); setPosition(m_trailingParticles, &v136); } 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; v123 = (cocos2d::CCPoint *)m_robotFire->setPosition; v23 = m_robotFire->getParent(m_robotFire); v24 = (float *)m_footSprite->getContentSize(m_footSprite); cocos2d::CCPoint::CCPoint(&v134, *v24 * 0.5, 2.5); cocos2d::CCNode::convertToWorldSpace(&v135, m_footSprite, &v134); cocos2d::CCNode::convertToNodeSpace(&v136, v23, &v135); ((void (__fastcall *)(PlayerFireBoostSprite *, cocos2d::CCPoint *))v123)(m_robotFire, &v136); v25 = a1->m_robotFire; setRotation = v25->setRotation; v27 = COERCE_FLOAT(((int (__fastcall *)(CCSpritePart *))m_footSprite->getRotation)(m_footSprite)); v28 = v27 * COERCE_FLOAT(((int (__fastcall *)(CCPartAnimSprite *))a1->m_robotSprite->m_paSprite->getScaleX)(a1->m_robotSprite->m_paSprite)); v29 = COERCE_FLOAT(((int (__fastcall *)(CCPartAnimSprite *))a1->m_robotSprite->m_paSprite->getRotation)(a1->m_robotSprite->m_paSprite)); ((void (__fastcall *)(PlayerFireBoostSprite *, _DWORD))setRotation)(v25, v28 + v29); if ( a1->m_robotBurstParticles->getParent(a1->m_robotBurstParticles) ) { m_robotBurstParticles = a1->m_robotBurstParticles; v31 = m_robotBurstParticles->setPosition; v32 = m_robotBurstParticles->getParent(m_robotBurstParticles); v124 = a1->m_robotFire->getParent(a1->m_robotFire); v33 = a1->m_robotFire->getPosition(a1->m_robotFire); cocos2d::CCNode::convertToWorldSpace(&v135, v124, v33); cocos2d::CCNode::convertToNodeSpace(&v136, v32, &v135); v31(m_robotBurstParticles, &v136); } if ( a1->m_swingBurstParticles1->getParent(a1->m_swingBurstParticles1) ) { m_swingBurstParticles1 = a1->m_swingBurstParticles1; v35 = m_swingBurstParticles1->setPosition; v36 = m_swingBurstParticles1->getParent(m_swingBurstParticles1); v37 = a1->m_swingFireBottom->getParent(a1->m_swingFireBottom); v38 = a1->m_swingFireBottom->getPosition(a1->m_swingFireBottom); cocos2d::CCNode::convertToWorldSpace(&v135, v37, v38); cocos2d::CCNode::convertToNodeSpace(&v136, v36, &v135); v35(m_swingBurstParticles1, &v136); } if ( a1->m_swingBurstParticles2->getParent(a1->m_swingBurstParticles2) ) { m_swingBurstParticles2 = a1->m_swingBurstParticles2; v40 = m_swingBurstParticles2->setPosition; v41 = m_swingBurstParticles2->getParent(m_swingBurstParticles2); v42 = a1->m_swingFireTop->getParent(a1->m_swingFireTop); v43 = a1->m_swingFireTop->getPosition(a1->m_swingFireTop); cocos2d::CCNode::convertToWorldSpace(&v135, v42, v43); cocos2d::CCNode::convertToNodeSpace(&v136, v41, &v135); v40(m_swingBurstParticles2, &v136); } v44 = PlayerObject::flipMod(a1); if ( a1->m_isSwing ) v44 = 1; v45 = (v44 ^ -!a1->m_isOnGround3) + !a1->m_isOnGround3; cocos2d::CCPoint::CCPoint(&v129, 0.0, 0.0); if ( a1->m_isRobot ) { cocos2d::CCPoint::CCPoint(&v136, 0.0, -2.0); cocos2d::CCPoint::operator=(&v129, &v136); } v46 = *p_m_vehicleSize; v47 = v129.x - 10.0; v48 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint( &v130, (float)(v47 * v46) * (float)v48, (float)((float)(v129.y - 13.0) * (float)v45) * *p_m_vehicleSize); if ( a1->m_isOnSlope ) { v49 = *p_m_vehicleSize * a1->m_height; v50 = *p_m_vehicleSize * 20.0; v51 = 1.0; if ( !a1->m_slopeSlidingMaybeRotated ) v51 = -1.0; v52 = sqrtf((float)(v49 * v49) + (float)(v50 * v50)); m_slopeAngleRadians = a1->m_slopeAngleRadians; if ( v51 == -1.0 ) m_slopeAngleRadians = -m_slopeAngleRadians; v54 = v52 * 0.5; v55 = atanf(v49 / v50); v56 = v54; v57 = a1->m_isGoingLeft ^ a1->m_slopeSlidingMaybeRotated; v58 = v55; if ( a1->m_isUpsideDown ) v57 ^= 1u; v59 = v51; if ( v57 ) v60 = m_slopeAngleRadians + v58 * v59; else v60 = m_slopeAngleRadians - v58 * v59; v61 = v60; v62 = v56 * cosf(v61); v63 = PlayerObject::reverseMod(a1); v64 = v56 * sinf(v61); v65 = PlayerObject::reverseMod(a1); v66 = v62 * (double)v63; v67 = v66; v68 = v64 * (double)v65; cocos2d::CCPoint::CCPoint(&v135, v67, v68); if ( a1->m_isSideways ) { y = v135.y; v135.y = v135.x; v135.x = y; } m_playerGroundParticles = a1->m_playerGroundParticles; v71 = m_playerGroundParticles->setPosition; cocos2d::CCPoint::operator-(&v136, a2, &v135); v71(m_playerGroundParticles, &v136); } else if ( a1->m_isOnGround2 ) { if ( a1->m_isSideways ) { v72 = v130.y; v130.y = v130.x; v130.x = v72; } v73 = a1->m_playerGroundParticles; v74 = v73->setPosition; cocos2d::CCPoint::operator+(&v136, a2, &v130); v74(v73, &v136); } if ( a1->m_unkA29 ) { v75 = *p_m_vehicleSize; v76 = v75 * (float)PlayerObject::reverseMod(a1); v77 = *p_m_vehicleSize * -15.0; v78 = PlayerObject::flipMod(a1); cocos2d::CCPoint::CCPoint(&v135, v76, v77 * (float)v78); if ( a1->m_isSideways ) { v79 = v135.y; v135.y = v135.x; v135.x = v79; } m_vehicleGroundParticles = a1->m_vehicleGroundParticles; v81 = m_vehicleGroundParticles->setPosition; cocos2d::CCPoint::operator+(&v136, a2, &v135); v81(m_vehicleGroundParticles, &v136); if ( a1->m_isUpsideDown ) v82 = 1133576192; else v82 = 1121714176; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, int))a1->m_vehicleGroundParticles->setAngle)( a1->m_vehicleGroundParticles, v82); v83 = a1->m_vehicleGroundParticles; setGravity = v83->setGravity; v85 = PlayerObject::flipMod(a1); cocos2d::CCPoint::CCPoint(&v136, -350.0, (float)(-300 * v85)); setGravity(v83, &v136); if ( a1->m_isSideways ) v86 = 1119092736; else v86 = 0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, int))a1->m_vehicleGroundParticles->setRotation)( a1->m_vehicleGroundParticles, v86); } if ( a1->m_isShip ) { if ( a1->m_isPlatformer ) { m_regularTrail = a1->m_regularTrail; v101 = m_regularTrail->setPosition; v102 = (int)m_regularTrail->getParent(m_regularTrail); v103 = a1->m_mainLayer; v104 = (cocos2d::CCNode *)v102; cocos2d::CCPoint::CCPoint(&v134, *p_m_vehicleSize * -10.0, *p_m_vehicleSize * -12.0); cocos2d::CCNode::convertToWorldSpace(&v135, v103, &v134); cocos2d::CCNode::convertToNodeSpace(&v136, v104, &v135); v101(m_regularTrail, &v136); } else { v87 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v131, (float)(4 * v87), 0.0); if ( a1->m_isSideways ) { v88 = v131.y; v131.y = v131.x; v131.x = v88; } v89 = a1->m_regularTrail; v90 = v89->setPosition; v91 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); cocos2d::CCPoint::CCPoint(&v135, v131.x, v131.y); cocos2d::CCPoint::operator+(&v136, v91, &v135); v90(v89, &v136); if ( a1->m_shipStreak ) { offsetForStreak(&v132, a1->m_shipStreakType); m_shipStreak = a1->m_shipStreak; v125 = (cocos2d::CCPoint *)m_shipStreak->setPosition; v93 = a1->m_regularTrail->getParent(a1->m_regularTrail); v126 = a1->m_mainLayer; v94 = v93; v95 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); x = v132.x; v97 = v95; v98 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v133, x * (float)v98, v132.y); cocos2d::CCPoint::operator+(&v134, v97, &v133); cocos2d::CCNode::convertToWorldSpace(&v135, v126, &v134); cocos2d::CCNode::convertToNodeSpace(&v136, v94, &v135); v99 = m_shipStreak; LABEL_59: ((void (__fastcall *)(cocos2d::CCMotionStreak *, cocos2d::CCPoint *))v125)(v99, &v136); } } } else if ( a1->m_isBird ) { if ( a1->m_regularTrail->getParent(a1->m_regularTrail) ) { v105 = a1->m_regularTrail; v125 = (cocos2d::CCPoint *)v105->setPosition; v106 = (int)v105->getParent(v105); v107 = a1->m_mainLayer; v108 = (cocos2d::CCNode *)v106; v109 = a1->m_vehicleSprite->getPosition(a1->m_vehicleSprite); cocos2d::CCPoint::CCPoint(&v133, 0.0, 0.0); cocos2d::CCPoint::operator+(&v134, v109, &v133); cocos2d::CCNode::convertToWorldSpace(&v135, v107, &v134); cocos2d::CCNode::convertToNodeSpace(&v136, v108, &v135); v99 = v105; goto LABEL_59; } } else if ( a1->m_isSwing ) { v110 = a1->m_regularTrail; v111 = v110->setPosition; v112 = a1->m_trailingParticles->getPosition(a1->m_trailingParticles); v111(v110, v112); } else { v113 = a1->m_vehicleSize * -2.0; v114 = PlayerObject::reverseMod(a1); cocos2d::CCPoint::CCPoint(&v135, v113 * (float)v114, 0.0); if ( a1->m_isSideways ) { cocos2d::CCPoint::CCPoint(&v136, v135.y, v135.x); cocos2d::CCPoint::operator=(&v135, &v136); } v115 = a1->m_regularTrail; v116 = v115->setPosition; v117 = a1->getPosition(a1); cocos2d::CCPoint::operator+(&v136, v117, &v135); v116(v115, &v136); } if ( a1->m_fadeOutStreak && a1->m_isDart ) { m_waveTrail = a1->m_waveTrail; v119 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v136, v119); cocos2d::CCPoint::operator=(&m_waveTrail->m_currentPoint, &v136); } v120 = a1->m_waveTrail; v121 = v120->setPosition; v122 = a1->getPosition(a1); v121(v120, v122); }
GD Web Decomp Icon

GD Web Decomp

Raw Source