// // PlayerObject::collidedWithObjectInternal from 0x140391a70 to 0x140393c22 (8626 bytes) // // 5 xrefs: // > PlayerObject::handleRotatedCollisionInternal @ 0x14038f200 // > PlayerObject::preSlopeCollision @ 0x14038f5a6 // > PlayerObject::preSlopeCollision @ 0x14038f7fb // > PlayerObject::collidedWithObject @ 0x140391a4a // > @ 0x1406d6260 // // 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 // // Hidden C++ exception states: #wind=13 bool PlayerObject::collidedWithObjectInternal(PlayerObject *a1, float a2, GameObject *a3, cocos2d::CCRect *a4, bool a5) { cocos2d::CCRect *v5; // rbx GameObject *v6; // rdi int m_uniqueID; // r13d bool v9; // zf PlayerObject_vtbl *v10; // rax GameObject *v11; // r15 const struct cocos2d::CCRect *v12; // rax const struct cocos2d::CCRect *v13; // rax bool m_isPlatformer; // dl float v15; // xmm0_4 double v16; // xmm0_8 bool m_isUpsideDown; // cl int v18; // eax double v19; // xmm8_8 int v20; // eax int v21; // eax PlayerObject_vtbl *v22; // rax float x; // xmm6_4 float v24; // xmm7_4 float y; // xmm9_4 float v26; // xmm0_4 bool v27; // cl float v28; // xmm2_4 double v29; // xmm1_8 int v30; // eax bool v31; // cc bool v32; // al const cocos2d::CCPoint *(__fastcall *getPosition_0)(cocos2d::CCNode *__hidden); // rdx float v34; // xmm0_4 double v35; // xmm6_8 int v36; // ebx float v37; // xmm1_4 double v38; // xmm9_8 double v39; // xmm10_8 bool v40; // bl const cocos2d::CCPoint *v41; // rax int v42; // ecx double v43; // xmm13_8 double v44; // xmm14_8 double MaxY; // xmm15_8 double MinY; // xmm12_8 bool m_isOnSlope; // al char v48; // si _QWORD *v49; // rbx char v50; // r13 GameObject *v51; // r12 GameObject_vtbl *v52; // rdi float *v53; // rsi cocos2d::CCRect *v54; // rax GameObject_vtbl *v55; // rdi float *v56; // rsi cocos2d::CCRect *v57; // rax const struct cocos2d::CCRect *v58; // rax const struct cocos2d::CCRect *v59; // rax cocos2d::CCRect *v60; // rax int m_slopeDirection; // edx bool v62; // cl GameObject *v63; // rdi float v64; // xmm0_4 double v65; // xmm0_8 int v66; // ecx bool v67; // al char v68; // cl bool v69; // si bool v70; // al char v71; // di char v72; // bl bool m_maybeUpsideDownSlope; // al bool v74; // al double v75; // xmm0_8 double v76; // xmm1_8 const struct cocos2d::CCRect *v77; // rax double m_yVelocity; // xmm7_8 PlayerObject_vtbl *v79; // rbx float v80; // xmm6_4 const cocos2d::CCPoint *v81; // rax const cocos2d::CCPoint *v82; // rax bool v83; // r8 int v84; // r8d float v85; // xmm0_4 int v86; // eax double v87; // xmm2_8 double v88; // xmm0_8 cocos2d::CCDictionary *v89; // rcx int v90; // r8d float v91; // xmm7_4 PlayerObject_vtbl *v92; // rbx float v93; // xmm6_4 const cocos2d::CCPoint *v94; // rax const cocos2d::CCPoint *v95; // rax GameObject *v96; // rdx bool v97; // r8 int v98; // r8d float v99; // xmm0_4 int v100; // eax double v101; // xmm2_8 double v102; // xmm0_8 cocos2d::CCDictionary *v103; // rcx int v104; // r8d GJBaseGameLayer *v105; // rcx char v106; // al char v107; // di const cocos2d::CCPoint *v108; // rax double v109; // xmm9_8 const cocos2d::CCPoint *v110; // rax double v111; // xmm10_8 bool v112; // si bool v113; // r12 float v114; // xmm13_4 const cocos2d::CCPoint *(__fastcall *v115)(cocos2d::CCNode *__hidden); // rdx float v116; // xmm8_4 bool v117; // cl int v118; // eax double v119; // xmm7_8 PlayerObject_vtbl *v120; // rbx float v121; // xmm6_4 const cocos2d::CCPoint *v122; // rax const cocos2d::CCPoint *v123; // rax bool v124; // r8 const struct cocos2d::CCRect *v125; // rax int v126; // r8d float v127; // xmm0_4 int v128; // eax double v129; // xmm1_8 double v130; // xmm0_8 cocos2d::CCDictionary *v131; // rcx int v132; // r8d double v133; // xmm7_8 PlayerObject_vtbl *v134; // rbx float v135; // xmm6_4 const cocos2d::CCPoint *v136; // rax const cocos2d::CCPoint *v137; // rax GameObject *v138; // rdx bool v139; // r8 int v140; // r8d float v141; // xmm0_4 int v142; // eax double v143; // xmm1_8 double v144; // xmm0_8 cocos2d::CCDictionary *v145; // rcx int v146; // r8d GJBaseGameLayer *v147; // rcx int v148; // ebx GJBaseGameLayer *v149; // rcx PlayerObject_vtbl *v150; // rbx float v151; // xmm6_4 const cocos2d::CCPoint *v152; // rax const cocos2d::CCPoint *v153; // rax GameObject *v154; // rdx char v155; // bl bool v156; // r8 float v157; // xmm1_4 double v158; // xmm0_8 double v159; // xmm1_8 float v160; // xmm1_4 double v161; // xmm0_8 double v162; // xmm1_8 double v163; // xmm0_8 float v164; // xmm1_4 double v165; // xmm0_8 double v166; // xmm1_8 cocos2d::CCDictionary *v167; // rcx float v168; // xmm1_4 double v169; // xmm0_8 cocos2d::CCDictionary *v170; // rcx double m_groundYVelocity; // xmm0_8 double v172; // xmm7_8 float v173; // xmm6_4 float v174; // xmm7_4 float *ScalePosDelta; // rax float v176; // xmm2_4 float v177; // xmm6_4 int v178; // ebx const cocos2d::CCPoint *v179; // rax char v180; // di GameObject *v181; // rax char v182; // bl bool v183; // al const cocos2d::CCPoint *v184; // rax double v185; // xmm6_8 PlayerObject_vtbl *v186; // rbx const cocos2d::CCPoint *v187; // rax DashRingObject *v188; // rax double v189; // xmm6_8 PlayerObject_vtbl *v190; // rbx const cocos2d::CCPoint *v191; // rax DashRingObject *m_dashRing; // rax double m_lastFlipTime; // xmm0_8 PlayerObject_vtbl *v194; // rbx const cocos2d::CCPoint *(__fastcall *v195)(cocos2d::CCNode *__hidden); // rax float v196; // xmm6_4 float *v197; // rax double v198; // xmm0_8 const cocos2d::CCPoint *v199; // rax float v200; // xmm0_4 double m_lastSpiderFlipTime; // xmm0_8 __int64 v202; // rcx int v204; // eax GJBaseGameLayer *m_gameLayer; // rcx PlayerObject_vtbl *v206; // rbx float v207; // xmm6_4 const cocos2d::CCPoint *v208; // rax const cocos2d::CCPoint *v209; // rax GameObject *v210; // rdx int v211; // r8d bool v212; // r8 float v213; // xmm1_4 double v214; // xmm0_8 double v215; // xmm1_8 double v216; // xmm0_8 float v217; // xmm1_4 double v218; // xmm0_8 double v219; // xmm1_8 double v220; // xmm0_8 float v221; // xmm1_4 double m_collidedTopMinY; // xmm0_8 cocos2d::CCDictionary *m_collisionLogTop; // rcx float v224; // xmm1_4 double m_collidedBottomMaxY; // xmm0_8 cocos2d::CCDictionary *m_collisionLogBottom; // rcx GJBaseGameLayer *v227; // rcx cocos2d::CCRGBAProtocol_vtbl *v228; // rax char v229; // [rsp+38h] [rbp-D0h] char v230; // [rsp+3Ah] [rbp-CEh] char v231; // [rsp+3Ah] [rbp-CEh] char v232; // [rsp+3Bh] [rbp-CDh] char v233; // [rsp+3Ch] [rbp-CCh] char v234; // [rsp+3Dh] [rbp-CBh] char v235; // [rsp+3Eh] [rbp-CAh] char v236; // [rsp+3Fh] [rbp-C9h] char v237; // [rsp+40h] [rbp-C8h] char v238; // [rsp+41h] [rbp-C7h] char v239; // [rsp+42h] [rbp-C6h] bool m_holdingRight; // [rsp+43h] [rbp-C5h] bool m_holdingLeft; // [rsp+44h] [rbp-C4h] cocos2d::CCRect v243; // [rsp+50h] [rbp-B8h] BYREF float v244; // [rsp+60h] [rbp-A8h] BOOL v245; // [rsp+64h] [rbp-A4h] float v246; // [rsp+68h] [rbp-A0h] cocos2d::CCPoint v247; // [rsp+70h] [rbp-98h] BYREF cocos2d::CCRect v248; // [rsp+78h] [rbp-90h] BYREF std::_List_val>>::_Nodeptr Myhead; // [rsp+88h] [rbp-80h] BYREF float v250; // [rsp+90h] [rbp-78h] double MaxX; // [rsp+98h] [rbp-70h] cocos2d::CCRect v252; // [rsp+A0h] [rbp-68h] BYREF double v253; // [rsp+B0h] [rbp-58h] double MinX; // [rsp+B8h] [rbp-50h] char v255[16]; // [rsp+C0h] [rbp-48h] BYREF double v256; // [rsp+D0h] [rbp-38h] cocos2d::CCRect v257; // [rsp+D8h] [rbp-30h] BYREF cocos2d::CCPoint v258; // [rsp+E8h] [rbp-20h] BYREF cocos2d::CCRect v259; // [rsp+F0h] [rbp-18h] BYREF cocos2d::CCRect v260[11]; // [rsp+100h] [rbp-8h] BYREF bool m_isPassable; // [rsp+1F8h] [rbp+F0h] void *v263; // [rsp+208h] [rbp+100h] BYREF v5 = a4; v6 = a3; m_holdingLeft = a1->m_holdingLeft; m_holdingRight = a1->m_holdingRight; if ( m_holdingLeft && a1->m_holdingRight ) { if ( a1->m_leftPressedFirst ) m_holdingRight = 0; else m_holdingLeft = 0; } m_uniqueID = 0; v9 = !cocos2d::CCRect::equals(a4, &stru_1406C2458); v10 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v9 ) { v11 = nullptr; v12 = v10->getObjectRect_0(a1); cocos2d::CCRect::CCRect(&v243, v12); } else { v13 = v10->getObjectRect_0(a1); cocos2d::CCRect::CCRect(&v243, v13); v11 = v6; if ( v6 ) v5 = (cocos2d::CCRect *)v6->getObjectRect_0(v6); } cocos2d::CCRect::CCRect(&v248, v5); m_isPlatformer = a1->m_isPlatformer; v246 = 5.0; if ( !m_isPlatformer || a1->m_wasOnSlope || a1->m_isOnSlope ) v15 = 10.0; else v15 = 5.0; v16 = v15; v253 = v16; if ( a1->m_stateScale > 0 ) { v16 = 15.0; v253 = 15.0; } m_isUpsideDown = a1->m_isUpsideDown; v18 = -1; if ( !m_isUpsideDown ) v18 = 1; v19 = (double)v18 * v16; if ( (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing) && !m_isPlatformer ) { v20 = -1; if ( !m_isUpsideDown ) v20 = 1; v19 = (float)((float)v20 * 6.0); } if ( a1->m_wasOnSlope ) { v21 = -1; if ( !m_isUpsideDown ) v21 = 1; v19 = v19 + (double)v21 * a1->unk_584; } if ( v11 ) m_isPassable = v11->m_isPassable; else m_isPassable = 0; LOBYTE(v5) = 0; v245 = (int)v5; v236 = 0; v238 = 0; v250 = 0.0; v244 = 0.0; if ( v6 && a2 > 0.0 ) { cocos2d::CCPoint::CCPoint(&v247); ((void (__fastcall *)(GameObject *, void **))v6->getRealPosition)(v6, &v263); v22 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( a1->m_isSideways ) { x = v247.x; v24 = *(float *)&v263; y = v22->getPosition_0(a1)->x; } else { x = v247.y; v24 = *((float *)&v263 + 1); y = v22->getPosition_0(a1)->y; } if ( a1->m_isSideways ) v26 = **(float **)&GameObject::getScalePosDelta(v6); else v26 = *(float *)(*(_QWORD *)&GameObject::getScalePosDelta(v6) + 4LL); if ( v26 != 0.0 ) { if ( v24 <= y ) x = x - v26; else x = x + v26; } if ( *(float *)&v263 != v247.x || *((float *)&v263 + 1) != v247.y ) { v27 = a1->m_isUpsideDown; if ( v27 ) { if ( x <= v24 ) { v31 = v24 == x; LABEL_58: if ( !v31 ) v238 = 1; goto LABEL_60; } } else if ( v24 <= x ) { v31 = x <= v24; goto LABEL_58; } v28 = (float)(v24 - x) / a2; v244 = v28; v29 = fabs(v28); v245 = v29 > 5.0; v30 = -1; if ( !v27 ) v30 = 1; v19 = v19 + (double)v30 * v29; if ( !a1->m_isPlatformer ) a1->m_groundYVelocity = v28; v236 = 1; } } LABEL_60: v32 = a1->m_isPlatformer; if ( !v32 ) v246 = 0.0; if ( a1->m_stateHitHead <= 0 && !v32 && a1->m_stateFlipGravity <= 0 || (v234 = 1, m_isPassable) ) v234 = 0; getPosition_0 = a1->getPosition_0; if ( a1->m_isSideways ) v34 = getPosition_0(a1)->x - a1->m_lastPosition.x; else v34 = getPosition_0(a1)->y - a1->m_lastPosition.y; v35 = v34; a1->getPosition_0(a1); v36 = -1; if ( !a1->m_isUpsideDown ) v36 = 1; v37 = a1->getPosition_0(a1)->y; v38 = (float)(v37 - (float)((float)(v243.size.height * 0.5) * (float)v36)) + v19; v39 = v38 - v35; v40 = a1->m_isUpsideDown; v41 = a1->getPosition_0(a1); v42 = 1; if ( !v40 ) v42 = -1; v43 = (float)(v41->y - (float)((float)v42 * (float)(v243.size.height * 0.5))) - v19; v44 = v43 - v35; a1->getPosition_0(a1); if ( a1->m_isUpsideDown ) { if ( v35 >= 0.0 ) { LABEL_79: v230 = 0; goto LABEL_80; } } else if ( v35 <= 0.0 ) { goto LABEL_79; } v230 = 1; LABEL_80: MinX = cocos2d::CCRect::getMinX(&v248); MaxX = cocos2d::CCRect::getMaxX(&v248); MaxY = cocos2d::CCRect::getMaxY(&v248); MinY = cocos2d::CCRect::getMinY(&v248); v256 = (float)((float)(v248.size.width * 0.5) + v248.origin.x); LOBYTE(v263) = 0; v239 = 1; if ( a1->m_isDart && a1->m_stateDartSlide <= 0 ) goto LABEL_254; m_isOnSlope = a1->m_isOnSlope; if ( !m_isOnSlope && !a1->m_wasOnSlope && !a1->m_potentialSlopeMap._List._Mypair._Myval2._Mysize ) { v233 = 0; v232 = 0; v229 = 0; goto LABEL_128; } v48 = 0; v232 = 0; v229 = 0; LOBYTE(v263) = m_isOnSlope || a1->m_wasOnSlope || !v11; v233 = 0; Myhead = a1->m_potentialSlopeMap._List._Mypair._Myval2._Myhead; v49 = *(_QWORD **)Myhead; if ( *(std::_List_val>>::_Nodeptr *)Myhead != Myhead ) { v50 = (char)v263; while ( 1 ) { v51 = (GameObject *)v49[3]; if ( !v50 && v51 != a1->m_currentSlope ) { v52 = v51->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v53 = (float *)v11->getPosition_0(v11); v54 = (cocos2d::CCRect *)v52->getObjectRect_0(v51); if ( *v53 <= cocos2d::CCRect::getMinX(v54) ) { v48 = v232; LABEL_123: v68 = v229; goto LABEL_124; } v55 = v51->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v56 = (float *)v11->getPosition_0(v11); v57 = (cocos2d::CCRect *)v55->getObjectRect_0(v51); v31 = cocos2d::CCRect::getMaxX(v57) <= *v56; v48 = v232; if ( v31 ) goto LABEL_123; } v58 = (const struct cocos2d::CCRect *)((__int64 (__fastcall *)(GameObject *, cocos2d::CCRect *))v51->getObjectRect)( v51, &v257); if ( !cocos2d::CCRect::intersectsRect(&v248, v58) ) goto LABEL_123; v59 = (const struct cocos2d::CCRect *)((__int64 (__fastcall *)(GameObject *, cocos2d::CCRect *))v51->getObjectRect)( v51, &v252); if ( !cocos2d::CCRect::intersectsRect(&v243, v59) ) goto LABEL_123; v233 = 1; cocos2d::CCRect::CCRect(&v259, &v248); m_slopeDirection = v51->m_slopeDirection; v62 = m_slopeDirection == 1 || ((m_slopeDirection - 3) & 0xFFFFFFFC) == 0 && m_slopeDirection != 4; if ( v51->m_slopeUphill ) { if ( !v62 ) goto LABEL_112; } else if ( v62 ) { LABEL_112: v63 = v51; v64 = cocos2d::CCRect::getMinX(v60); goto LABEL_107; } v63 = v51; v64 = cocos2d::CCRect::getMaxX(v60); LABEL_107: v65 = GameObject::slopeYPos(v63, v64); v66 = v51->m_slopeDirection; v67 = v66 == 1 || ((v66 - 3) & 0xFFFFFFFC) == 0 && v66 != 4; if ( v65 + 2.0 >= MaxY && (!v67 || a1->m_currentSlope == v51) ) { v48 = 1; v232 = 1; } if ( MinY < v65 - 2.0 || !v67 && a1->m_currentSlope != v51 ) goto LABEL_123; v68 = 1; v229 = 1; LABEL_124: if ( !v48 || !v68 ) { v49 = (_QWORD *)*v49; if ( v49 != (_QWORD *)Myhead ) continue; } m_uniqueID = 0; break; } } LABEL_128: v69 = v11 && v11->getType(v11) == Breakable; cocos2d::CCRect::CCRect( v260, (float)(v246 * 0.5) + v243.origin.x, v243.origin.y, v243.size.width - v246, v243.size.height); if ( a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing || a1->m_isBall || a1->m_isRobot || (v235 = 1, a1->m_isSpider) ) { v235 = 0; } v70 = a1->m_isUpsideDown; if ( !v70 || (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing || a1->m_isBall) && !m_isPassable ) { v71 = 1; if ( !v70 ) { if ( MinY >= v38 || MinY >= v39 ) { v72 = 1; goto LABEL_151; } LABEL_160: v72 = 0; goto LABEL_161; } } else { v71 = 0; } if ( v38 < MaxY && v39 < MaxY ) goto LABEL_160; v72 = 1; LABEL_151: LOBYTE(v263) = 1; if ( a1->m_isPlatformer && v69 && v230 && !a1->m_maybeTouchedBreakableBlock ) { v231 = 1; goto LABEL_162; } LABEL_161: LOBYTE(v263) = v72; v231 = 0; if ( !a1->m_isPlatformer ) goto LABEL_171; LABEL_162: if ( a1->m_isOnSlope || a1->m_wasOnSlope ) { m_maybeUpsideDownSlope = a1->m_maybeUpsideDownSlope; if ( v72 ) { if ( m_maybeUpsideDownSlope ) goto LABEL_169; goto LABEL_168; } if ( m_maybeUpsideDownSlope ) LABEL_168: v233 = 0; } LABEL_169: if ( !a5 && !cocos2d::CCRect::intersectsRect(v260, &v248) ) goto LABEL_253; LABEL_171: v237 = v72; if ( !v71 && !v234 || (!(v74 = a1->m_isUpsideDown) ? (v75 = v38, v76 = v38 - v35) : (v75 = v43, v76 = v43 - v35), v75 < MaxY && v76 < MaxY) ) { v106 = 1; goto LABEL_245; } if ( v74 && a1->m_isBird && v69 && !a1->m_isPlatformer ) { v77 = (const struct cocos2d::CCRect *)((__int64 (__fastcall *)(PlayerObject *, cocos2d::CCRect *))a1->getObjectRect)( a1, &v257); if ( cocos2d::CCRect::intersectsRect(&v248, v77) ) goto LABEL_569; goto LABEL_243; } m_yVelocity = a1->m_yVelocity; if ( (m_yVelocity <= 0.0 || a1->m_wasOnSlope || v245) && (!v233 || !v232) ) { if ( v72 ) { v204 = 1; if ( a1->m_isUpsideDown ) v204 = -1; if ( (double)v204 * m_yVelocity > 0.0 ) { m_gameLayer = a1->m_gameLayer; if ( m_gameLayer ) GJBaseGameLayer::gameEventTriggered(m_gameLayer, HitHead, 0, a1->m_uniqueID); } } v206 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v207 = v243.size.height * 0.5; v208 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(COERCE_FLOAT(COERCE_UNSIGNED_INT64(v207 + MaxY)), v208->x); v206->setPosition_0(a1, v209); if ( v235 ) PlayerObject::checkSnapJumpToObject(a1, v11); if ( !v234 || v71 ) { v212 = a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); v155 = (char)v263; if ( (_BYTE)v263 ) PlayerObject::hitGroundNoJump(a1, v210, v212); else PlayerObject::hitGround(a1, v11, v212); } else { a1->m_yVelocity = 0.0; v155 = (char)v263; } if ( a1->m_isUpsideDown ) { if ( v155 ) { if ( !v69 && !m_isPassable ) { if ( v11 ) m_uniqueID = v11->m_uniqueID; m_collidedTopMinY = a1->m_collidedTopMinY; v221 = MaxY; v215 = v221; if ( m_collidedTopMinY == 0.0 ) goto LABEL_533; v216 = fmax(m_collidedTopMinY, v215); goto LABEL_532; } LABEL_537: if ( a1->m_isPlatformer ) PlayerObject::exitPlatformerAnimateJump(a1); goto LABEL_554; } if ( v11 ) m_uniqueID = v11->m_uniqueID; m_collidedBottomMaxY = a1->m_collidedBottomMaxY; v224 = MinY; v219 = v224; if ( m_collidedBottomMaxY != 0.0 ) { v220 = fmin(m_collidedBottomMaxY, v219); goto LABEL_543; } } else { if ( v155 ) { if ( !v69 && !m_isPassable ) { if ( v11 ) m_uniqueID = v11->m_uniqueID; v214 = a1->m_collidedTopMinY; v213 = MinY; v215 = v213; if ( v214 == 0.0 ) goto LABEL_533; v216 = fmin(v214, v215); LABEL_532: v215 = v216; LABEL_533: a1->m_collidedTopMinY = v215; if ( m_uniqueID ) { if ( m_uniqueID != a1->m_lastCollisionTop ) { m_collisionLogTop = a1->m_collisionLogTop; a1->m_lastCollisionTop = m_uniqueID; if ( m_collisionLogTop ) cocos2d::CCDictionary::setObject(m_collisionLogTop, a1->m_maybeLastGroundObject, m_uniqueID); } } goto LABEL_537; } goto LABEL_537; } if ( v11 ) m_uniqueID = v11->m_uniqueID; v218 = a1->m_collidedBottomMaxY; v217 = MaxY; v219 = v217; if ( v218 != 0.0 ) { v220 = fmax(v218, v219); LABEL_543: v219 = v220; } } a1->m_collidedBottomMaxY = v219; if ( m_uniqueID ) { if ( m_uniqueID != a1->m_lastCollisionBottom ) { m_collisionLogBottom = a1->m_collisionLogBottom; a1->m_lastCollisionBottom = m_uniqueID; if ( m_collisionLogBottom ) cocos2d::CCDictionary::setObject(m_collisionLogBottom, a1->m_maybeLastGroundObject, m_uniqueID); } } if ( a3 ) { a1->m_lastGroundObject = a3; if ( a3->m_isDontBoostY ) a1->m_stateBoostX = 2; if ( a3->m_isDontBoostX ) a1->m_stateBoostY = 2; } a1->m_groundYVelocity = v244; LABEL_554: if ( v235 && a1->m_stateNoAutoJump > 0 && a1->m_padRingRelated ) a1->m_jumpBuffered = 0; if ( (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing) && v236 ) { if ( !v155 ) goto LABEL_567; PlayerObject::setYVelocity(a1, a1->m_groundYVelocity, v211); goto LABEL_566; } LABEL_565: if ( !v155 ) goto LABEL_567; goto LABEL_566; } if ( v74 ) { if ( !v72 || !v238 ) goto LABEL_243; v91 = a1->m_yVelocity; v92 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v93 = v243.size.height * 0.5; v94 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(COERCE_FLOAT(COERCE_UNSIGNED_INT64(v93 + MaxY)), v94->x); v92->setPosition_0(a1, v95); v97 = a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); PlayerObject::hitGroundNoJump(a1, v96, v97); if ( !v69 && !m_isPassable ) { if ( v11 ) v100 = v11->m_uniqueID; else v100 = 0; v101 = a1->m_collidedTopMinY; v99 = MaxY; v102 = v99; if ( v101 != 0.0 ) { if ( a1->m_isUpsideDown ) v102 = fmax(v101, v102); else v102 = fmin(v101, v102); } a1->m_collidedTopMinY = v102; if ( v100 ) { if ( v100 != a1->m_lastCollisionTop ) { a1->m_lastCollisionTop = v100; v103 = a1->m_collisionLogTop; if ( v103 ) cocos2d::CCDictionary::setObject(v103, a1->m_maybeLastGroundObject, v100); } } } PlayerObject::setYVelocity(a1, v91, v98); PlayerObject::setYVelocity(a1, fmax(a1->m_yVelocity, a1->m_groundYVelocity + 1.0), v104); PlayerObject::didHitHead(a1); if ( v231 ) { a1->m_maybeTouchedBreakableBlock = 1; v105 = a1->m_gameLayer; if ( v105 ) { GJBaseGameLayer::destroyObject(v105, v11); } else { v11->m_isDisabled = 1; v11->m_isDisabled2 = 1; v11->setOpacity(&v11->cocos2d::CCRGBAProtocol, 0); } } } else { if ( v72 || !v236 ) goto LABEL_243; v79 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v80 = v243.size.height * 0.5; v81 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(COERCE_FLOAT(COERCE_UNSIGNED_INT64(v80 + MaxY)), v81->x); v79->setPosition_0(a1, v82); v83 = a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); PlayerObject::hitGround(a1, v11, v83); if ( v11 ) v86 = v11->m_uniqueID; else v86 = 0; v87 = a1->m_collidedBottomMaxY; v85 = MaxY; v88 = v85; if ( v87 != 0.0 ) { if ( a1->m_isUpsideDown ) v88 = fmin(v87, v88); else v88 = fmax(v87, v88); } a1->m_collidedBottomMaxY = v88; if ( v86 ) { if ( v86 != a1->m_lastCollisionBottom ) { a1->m_lastCollisionBottom = v86; v89 = a1->m_collisionLogBottom; if ( v89 ) cocos2d::CCDictionary::setObject(v89, a1->m_maybeLastGroundObject, v86); } } if ( a3 ) { a1->m_lastGroundObject = a3; if ( a3->m_isDontBoostY ) a1->m_stateBoostX = 2; if ( a3->m_isDontBoostX ) a1->m_stateBoostY = 2; } a1->m_groundYVelocity = v244; PlayerObject::setYVelocity(a1, m_yVelocity, v84); PlayerObject::setYVelocity(a1, fmax(a1->m_yVelocity, a1->m_groundYVelocity), v90); } v72 = (char)v263; LABEL_243: v106 = 0; v239 = 0; LABEL_245: if ( a1->m_isUpsideDown || (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing || a1->m_isBall) && !m_isPassable ) { v107 = 1; } else { v107 = 0; if ( !v234 ) { LABEL_253: v6 = a3; goto LABEL_254; } } if ( !v106 ) goto LABEL_253; v117 = a1->m_isUpsideDown; if ( v117 ) { v43 = v38; v44 = v39; } if ( v11 ) v118 = v11->m_uniqueID; else v118 = 0; if ( MinY < v43 && MinY < v44 ) { if ( v117 ) { if ( v118 != a1->m_unk50C ) goto LABEL_253; goto LABEL_270; } if ( v118 != a1->m_unk510 ) goto LABEL_253; } if ( !v117 && a1->m_isBird && v69 && !a1->m_isPlatformer ) { v125 = (const struct cocos2d::CCRect *)((__int64 (__fastcall *)(PlayerObject *, char *))a1->getObjectRect)(a1, v255); if ( cocos2d::CCRect::intersectsRect(&v248, v125) ) { LABEL_569: v227 = a1->m_gameLayer; if ( v227 ) { GJBaseGameLayer::destroyObject(v227, v11); } else { v228 = v11->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable; v11->m_isDisabled = 1; v11->m_isDisabled2 = 1; v228->setOpacity(&v11->cocos2d::CCRGBAProtocol, 0); } return 1; } goto LABEL_338; } LABEL_270: if ( (a1->m_yVelocity >= 0.0 || a1->m_isPlatformer && a1->m_yVelocityRelated > 0.0 || a1->m_wasOnSlope || v245) && (!v233 || !v229) ) { if ( v72 ) { v148 = -1; if ( !a1->m_isUpsideDown ) v148 = 1; if ( (double)v148 * a1->m_yVelocity > 0.0 ) { v149 = a1->m_gameLayer; if ( v149 ) GJBaseGameLayer::gameEventTriggered(v149, HitHead, 0, a1->m_uniqueID); } } v150 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v151 = v243.size.height * 0.5; v152 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(v151, v152->x); v150->setPosition_0(a1, v153); if ( v235 ) PlayerObject::checkSnapJumpToObject(a1, v11); if ( !v234 || v107 ) { v156 = !a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); v155 = (char)v263; if ( (_BYTE)v263 ) PlayerObject::hitGroundNoJump(a1, v154, v156); else PlayerObject::hitGround(a1, v11, v156); } else { a1->m_yVelocity = 0.0; v155 = (char)v263; } if ( a1->m_isUpsideDown ) { if ( v155 ) { if ( !v69 && !m_isPassable ) { if ( v11 ) m_uniqueID = v11->m_uniqueID; v165 = a1->m_collidedTopMinY; v164 = MaxY; v166 = v164; if ( v165 != 0.0 ) v166 = fmax(v165, v166); a1->m_collidedTopMinY = v166; goto LABEL_381; } LABEL_385: if ( a1->m_isPlatformer ) PlayerObject::exitPlatformerAnimateJump(a1); goto LABEL_402; } if ( v11 ) m_uniqueID = v11->m_uniqueID; v169 = a1->m_collidedBottomMaxY; v168 = MinY; v162 = v168; if ( v169 != 0.0 ) { v163 = fmin(v169, v162); goto LABEL_391; } } else { if ( v155 ) { if ( !v69 && !m_isPassable ) { if ( v11 ) m_uniqueID = v11->m_uniqueID; v158 = a1->m_collidedTopMinY; v157 = MinY; v159 = v157; if ( v158 != 0.0 ) v159 = fmin(v158, v159); a1->m_collidedTopMinY = v159; LABEL_381: if ( m_uniqueID ) { if ( m_uniqueID != a1->m_lastCollisionTop ) { v167 = a1->m_collisionLogTop; a1->m_lastCollisionTop = m_uniqueID; if ( v167 ) cocos2d::CCDictionary::setObject(v167, a1->m_maybeLastGroundObject, m_uniqueID); } } goto LABEL_385; } goto LABEL_385; } if ( v11 ) m_uniqueID = v11->m_uniqueID; v161 = a1->m_collidedBottomMaxY; v160 = MaxY; v162 = v160; if ( v161 != 0.0 ) { v163 = fmax(v161, v162); LABEL_391: v162 = v163; } } a1->m_collidedBottomMaxY = v162; if ( m_uniqueID ) { if ( m_uniqueID != a1->m_lastCollisionBottom ) { v170 = a1->m_collisionLogBottom; a1->m_lastCollisionBottom = m_uniqueID; if ( v170 ) cocos2d::CCDictionary::setObject(v170, a1->m_maybeLastGroundObject, m_uniqueID); } } if ( a3 ) { a1->m_lastGroundObject = a3; if ( a3->m_isDontBoostY ) a1->m_stateBoostX = 2; if ( a3->m_isDontBoostX ) a1->m_stateBoostY = 2; } a1->m_groundYVelocity = v244; LABEL_402: if ( v235 && a1->m_stateNoAutoJump > 0 && a1->m_padRingRelated ) a1->m_jumpBuffered = 0; if ( (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing) && v236 ) { if ( !v155 ) goto LABEL_567; m_groundYVelocity = a1->m_groundYVelocity; v172 = (double)(int)m_groundYVelocity; if ( m_groundYVelocity == v172 ) a1->m_yVelocity = m_groundYVelocity; else a1->m_yVelocity = round((m_groundYVelocity - v172) * 1000.0) / 1000.0 + v172; LABEL_566: PlayerObject::didHitHead(a1); LABEL_567: if ( v231 ) { a1->m_maybeTouchedBreakableBlock = 1; goto LABEL_569; } return 1; } goto LABEL_565; } if ( !a1->m_isUpsideDown ) { LOBYTE(v263) = v237; if ( v237 ) { LOBYTE(v263) = v237; if ( v238 ) { v133 = a1->m_yVelocity; v134 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v135 = v243.size.height * 0.5; v136 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(v135, v136->x); v134->setPosition_0(a1, v137); v139 = a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); PlayerObject::hitGroundNoJump(a1, v138, v139); if ( !v69 && !m_isPassable ) { if ( v11 ) v142 = v11->m_uniqueID; else v142 = 0; v143 = a1->m_collidedTopMinY; v141 = MinY; v144 = v141; if ( v143 != 0.0 ) { if ( a1->m_isUpsideDown ) v144 = fmax(v143, v144); else v144 = fmin(v143, v144); } a1->m_collidedTopMinY = v144; if ( v142 ) { if ( v142 != a1->m_lastCollisionTop ) { a1->m_lastCollisionTop = v142; v145 = a1->m_collisionLogTop; if ( v145 ) cocos2d::CCDictionary::setObject(v145, a1->m_maybeLastGroundObject, v142); } } } PlayerObject::setYVelocity(a1, v133, v140); PlayerObject::setYVelocity(a1, fmin(a1->m_yVelocity, a1->m_groundYVelocity - 1.0), v146); PlayerObject::didHitHead(a1); LOBYTE(v263) = v237; if ( v231 ) { a1->m_maybeTouchedBreakableBlock = 1; v147 = a1->m_gameLayer; if ( v147 ) { GJBaseGameLayer::destroyObject(v147, v11); } else { v11->m_isDisabled = 1; v11->m_isDisabled2 = 1; v11->setOpacity(&v11->cocos2d::CCRGBAProtocol, 0); } LOBYTE(v263) = v237; } } } goto LABEL_338; } if ( v72 || !v236 ) { LABEL_338: v6 = a3; v239 = 0; goto LABEL_254; } v119 = a1->m_yVelocity; v120 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v121 = v243.size.height * 0.5; v122 = a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(v121, v122->x); v120->setPosition_0(a1, v123); v124 = a1->m_isUpsideDown && (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing); PlayerObject::hitGround(a1, v11, v124); if ( v11 ) v128 = v11->m_uniqueID; else v128 = 0; v129 = a1->m_collidedBottomMaxY; v127 = MinY; v130 = v127; if ( v129 != 0.0 ) { if ( a1->m_isUpsideDown ) v130 = fmin(v129, v130); else v130 = fmax(v129, v130); } a1->m_collidedBottomMaxY = v130; if ( v128 ) { if ( v128 != a1->m_lastCollisionBottom ) { a1->m_lastCollisionBottom = v128; v131 = a1->m_collisionLogBottom; if ( v131 ) cocos2d::CCDictionary::setObject(v131, a1->m_maybeLastGroundObject, v128); } } v6 = a3; if ( a3 ) { a1->m_lastGroundObject = a3; if ( a3->m_isDontBoostY ) a1->m_stateBoostX = 2; if ( a3->m_isDontBoostX ) a1->m_stateBoostY = 2; } a1->m_groundYVelocity = v244; PlayerObject::setYVelocity(a1, v119, v126); PlayerObject::setYVelocity(a1, fmin(a1->m_yVelocity, a1->m_groundYVelocity), v132); v239 = 0; LABEL_254: if ( !a1->m_isPlatformer ) goto LABEL_467; a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(&v258); a1->getPosition_0(a1); a1->getPosition_0(a1); v108 = a1->getPosition_0(a1); v109 = (float)((float)(v243.size.height * 0.5) + v108->y) - v253; v110 = a1->getPosition_0(a1); v111 = (float)(v110->y - (float)(v243.size.height * 0.5)) + v253; v112 = 0; v113 = 0; v114 = v250; if ( v6 && a2 > v250 ) { cocos2d::CCPoint::CCPoint(&v247); ((void (__fastcall *)(GameObject *, std::_List_val>>::_Nodeptr *))v6->getRealPosition)( v6, &Myhead); v115 = a1->getPosition_0; if ( a1->m_isSideways ) v116 = v115(a1)->x; else v116 = v115(a1)->y; if ( a1->m_isSideways ) { v173 = v247.y; v174 = *((float *)&Myhead + 1); ScalePosDelta = (float *)(*(_QWORD *)&GameObject::getScalePosDelta(v6) + 4LL); } else { v173 = v247.x; v174 = *(float *)&Myhead; ScalePosDelta = (float *)GameObject::getScalePosDelta(v6); } v176 = *ScalePosDelta; v112 = v114 > (float)((float)(v174 - v173) + *ScalePosDelta); v113 = (float)((float)(v174 - v173) - *ScalePosDelta) > v114; if ( v174 <= v116 ) v177 = v173 - v176; else v177 = v173 + v176; v114 = (float)(v174 - v177) / a2; } if ( a1->m_isOnSlope || a1->m_wasOnSlope || a1->m_totalTime - a1->m_slopeEndTime < 0.2000000029802322 ) { v178 = -1; if ( !a1->m_isUpsideDown ) v178 = 1; v179 = a1->getPosition_0(a1); v109 = (float)((float)((float)(v243.size.height * 0.5) * (float)v178) + v179->y); v111 = a1->getPosition_0(a1)->y; } if ( v6 && v6 == a1->m_collidingWithLeft ) { v180 = 1; v181 = a3; } else { v180 = 0; v181 = a3; if ( !a3 ) { LABEL_435: v182 = 0; goto LABEL_436; } } if ( v181 != a1->m_collidingWithRight ) goto LABEL_435; v182 = 1; LABEL_436: cocos2d::CCRect::CCRect( &v257, v243.origin.x, (float)(v246 * 0.5) + v243.origin.y, v243.size.width, v243.size.height - v246); v183 = m_isPassable; if ( m_isPassable ) goto LABEL_468; if ( (cocos2d::CCRect::intersectsRect(&v257, &v248) || v180 || v182) && (MaxY > v109 && v109 > MinY || MaxY > v111 && v111 > MinY) ) { a1->m_scaleXRelated4 = v114; if ( v180 || (v184 = a1->getPosition_0(a1), v256 < v184->x) && !v182 ) { v189 = MaxX; PlayerObject::updateCollideLeft(a1, MaxX, v11); v190 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(v243.size.width * 0.5, (float)(v243.size.width * 0.5) + v189); v190->setPosition_0(a1, v191); if ( a1->m_platformerXVelocity < 0.0 && (!m_holdingLeft || !v112) ) a1->m_platformerXVelocity = 0.0; if ( a1->m_isDashing ) { m_dashRing = a1->m_dashRing; if ( !m_dashRing || !m_dashRing->m_allowCollide ) { PlayerObject::stopDashing(a1); a1->m_jumpBuffered = 0; } } v183 = 0; if ( a1->m_platformerMovingLeft ) a1->m_maybeSlidingTime = 0; } else { v185 = MinX; PlayerObject::updateCollideRight(a1, MinX, v11); v186 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(v243.size.width * 0.5, v185 - (float)(v243.size.width * 0.5)); v186->setPosition_0(a1, v187); if ( a1->m_platformerXVelocity > 0.0 && (!m_holdingRight || !v113) ) a1->m_platformerXVelocity = 0.0; if ( a1->m_isDashing ) { v188 = a1->m_dashRing; if ( !v188 || !v188->m_allowCollide ) { PlayerObject::stopDashing(a1); a1->m_jumpBuffered = 0; } } v183 = 0; if ( a1->m_platformerMovingRight ) a1->m_maybeSlidingTime = 0; } goto LABEL_468; } LABEL_467: v183 = m_isPassable; LABEL_468: if ( !v239 ) return 0; if ( a1->m_isPlatformer ) return 0; if ( v183 ) return 0; ((void (__fastcall *)(PlayerObject *, cocos2d::CCRect *))a1->getObjectRect)(a1, &v252); if ( !cocos2d::CCRect::intersectsRect(&v248, &v252) ) return 0; if ( (_BYTE)v263 ) { m_lastFlipTime = a1->m_lastFlipTime; if ( m_lastFlipTime != 0.0 && a1->m_totalTime - m_lastFlipTime < 0.1000000014901161 ) { v194 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v195 = a1->getPosition_0; v196 = v243.size.height * 0.5; if ( a1->m_isUpsideDown ) { v197 = (float *)v195(a1); v198 = v196 + MaxY; } else { v197 = (float *)v195(a1); v198 = v196; } cocos2d::CCPoint::CCPoint(*(float *)&v198, *v197); v194->setPosition_0(a1, v199); PlayerObject::hitGround(a1, v11, 1); a1->m_isOnGround2 = 0; return 1; } } if ( !a1->m_isSpider || (v200 = cocos2d::CCRect::getMaxX(&v248), cocos2d::CCRect::getMaxX(&v252) <= v200) || (m_lastSpiderFlipTime = a1->m_lastSpiderFlipTime, m_lastSpiderFlipTime == 0.0) || a1->m_totalTime - m_lastSpiderFlipTime >= 0.03999999910593033 ) { if ( v11 && v11->getType(v11) == Breakable ) goto LABEL_569; if ( !a1->m_maybeCanRunIntoBlocks ) { v202 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v263 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v263); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v202 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD, PlayerObject *, _QWORD))(**(_QWORD **)(v202 + 520) + 1128LL))( *(_QWORD *)(v202 + 520), a1, 0); return 1; } if ( !a1->m_ignoreDamage ) { a1->m_maybeIsColliding = 1; return 1; } return 0; } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source