// // PlayerObject::postCollision from 0x6389b0 to 0x63a004 (5716 bytes) // // 2 xrefs: // > GJBaseGameLayer::checkCollisions @ 0x895560 // > @ 0x71370 // // 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::postCollision(PlayerObject *a1, float a2, bool a3) { _BOOL4 v4; // w20 float v6; // s8 _BOOL4 m_holdingRight; // w25 _BOOL4 m_holdingLeft; // w26 GameObject *m_lastGroundObject; // x0 GameObject *m_currentSlope2; // x0 GameObject *v11; // x24 _BOOL4 m_isOnSlope; // w24 GameObject *m_currentSlope; // x0 float v14; // s11 const cocos2d::CCRect *v15; // x0 float v16; // s10 float v17; // s10 float y; // s0 double v19; // d0 double m_collidedTopMinY; // d1 GameObject *v21; // x0 int v22; // w22 _BOOL4 v23; // w24 int v24; // w25 GameObject *v25; // x0 _BOOL4 v26; // w24 GameObject *v27; // x0 _BOOL4 v28; // w24 const cocos2d::CCPoint *v29; // x0 double m_yVelocityRelated; // d0 double m_scaleXRelated3; // d0 float v32; // s1 float v33; // s0 double v34; // d1 float v35; // s1 double m_scaleXRelated5; // d0 double m_scaleXRelated2; // d0 double v38; // x0 _BOOL4 v39; // w0 double m_yVelocity; // d0 int m_reverseRelated; // w0 GameObject *v42; // x0 float v43; // s0 float v44; // s0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x2 void (__fastcall *setPosition)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x22 __int64 v47; // x0 _BOOL4 m_ignoreDamage; // w24 unsigned int v49; // w24 cocos2d::CCArray *v50; // x21 __int64 v51; // x0 GameObject *m_preLastGroundObject; // x24 GameObject *v53; // x0 GameObject *m_collidedObject; // x23 float v55; // s10 float v56; // s10 const cocos2d::CCRect *v57; // x0 const cocos2d::CCRect *v58; // x0 _BOOL4 v59; // w0 float v60; // s0 float v61; // s11 float v62; // s0 float v63; // s0 _BOOL4 v64; // w24 _BOOL4 m_isUpsideDown; // w0 float m_slopeVelocity; // s0 const cocos2d::CCPoint *LastPosition; // x0 float v68; // s10 const cocos2d::CCPoint *(__fastcall *v69)(cocos2d::CCNode *__hidden); // x2 void (__fastcall *v70)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x22 double v71; // d10 __int64 v72; // x24 float v73; // s0 float m_scaleXRelated; // s1 GameObject *v75; // x1 const cocos2d::CCRect *v76; // x0 float width; // s12 float m_vehicleSize; // s11 float v79; // s10 float v80; // s10 const cocos2d::CCPoint *v81; // x0 double x; // d0 double m_collidedLeftMaxX; // d1 _BOOL4 v84; // w0 double m_scaleXRelated4; // d3 float v86; // s1 _BOOL4 v87; // w0 unsigned __int64 v88; // d1 int v89; // w24 cocos2d::CCObject **v90; // x27 cocos2d::CCObject *v91; // x25 void (__fastcall *v92)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x21 const cocos2d::CCPoint *v93; // x0 _BOOL4 v94; // w0 double m_groundYVelocity; // d3 float v96; // s1 _BOOL4 v97; // w0 float v98; // s0 const cocos2d::CCPoint *v99; // x0 float v100; // s0 float v101; // s1 _BOOL4 v102; // w0 float v103; // s0 float v104; // s11 float v105; // s0 float v106; // s0 float ModifiedSlopeYVel; // s0 float m_slopeAngle; // s10 float v109; // s11 float v110; // s12 double v111; // d0 double v112; // d1 double v113; // d10 unsigned int v114; // w21 cocos2d::CCArray *v115; // x22 __int64 v116; // x0 float v117; // s0 float v118; // s11 float v119; // s0 float v120; // s0 float v121; // s11 float v122; // s0 double m_currentSlopeYVelocity; // d0 double v124; // d10 int v125; // w0 GameManager *v126; // x0 const cocos2d::CCRect *v127; // x0 float v128; // s11 double m_collidedRightMinX; // d1 float v130; // s10 const cocos2d::CCRect *v131; // x0 const cocos2d::CCPoint *(__fastcall *v132)(cocos2d::CCNode *__hidden); // x1 float v133; // s11 cocos2d::CCArray *v134; // x0 cocos2d::ccArray *data; // x0 cocos2d::CCObject **arr; // x27 __int64 v137; // x25 cocos2d::CCObject *v138; // x25 int v139; // w24 unsigned int v140; // w26 void (__fastcall *v141)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x21 const cocos2d::CCPoint *v142; // x0 float v143; // s10 const cocos2d::CCRect *v144; // x0 const cocos2d::CCPoint *(__fastcall *v145)(cocos2d::CCNode *__hidden); // x1 float v146; // s11 cocos2d::CCArray *v147; // x0 cocos2d::ccArray *v148; // x0 __int64 v149; // x25 unsigned int v150; // w26 GameManager *v151; // x0 GameManager *v152; // x0 GJBaseGameLayer *m_gameLayer; // [xsp+98h] [xbp+98h] GJBaseGameLayer *v154; // [xsp+98h] [xbp+98h] float v155; // [xsp+A0h] [xbp+A0h] int v156; // [xsp+A0h] [xbp+A0h] int v157; // [xsp+A0h] [xbp+A0h] float v158; // [xsp+B0h] [xbp+B0h] char *v159; // [xsp+B0h] [xbp+B0h] float v160; // [xsp+B0h] [xbp+B0h] char *v161; // [xsp+B0h] [xbp+B0h] cocos2d::CCRect v162; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCRect v163; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCRect v164; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCRect v165; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCPoint ScalePosDelta; // 0:kr08_8.8 cocos2d::CCRect v167; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v168; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v4 = a3; if ( a1->m_enableImpulseFix ) { v6 = a2 * 4.0; } else if ( a3 ) { v6 = 0.5; } else { v6 = 1.0; } m_holdingRight = a1->m_holdingRight; m_holdingLeft = a1->m_holdingLeft; if ( a1->m_holdingRight && a1->m_holdingLeft ) { m_holdingRight = !a1->m_leftPressedFirst; m_holdingLeft = a1->m_leftPressedFirst; } m_lastGroundObject = a1->m_lastGroundObject; if ( m_lastGroundObject && GameObject::getGroupDisabled(m_lastGroundObject) ) a1->m_lastGroundObject = nullptr; m_currentSlope2 = a1->m_currentSlope2; if ( m_currentSlope2 && GameObject::getGroupDisabled(m_currentSlope2) ) a1->m_currentSlope2 = nullptr; v11 = a1->m_lastGroundObject; if ( v11 ) a1->m_isOnIce = v11->m_isIceBlock; m_isOnSlope = a1->m_isOnSlope; if ( a1->m_isOnSlope ) { m_currentSlope = a1->m_currentSlope; if ( m_currentSlope ) { if ( !a1->m_maybeUpsideDownSlope ) a1->m_isOnIce = m_currentSlope->m_isIceBlock; } } if ( a1->m_wasOnSlope != m_isOnSlope ) { if ( a1->m_isDart ) { PlayerObject::placeStreakPoint(a1); m_isOnSlope = a1->m_isOnSlope; if ( a1->m_isOnSlope ) goto LABEL_23; } else if ( m_isOnSlope ) { goto LABEL_23; } m_isUpsideDown = a1->m_isUpsideDown; m_slopeVelocity = a1->m_slopeVelocity; a1->m_slopeEndTime = a1->m_totalTime; if ( m_isUpsideDown ) { if ( m_slopeVelocity < 0.0 && a1->m_yVelocity > m_slopeVelocity && a1->m_isCurrentSlopeTop ) goto LABEL_258; if ( m_slopeVelocity <= 0.0 || a1->m_yVelocity >= m_slopeVelocity ) { if ( !a1->m_maybeIsBoosted ) goto LABEL_146; goto LABEL_195; } } else { if ( m_slopeVelocity < 0.0 && a1->m_yVelocity > m_slopeVelocity && a1->m_isCurrentSlopeTop ) goto LABEL_258; if ( m_slopeVelocity <= 0.0 || a1->m_yVelocity >= m_slopeVelocity ) { if ( !a1->m_maybeIsBoosted ) goto LABEL_197; LABEL_195: PlayerObject::isFlying(a1); goto LABEL_196; } } if ( a1->m_isCurrentSlopeTop ) { if ( !a1->m_maybeIsBoosted ) { if ( m_isUpsideDown ) goto LABEL_146; LABEL_197: if ( m_slopeVelocity >= 0.0 ) goto LABEL_149; goto LABEL_147; } goto LABEL_195; } LABEL_258: if ( !a1->m_maybeIsBoosted || PlayerObject::isFlying(a1) || a1->m_isBall ) { ModifiedSlopeYVel = PlayerObject::getModifiedSlopeYVel(a1); m_slopeAngle = a1->m_slopeAngle; v109 = ModifiedSlopeYVel; v110 = cosf(m_slopeAngle); if ( a1->m_isPlatformer ) { v111 = fabs(tanf(m_slopeAngle) * a1->m_platformerXVelocity) * 1.10000002; if ( v109 < 0.0 ) v112 = -1.0; else v112 = 1.0; v109 = v111 * v112; } if ( PlayerObject::isBoostValid(a1, v109) && (!a1->m_isPlatformer || (m_holdingRight || m_holdingLeft) && fabs(a1->m_platformerXVelocity) >= (float)((float)(v110 * 5.0) + -1.0)) ) { PlayerObject::boostPlayer(a1, v109); } LABEL_149: if ( a1->m_maybeSlopeForce > 0.0 ) { if ( m_holdingLeft ) { if ( !a1->m_isSlidingRight && !m_holdingRight ) goto LABEL_154; } else if ( !m_holdingRight || a1->m_isSlidingRight ) { goto LABEL_154; } a1->m_isSliding = 0; a1->m_isMoving = 1; a1->m_maybeSlopeForce = 0.0; } LABEL_154: a1->m_currentSlope = nullptr; a1->m_currentSlopeYVelocity = 0.0; a1->m_slopeVelocity = 0.0; a1->m_slopeRotation = 0.0; goto LABEL_23; } LABEL_196: m_slopeVelocity = a1->m_slopeVelocity; if ( !a1->m_isUpsideDown ) goto LABEL_197; LABEL_146: m_isOnSlope = 1; if ( m_slopeVelocity <= 0.0 ) goto LABEL_149; LABEL_147: if ( !a1->m_maybeIsBoosted && !a1->m_jumpBuffered && !a1->m_stateRingJump && a1->m_isCurrentSlopeTop == m_isOnSlope ) { m_currentSlopeYVelocity = a1->m_currentSlopeYVelocity; a1->m_isOnGround2 = 0; v124 = -m_currentSlopeYVelocity; v125 = PlayerObject::flipMod(a1); PlayerObject::setYVelocity(a1, v124 * (double)v125, 17); a1->m_isOnGround = 0; PlayerObject::runRotateAction(a1, 0, 14); } goto LABEL_149; } LABEL_23: if ( a1->m_collidedTopMinY == 0.0 || a1->m_collidedBottomMaxY == 0.0 || a1->m_disablePlayerSqueeze ) goto LABEL_101; if ( a1->m_isPlatformer ) v14 = 0.8; else v14 = 0.7; v15 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v162, v15); v16 = a1->m_collidedTopMinY - a1->m_collidedBottomMaxY; v17 = fabsf(v16); y = a1->getPosition(a1)->y; if ( v17 == 0.0 ) goto LABEL_271; v19 = y; m_collidedTopMinY = a1->m_collidedTopMinY; if ( !a1->m_isUpsideDown ) { if ( m_collidedTopMinY >= v19 || m_collidedTopMinY >= a1->m_lastPosition.y ) goto LABEL_32; LABEL_271: if ( !a1->m_isPlatformer ) goto LABEL_101; v21 = a1->m_currentSlope; v22 = 1; if ( !v21 ) goto LABEL_101; goto LABEL_273; } if ( m_collidedTopMinY > v19 && m_collidedTopMinY > a1->m_lastPosition.y ) goto LABEL_271; LABEL_32: if ( !a1->m_isPlatformer ) { if ( v17 < (float)(v14 * v162.size.height) ) goto LABEL_36; m_ignoreDamage = a1->m_ignoreDamage; goto LABEL_102; } v21 = a1->m_currentSlope; v22 = 0; if ( v21 ) { LABEL_273: if ( v17 < (float)(v14 * v162.size.height) || v17 > v162.size.height || (v127 = v21->getObjectRect(v21), cocos2d::CCRect::CCRect(&v165, v127), !(unsigned __int8)cocos2d::CCRect::intersectsRect(&v162, &v165)) ) { if ( v22 ) { m_ignoreDamage = a1->m_ignoreDamage; goto LABEL_102; } goto LABEL_34; } v42 = a1->m_currentSlope; if ( !v42->m_slopeUphill ) goto LABEL_361; if ( !GameObject::slopeFloorTop(v42) ) { LABEL_301: v43 = -1.0; goto LABEL_100; } v42 = a1->m_currentSlope; if ( !v42->m_slopeUphill ) { LABEL_361: if ( GameObject::slopeFloorTop(v42) ) goto LABEL_301; } v43 = 1.0; LABEL_100: v44 = a1->m_lastPosition.x + (float)(a2 * v43); getPosition = a1->getPosition; setPosition = a1->setPosition; a1->m_platformerXVelocity = 0.0; v155 = v44; v47 = (__int64)getPosition(a1); cocos2d::CCPoint::CCPoint(&v164.origin, v155, *(float *)(v47 + 4)); setPosition(a1, &v164.origin); goto LABEL_101; } LABEL_34: if ( v17 >= (float)(v14 * v162.size.height) ) { LABEL_101: m_ignoreDamage = a1->m_ignoreDamage; goto LABEL_102; } if ( !a1->m_isPlatformer ) { LABEL_36: if ( a1->m_ignoreDamage ) goto LABEL_42; if ( !a1->m_playEffects ) a1->setPosition(a1, &a1->m_lastPosition); if ( a1->m_maybeCanRunIntoBlocks ) { v23 = a1->m_ignoreDamage; a1->m_maybeIsColliding = 1; } else { v152 = GameManager::sharedState(); v152->m_playLayer->destroyPlayer(v152->m_playLayer, a1, nullptr); v23 = a1->m_ignoreDamage; } if ( v23 ) goto LABEL_42; goto LABEL_103; } v130 = 3.0; m_gameLayer = a1->m_gameLayer; v156 = 1; v131 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v163, v131); v132 = a1->getPosition; v163.origin.x = v163.origin.x + 1.0; v163.origin.y = v163.origin.y - 1.0; v163.size.width = v163.size.width - 2.0; v163.size.height = v163.size.height + 2.0; v133 = v132(a1)->y; cocos2d::CCRect::CCRect(&v164, &v163); while ( 1 ) { v164.origin.x = v130 + v164.origin.x; cocos2d::CCRect::CCRect(&v165, &v164); v134 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v167, (bool)&v165); if ( !v134 ) break; data = v134->data; if ( !data->num ) break; arr = data->arr; v137 = 8LL * data->num - 8; v159 = (char *)arr + v137; if ( arr > (cocos2d::CCObject **)((char *)arr + v137) ) break; v138 = *arr; if ( !*arr ) break; v139 = 0; v140 = 0; do { if ( v133 <= *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v138->__vftable[2].acceptVisitor)(v138) + 4) ) { if ( v133 >= *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v138->__vftable[2].acceptVisitor)(v138) + 4) ) goto LABEL_336; v140 = 1; if ( v139 ) goto LABEL_336; } else { v139 = 1; if ( v140 ) goto LABEL_336; } if ( v159 < (char *)++arr ) break; v138 = *arr; } while ( *arr ); if ( v140 <= (v139 ^ 1u) ) break; LABEL_336: if ( ++v156 == 9 ) goto LABEL_36; v130 = ceilf((float)v156 * 0.5) * 3.0; cocos2d::CCRect::CCRect(&v164, &v163); if ( (v156 & 1) == 0 ) v130 = -v130; } v141 = a1->setPosition; v160 = v130 + a1->getPosition(a1)->x; v142 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v165.origin, v160, v142->y); v141(a1, &v165.origin); m_ignoreDamage = a1->m_ignoreDamage; LABEL_102: if ( m_ignoreDamage ) goto LABEL_42; LABEL_103: if ( cocos2d::CCDictionary::count(a1->m_collisionLogTop) && cocos2d::CCDictionary::count(a1->m_collisionLogBottom) ) { v49 = 0; v50 = cocos2d::CCDictionary::allKeys(a1->m_collisionLogTop); while ( v49 < (unsigned int)cocos2d::CCArray::count(v50) ) { v51 = cocos2d::CCArray::objectAtIndex(v50, v49); if ( cocos2d::CCDictionary::objectForKey(a1->m_collisionLogBottom, *(int *)(v51 + 56)) ) { LABEL_109: a1->setPosition(a1, &a1->m_lastPosition); if ( a1->m_maybeCanRunIntoBlocks ) { a1->m_maybeIsColliding = 1; } else { v126 = GameManager::sharedState(); v126->m_playLayer->destroyPlayer(v126->m_playLayer, a1, nullptr); } return; } ++v49; } } LABEL_42: if ( !a1->m_isPlatformer ) { LABEL_43: v24 = 0; goto LABEL_44; } if ( a1->m_collidedLeftMaxX == 0.0 || a1->m_collidedRightMinX == 0.0 ) { if ( a1->m_ignoreDamage ) goto LABEL_116; goto LABEL_186; } v76 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v162, v76); width = v162.size.width; m_vehicleSize = a1->m_vehicleSize; v79 = a1->m_collidedRightMinX - a1->m_collidedLeftMaxX; v80 = fabsf(v79); v81 = a1->getPosition(a1); if ( v80 == 0.0 ) goto LABEL_227; x = v81->x; if ( a1->m_platformerXVelocity >= 0.0 ) { m_collidedRightMinX = a1->m_collidedRightMinX; if ( m_collidedRightMinX < x && m_collidedRightMinX < a1->m_lastPosition.x ) { v94 = a1->m_ignoreDamage; LABEL_228: if ( v94 ) goto LABEL_187; goto LABEL_186; } } else { m_collidedLeftMaxX = a1->m_collidedLeftMaxX; if ( m_collidedLeftMaxX > x && m_collidedLeftMaxX > a1->m_lastPosition.x ) goto LABEL_227; } if ( (float)(width - (float)(m_vehicleSize * 5.0)) <= v80 ) { LABEL_227: v94 = a1->m_ignoreDamage; goto LABEL_228; } if ( a1->m_isPlatformer ) { v143 = 3.0; v154 = a1->m_gameLayer; v157 = 1; v144 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v163, v144); v145 = a1->getPosition; v163.origin.x = v163.origin.x - 1.0; v163.origin.y = v163.origin.y + 1.0; v163.size.width = v163.size.width + 2.0; v163.size.height = v163.size.height - 2.0; v146 = v145(a1)->x; cocos2d::CCRect::CCRect(&v164, &v163); while ( 1 ) { v164.origin.y = v143 + v164.origin.y; cocos2d::CCRect::CCRect(&v165, &v164); v147 = GJBaseGameLayer::staticObjectsInRect(v154, v168, (bool)&v165); if ( !v147 ) break; v148 = v147->data; if ( !v148->num ) break; v90 = v148->arr; v149 = 8LL * v148->num - 8; v161 = (char *)v90 + v149; if ( v90 > (cocos2d::CCObject **)((char *)v90 + v149) ) break; v91 = *v90; if ( !*v90 ) break; v89 = 0; v150 = 0; do { if ( v146 <= *(float *)((__int64 (__fastcall *)(cocos2d::CCObject *))v91->__vftable[2].acceptVisitor)(v91) ) { if ( v146 >= *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v91->__vftable[2].acceptVisitor)(v91) + 4) ) goto LABEL_351; v89 = 1; if ( v150 ) goto LABEL_351; } else { v150 = 1; if ( v89 ) goto LABEL_351; } if ( v161 < (char *)++v90 ) break; v91 = *v90; } while ( *v90 ); if ( v150 <= (v89 ^ 1u) ) break; LABEL_351: if ( ++v157 == 9 ) goto LABEL_182; v143 = ceilf((float)v157 * 0.5) * 3.0; cocos2d::CCRect::CCRect(&v164, &v163); if ( (v157 & 1) == 0 ) v143 = -v143; } v92 = a1->setPosition; v158 = a1->getPosition(a1)->x; v93 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v165.origin, v158, v143 + v93->y); v92(a1, &v165.origin); goto LABEL_227; } LABEL_182: if ( !a1->m_playEffects ) a1->setPosition(a1, &a1->m_lastPosition); if ( a1->m_maybeCanRunIntoBlocks ) { v84 = a1->m_ignoreDamage; a1->m_maybeIsColliding = !v84; if ( v84 ) goto LABEL_187; } else { v151 = GameManager::sharedState(); v151->m_playLayer->destroyPlayer(v151->m_playLayer, a1, nullptr); if ( a1->m_ignoreDamage ) goto LABEL_187; } LABEL_186: if ( cocos2d::CCDictionary::count(a1->m_collisionLogLeft) && cocos2d::CCDictionary::count(a1->m_collisionLogRight) ) { v114 = 0; v115 = cocos2d::CCDictionary::allKeys(a1->m_collisionLogLeft); while ( v114 < (unsigned int)cocos2d::CCArray::count(v115) ) { v116 = cocos2d::CCArray::objectAtIndex(v115, v114); if ( cocos2d::CCDictionary::objectForKey(a1->m_collisionLogRight, *(int *)(v116 + 56)) ) goto LABEL_109; ++v114; } } LABEL_187: if ( !a1->m_isPlatformer ) goto LABEL_43; LABEL_116: m_preLastGroundObject = a1->m_currentSlope2; if ( m_preLastGroundObject ) { v53 = a1->m_lastGroundObject; a1->m_preLastGroundObject = m_preLastGroundObject; if ( !v53 || a1->m_isOnGround2 ) goto LABEL_119; LABEL_161: v24 = 0; if ( !m_preLastGroundObject ) goto LABEL_120; v24 = 0; if ( m_preLastGroundObject->m_isNonStickX ) goto LABEL_120; goto LABEL_163; } m_preLastGroundObject = a1->m_lastGroundObject; if ( !m_preLastGroundObject || !a1->m_isOnGround2 ) { m_preLastGroundObject = a1->m_preLastGroundObject; goto LABEL_161; } if ( a1->m_preLastGroundObject ) m_preLastGroundObject = a1->m_preLastGroundObject; LABEL_119: v24 = 0; if ( m_preLastGroundObject->m_isNonStickX ) goto LABEL_120; LABEL_163: LastPosition = GameObject::getLastPosition(m_preLastGroundObject); cocos2d::CCPoint::CCPoint(&v162.origin, LastPosition); ((void (__fastcall *)(cocos2d::CCRect *__return_ptr, GameObject *))m_preLastGroundObject->getRealPosition)( &v163, m_preLastGroundObject); if ( m_preLastGroundObject->m_isScaleStick ) { ScalePosDelta = GameObject::getScalePosDelta(m_preLastGroundObject); v128 = v163.origin.x; v68 = v165.origin.x; if ( v128 > *(float *)((__int64 (__fastcall *)(PlayerObject *, float, float))a1->getPosition)( a1, ScalePosDelta.x, ScalePosDelta.y) ) v68 = -v68; } else { v68 = 0.0; } v69 = a1->getPosition; v70 = a1->setPosition; if ( a1->m_isSideways ) { v71 = (float)(v68 + (float)(v163.origin.y - v162.origin.y)); a1->m_scaleXRelated = v71; a1->m_scaleXRelated2 = v71; v72 = (__int64)v69(a1); v73 = 0.0; m_scaleXRelated = a1->m_scaleXRelated; } else { v113 = (float)(v68 + (float)(v163.origin.x - v162.origin.x)); a1->m_scaleXRelated = v113; a1->m_scaleXRelated2 = v113; v72 = (__int64)v69(a1); m_scaleXRelated = 0.0; v73 = a1->m_scaleXRelated; } cocos2d::CCPoint::CCPoint(&v164.origin, v73, m_scaleXRelated); v24 = 1; cocos2d::CCPoint::operator+(&v165, v72, &v164); v70(a1, &v165.origin); a1->m_physDeltaRelated = a1->m_physDeltaRelated + (float)(a2 / 60.0); LABEL_120: PlayerObject::performSlideCheck(a1); if ( !a1->m_isOnGround2 ) { v25 = a1->m_lastGroundObject; a1->m_preLastGroundObject = nullptr; if ( v25 ) goto LABEL_45; goto LABEL_122; } LABEL_44: v25 = a1->m_lastGroundObject; if ( v25 ) { LABEL_45: v26 = 0; if ( !a1->m_currentSlope2 && !v25->m_isNonStickY ) { v99 = GameObject::getLastPosition(v25); cocos2d::CCPoint::CCPoint(&v163.origin, v99); ((void (__fastcall *)(cocos2d::CCRect *__return_ptr, GameObject *))a1->m_lastGroundObject->getRealPosition)( &v164, a1->m_lastGroundObject); GameObject::getScalePosDelta(a1->m_lastGroundObject); v100 = v164.origin.x; v101 = v163.origin.x; if ( v164.origin.x != v163.origin.x || v165.origin.y != 0.0 || v164.origin.y != v163.origin.y ) { if ( !a1->m_isSideways ) { v100 = v164.origin.y; v101 = v163.origin.y; } if ( a1->m_isUpsideDown ) v26 = v101 < (float)(v100 - v165.origin.y); else v26 = v101 > (float)(v100 + v165.origin.y); } } if ( !cocos2d::CCDictionary::count(a1->m_collisionLogBottom) ) goto LABEL_123; goto LABEL_47; } LABEL_122: v26 = 0; if ( !cocos2d::CCDictionary::count(a1->m_collisionLogBottom) ) goto LABEL_123; LABEL_47: if ( !v26 ) goto LABEL_48; LABEL_123: m_collidedObject = a1->m_lastGroundObject; a1->m_isCollidingWithSlope = 0; a1->m_lastGroundObject = nullptr; if ( !v26 || !m_collidedObject ) goto LABEL_48; if ( a1->m_isPlatformer ) v55 = 10.0; else v55 = 5.0; if ( m_collidedObject->m_isExtraSticky ) v55 = 20.0; v56 = a2 * v55; v57 = m_collidedObject->getObjectRect(m_collidedObject); cocos2d::CCRect::CCRect(&v162, v57); v58 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v163, v58); cocos2d::CCRect::CCRect(&v164, &v162); if ( a1->m_isSideways ) { v59 = a1->m_isUpsideDown; v164.size.width = v164.size.width + v56; if ( v59 ) { cocos2d::CCRect::getMinX(&v162); v61 = v60; cocos2d::CCRect::getMaxX(&v163); v63 = v61 - v62; goto LABEL_132; } cocos2d::CCRect::getMinX(&v163); v118 = v117; cocos2d::CCRect::getMaxX(&v162); v106 = v118 - v119; } else { v102 = a1->m_isUpsideDown; v164.size.height = v164.size.height + v56; if ( v102 ) { cocos2d::CCRect::getMinY(&v162); v121 = v120; cocos2d::CCRect::getMaxY(&v163); v63 = v121 - v122; LABEL_132: v64 = v56 > v63; if ( a1->m_isSideways ) v164.origin.x = v164.origin.x - v56; else v164.origin.y = v164.origin.y - v56; goto LABEL_134; } cocos2d::CCRect::getMinY(&v163); v104 = v103; cocos2d::CCRect::getMaxY(&v162); v106 = v104 - v105; } v64 = v56 > v106; LABEL_134: if ( ((unsigned __int8)cocos2d::CCRect::intersectsRect(&v163, &v164) || (m_collidedObject = a1->m_collidedObject) != nullptr) && v64 ) { a1->m_isCollidingWithSlope = 1; cocos2d::CCRect::CCRect(&v165, &stru_1242038); PlayerObject::collidedWithObject(a1, m_collidedObject, &v165, 0.0); } LABEL_48: v27 = a1->m_currentSlope2; if ( v27 ) { v28 = 0; if ( !v27->m_isNonStickY ) { v29 = GameObject::getLastPosition(v27); cocos2d::CCPoint::CCPoint(&v164.origin, v29); ((void (__fastcall *)(cocos2d::CCRect *__return_ptr, GameObject *))a1->m_currentSlope2->getRealPosition)( &v165, a1->m_currentSlope2); if ( v165.origin.x != v164.origin.x || v165.origin.y != v164.origin.y ) { v28 = v165.origin.y < v164.origin.y; if ( a1->m_isUpsideDown ) v28 = v165.origin.y > v164.origin.y; } } } else { v28 = 0; } if ( !cocos2d::CCDictionary::count(a1->m_collisionLogBottom) || v28 ) { v75 = a1->m_currentSlope2; a1->m_isCollidingWithSlope = 0; a1->m_currentSlope2 = nullptr; if ( v28 ) { a1->m_isCollidingWithSlope = 1; PlayerObject::collidedWithSlope(a1, 0.0, v75, 1); } } m_yVelocityRelated = a1->m_yVelocityRelated; if ( m_yVelocityRelated != 0.0 && a1->m_stateBoostX <= 0 ) { m_groundYVelocity = a1->m_groundYVelocity; v96 = m_yVelocityRelated - m_groundYVelocity; if ( fabsf(v96) > (float)(v6 * 0.5) ) { v97 = a1->m_isUpsideDown; if ( a1->m_isUpsideDown ) { if ( m_yVelocityRelated < -5.0 && m_yVelocityRelated < m_groundYVelocity ) { if ( m_yVelocityRelated > 20.0 ) { m_yVelocityRelated = 20.0; a1->m_yVelocityRelated = 20.0; goto LABEL_292; } LABEL_321: if ( m_yVelocityRelated < -20.0 ) m_yVelocityRelated = -20.0; a1->m_yVelocityRelated = m_yVelocityRelated; if ( !v97 ) { LABEL_240: if ( m_yVelocityRelated < a1->m_yVelocity ) { LABEL_242: a1->m_currentSlope2 = nullptr; a1->m_lastGroundObject = nullptr; goto LABEL_57; } LABEL_241: v98 = m_yVelocityRelated; PlayerObject::boostPlayer(a1, v98); goto LABEL_242; } LABEL_292: if ( m_yVelocityRelated > a1->m_yVelocity ) goto LABEL_242; goto LABEL_241; } } else if ( m_yVelocityRelated > 5.0 && m_yVelocityRelated > m_groundYVelocity ) { if ( m_yVelocityRelated > 20.0 ) { m_yVelocityRelated = 20.0; a1->m_yVelocityRelated = 20.0; goto LABEL_240; } goto LABEL_321; } } } LABEL_57: if ( a1->m_isPlatformer ) { m_scaleXRelated3 = a1->m_scaleXRelated3; if ( m_scaleXRelated3 != 0.0 && !a1->m_isOnGround2 && !v24 && a1->m_stateBoostY <= 0 && a1->m_physDeltaRelated > 0.0500000007 ) { v32 = m_scaleXRelated3 - a1->m_scaleXRelated2; if ( fabsf(v32) > (float)(v6 * 0.5) ) { v33 = m_scaleXRelated3 * 0.899999976 / a2; if ( v4 ) { if ( !a1->m_collidingBetweenSteps ) v33 = v33 * 0.5; } else if ( a1->m_collidingBetweenSteps ) { v33 = v33 + v33; } v34 = v33 + a1->m_platformerXVelocity; a1->m_platformerXVelocity = v34; if ( fabsf(v33) >= 2.0 ) { v35 = v34; a1->m_maybeHasStopped = 1; a1->m_xVelocityRelated = v35; } a1->m_scaleXRelatedTime = 0.0; } } m_scaleXRelated5 = a1->m_scaleXRelated5; if ( m_scaleXRelated5 != 0.0 && a1->m_maybeStateForce2 <= 0 ) { m_scaleXRelated4 = a1->m_scaleXRelated4; v86 = m_scaleXRelated5 - m_scaleXRelated4; if ( fabsf(v86) > (float)(v6 * 0.5) ) { if ( (v87 = a1->m_collidingWithLeft != nullptr, v87 && m_scaleXRelated5 > 5.0) && m_scaleXRelated5 > m_scaleXRelated4 || a1->m_collidingWithRight != nullptr && m_scaleXRelated5 < -5.0 && m_scaleXRelated5 < m_scaleXRelated4 ) { *(double *)&v88 = 50.0; if ( m_scaleXRelated5 > 50.0 || (*(double *)&v88 = -50.0, m_scaleXRelated5 < -50.0) ) m_scaleXRelated5 = *(double *)&v88; a1->m_scaleXRelated5 = m_scaleXRelated5; if ( v87 && m_scaleXRelated5 >= a1->m_platformerXVelocity || a1->m_collidingWithRight && m_scaleXRelated5 <= a1->m_platformerXVelocity ) { a1->m_affectedByForces = 1; a1->m_isAccelerating = 1; a1->m_platformerXVelocity = m_scaleXRelated5; } a1->m_collidingWithLeft = nullptr; a1->m_collidingWithRight = nullptr; } } } if ( !cocos2d::CCDictionary::count(a1->m_collisionLogLeft) ) a1->m_collidingWithLeft = nullptr; if ( !cocos2d::CCDictionary::count(a1->m_collisionLogRight) ) a1->m_collidingWithRight = nullptr; } m_scaleXRelated2 = a1->m_scaleXRelated2; a1->m_collidedObject = nullptr; if ( m_scaleXRelated2 != 0.0 ) { a1->m_scaleXRelatedTime = a1->m_totalTime; LABEL_78: a1->m_collidingBetweenSteps = v4; a1->m_scaleXRelated3 = m_scaleXRelated2; goto LABEL_79; } if ( a1->m_scaleXRelated3 == 0.0 ) goto LABEL_78; if ( a1->m_totalTime - a1->m_scaleXRelatedTime >= 0.0333333351 ) a1->m_scaleXRelated3 = 0.0; LABEL_79: v38 = a1->m_scaleXRelated4; a1->m_yVelocityRelated = a1->m_groundYVelocity; a1->m_scaleXRelated2 = 0.0; a1->m_groundYVelocity = 0.0; a1->m_scaleXRelated5 = v38; a1->m_scaleXRelated4 = 0.0; if ( !v24 ) a1->m_physDeltaRelated = 0.0; if ( a1->m_isOnGround2 ) a1->m_maybeHasStopped = 0; if ( !a1->m_isOnSlope && !a1->m_wasOnSlope ) { v39 = a1->m_isUpsideDown; a1->m_collidingWithSlopeId = 0; m_yVelocity = a1->m_yVelocity; if ( v39 ) { if ( m_yVelocity > 2.0 && a1->m_fallSpeed < 2.0 ) { PlayerObject::gameEventTriggered(a1, 76, 0); m_yVelocity = a1->m_yVelocity; } if ( m_yVelocity > 7.0 && a1->m_fallSpeed < 7.0 ) { PlayerObject::gameEventTriggered(a1, 77, 0); m_yVelocity = a1->m_yVelocity; } if ( m_yVelocity <= 14.0 || a1->m_fallSpeed >= 14.0 ) goto LABEL_96; } else { if ( m_yVelocity < -2.0 && a1->m_fallSpeed > -2.0 ) { PlayerObject::gameEventTriggered(a1, 76, 0); m_yVelocity = a1->m_yVelocity; } if ( m_yVelocity < -7.0 && a1->m_fallSpeed > -7.0 ) { PlayerObject::gameEventTriggered(a1, 77, 0); m_yVelocity = a1->m_yVelocity; } if ( m_yVelocity >= -14.0 || a1->m_fallSpeed <= -14.0 ) goto LABEL_96; } PlayerObject::gameEventTriggered(a1, 78, 0); } m_yVelocity = a1->m_yVelocity; LABEL_96: m_reverseRelated = a1->m_reverseRelated; a1->m_fallSpeed = m_yVelocity; a1->m_reverseRelated = m_reverseRelated - 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source