// // PlayerObject::spiderTestJumpInternal from 0x633ef4 to 0x634b7c (3208 bytes) // // 3 xrefs: // > PlayerObject::spiderTestJumpInternal @ 0x63480c // > PlayerObject::spiderTestJump @ 0x634b98 // > @ 0x688f8 // // 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::spiderTestJumpInternal(PlayerObject *a1, bool a2) { float v3; // s8 const cocos2d::CCRect *v4; // x0 int v5; // w25 const cocos2d::CCRect *v6; // x0 float MinPortalY; // s14 PlayerObject_vtbl *v8; // x1 float v9; // s15 float v10; // s0 _BOOL4 v11; // w0 _BOOL4 v12; // w0 float v13; // s0 GJBaseGameLayer *m_gameLayer; // x24 cocos2d::CCArray *v15; // x21 GJBaseGameLayer *v16; // x24 int (*v17)(const void *, const void *); // x23 GJBaseGameLayer *v18; // x21 unsigned int v19; // w23 float v20; // s12 const cocos2d::CCPoint *v21; // x0 __int64 v22; // x0 GameObject *v23; // x19 cocos2d::CCRect *v24; // x0 float v25; // s0 float v26; // s8 float y; // s8 int v28; // w27 float v29; // s0 _BOOL4 v30; // w0 cocos2d::CCRect *v31; // x0 float v32; // s0 float v33; // s1 float v34; // s9 int v35; // w1 float width; // s0 PlayerObject_vtbl *v37; // x1 const cocos2d::CCPoint *v38; // x0 void (__fastcall *setPosition)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x2 int v40; // w0 cocos2d::CCPoint *v41; // x1 GJBaseGameLayer *v42; // x0 const cocos2d::CCRect *v43; // x0 float MaxPortalY; // s0 float v45; // s1 unsigned int v46; // w19 __int64 v47; // x0 __int64 (__fastcall *v48)(__int64); // x1 const cocos2d::CCRect *v49; // x0 cocos2d::CCRect *v50; // x0 float v51; // s0 GameObject_vtbl *v52; // x1 __int128 v53; // q0 float v54; // s0 float v55; // s8 float v56; // s0 int v57; // w0 float x; // s0 __int64 (__fastcall *v59)(__int64); // x1 const cocos2d::CCRect *v60; // x0 float v61; // s0 __int64 v62; // x0 float v63; // s0 int v64; // w0 __int64 v65; // x0 float v66; // s1 _BOOL4 m_isPlatformer; // w0 _BOOL4 m_isGoingLeft; // w0 float v69; // s0 int v70; // w0 cocos2d::CCRect *v71; // x0 float v72; // s0 float v73; // s1 float v74; // s0 float height; // s0 _QWORD v76[2]; // [xsp+0h] [xbp+0h] BYREF double v77[3]; // [xsp+A0h] [xbp+A0h] cocos2d::CCPoint *v78; // [xsp+B8h] [xbp+B8h] int v79; // [xsp+C4h] [xbp+C4h] cocos2d::CCArray *v80; // [xsp+C8h] [xbp+C8h] cocos2d::CCPoint *v81; // [xsp+D0h] [xbp+D0h] _BOOL4 m_isSideways; // [xsp+D8h] [xbp+D8h] _BOOL4 v83; // [xsp+DCh] [xbp+DCh] cocos2d::CCPoint v84; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCPoint v85; // [xsp+F0h] [xbp+F0h] BYREF cocos2d::CCRect v86; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCRect v87; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCRect v88; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCRect v89; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCRect v90; // [xsp+138h] [xbp+138h] BYREF cocos2d::CCRect v91; // [xsp+148h] [xbp+148h] BYREF cocos2d::CCPoint v92; // 0:s0.4,4:s1.4 cocos2d::CCPoint v93; // 0:s2.4,4:s3.4 cocos2d::CCRect v94; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v95; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v96; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v83 = a2; if ( a1->m_isDead || a1->m_isLocked || a1->m_maybeReducedEffects ) return; m_isSideways = a1->m_isSideways; if ( m_isSideways ) { v3 = a1->m_vehicleSize * 8.0; v6 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v86, v6); cocos2d::CCRect::CCRect(&v87, &v86); if ( !a1->m_isSideways ) { v5 = 0; goto LABEL_11; } v5 = 0; v79 = 1; LABEL_66: v9 = a1->getPosition(a1)->x + 3000.0; MinPortalY = 0.0; if ( (float)(a1->getPosition(a1)->x - 3000.0) > 0.0 ) MinPortalY = a1->getPosition(a1)->x - 3000.0; goto LABEL_14; } v3 = a1->m_vehicleSize * 8.0; if ( !a1->m_gameLayer->m_gameState.m_isFreeMode && !PlayerObject::isInBasicMode(a1) ) { v43 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v86, v43); cocos2d::CCRect::CCRect(&v87, &v86); if ( !a1->m_isSideways ) { MinPortalY = GJBaseGameLayer::getMinPortalY(a1->m_gameLayer); MaxPortalY = GJBaseGameLayer::getMaxPortalY(a1->m_gameLayer); v79 = 0; v9 = MaxPortalY; if ( !a1->m_isUpsideDown ) { LABEL_64: v5 = 1; v45 = v9 - (float)((float)(v87.size.height - 2.0) + v87.origin.y); v87.origin.y = (float)(v87.size.height - 2.0) + v87.origin.y; v87.size.height = v45; goto LABEL_17; } goto LABEL_146; } v79 = 0; v5 = 1; goto LABEL_66; } v4 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v86, v4); cocos2d::CCRect::CCRect(&v87, &v86); if ( a1->m_isSideways ) { v79 = 1; v5 = 1; goto LABEL_66; } v5 = 1; LABEL_11: MinPortalY = 90.0; if ( (float)(a1->getPosition(a1)->y - 3000.0) > 90.0 ) MinPortalY = a1->getPosition(a1)->y - 3000.0; v8 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v79 = 1; v9 = v8->getPosition(a1)->y + 3000.0; LABEL_14: if ( !a1->m_isUpsideDown ) { if ( !v5 ) { v66 = v9 - (float)((float)(v87.size.width - 2.0) + v87.origin.x); v87.origin.x = (float)(v87.size.width - 2.0) + v87.origin.x; v87.size.width = v66; goto LABEL_17; } goto LABEL_64; } if ( v5 ) { LABEL_146: v5 = 1; v74 = v87.origin.y - MinPortalY; v87.origin.y = MinPortalY; v87.size.height = v74 + 2.0; goto LABEL_17; } v10 = v87.origin.x - MinPortalY; v87.origin.x = MinPortalY; v87.size.width = v10 + 2.0; LABEL_17: cocos2d::CCRect::CCRect(&v88, &v87); if ( m_isSideways ) { v88.size.height = v86.size.height; v88.origin.y = v86.origin.y; cocos2d::CCRect::CCRect(&v89, &v88); m_isPlatformer = a1->m_isPlatformer; v88.size.height = v3; v89.size.height = v89.size.height + 4.0; v88.origin.y = v88.origin.y + (float)((float)(v87.size.height - v3) * 0.5); if ( m_isPlatformer ) { v87.size.height = v87.size.height - 2.0; v87.origin.y = v87.origin.y + 1.0; } else { m_isGoingLeft = a1->m_isGoingLeft; v87.size.height = (float)(v86.size.height * 0.5) + 1.0; if ( m_isGoingLeft ) v69 = (float)(v86.origin.y - (float)(v86.size.height * 0.5)) - 1.0; else v69 = v86.origin.y + (float)(v86.size.height * 0.5); v87.origin.y = v69; } } else { v88.size.width = v86.size.width; v88.origin.x = v86.origin.x; cocos2d::CCRect::CCRect(&v89, &v88); v11 = a1->m_isPlatformer; v88.size.width = v3; v89.size.width = v89.size.width + 4.0; v88.origin.x = v88.origin.x + (float)((float)(v87.size.width - v3) * 0.5); if ( v11 ) { v87.size.width = v87.size.width - 2.0; v87.origin.x = v87.origin.x + 1.0; } else { v12 = a1->m_isGoingLeft; v87.size.width = (float)(v86.size.width * 0.5) + 1.0; if ( v12 ) v13 = (float)(v86.origin.x - (float)(v86.size.width * 0.5)) - 1.0; else v13 = v86.origin.x + (float)(v86.size.width * 0.5); v87.origin.x = v13; } } m_gameLayer = a1->m_gameLayer; cocos2d::CCRect::CCRect(&v91, &v87); v15 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v94, (unsigned __int8)v76 + 72); v16 = a1->m_gameLayer; cocos2d::CCRect::CCRect(&v91, &v88); v80 = GJBaseGameLayer::damagingObjectsInRect(v16, v95, (unsigned __int8)v76 + 72); if ( a1->m_isSideways ) { if ( a1->m_isUpsideDown ) v17 = (int (*)(const void *, const void *))boxCompMaxX; else v17 = (int (*)(const void *, const void *))boxCompMinX; } else if ( a1->m_isUpsideDown ) { v17 = (int (*)(const void *, const void *))boxCompMax; } else { v17 = (int (*)(const void *, const void *))boxCompMin; } if ( !(unsigned int)cocos2d::CCArray::count(v15) && (unsigned int)cocos2d::CCArray::count(v80) || v83 ) { v18 = a1->m_gameLayer; v83 = 1; cocos2d::CCRect::CCRect(&v91, &v89); v15 = GJBaseGameLayer::staticObjectsInRect(v18, v96, (unsigned __int8)v76 + 72); } if ( (unsigned int)cocos2d::CCArray::count(v15) ) qsort(v15->data->arr, v15->data->num, 8u, v17); if ( (unsigned int)cocos2d::CCArray::count(v80) ) qsort(v80->data->arr, v80->data->num, 8u, v17); if ( !(unsigned int)cocos2d::CCArray::count(v15) ) { v64 = cocos2d::CCArray::count(v80); v35 = 0; if ( v64 ) { v65 = cocos2d::CCArray::objectAtIndex(v80, 0); (*(void (__fastcall **)(__int64))(*(_QWORD *)v65 + 1344LL))(v65); if ( v5 ) y = v91.origin.y; else y = v91.origin.x; v35 = 1; goto LABEL_50; } LABEL_51: if ( a1->m_isUpsideDown ) { if ( v5 ) height = v86.size.height; else height = v86.size.width; v34 = MinPortalY + (float)(height * 0.5); } else { if ( v5 ) width = v86.size.height; else width = v86.size.width; v34 = v9 - (float)(width * 0.5); } LABEL_55: if ( !v35 ) goto LABEL_107; goto LABEL_56; } v81 = &v84; v78 = &v85; v19 = 0; cocos2d::CCRect::CCRect(&v90, &v86); v20 = 0.0; v21 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v84, v21); while ( 1 ) { while ( 1 ) { if ( v19 >= (unsigned int)cocos2d::CCArray::count(v15) ) { v34 = v20; v30 = a1->m_isPlatformer; y = 0.0; goto LABEL_49; } v22 = cocos2d::CCArray::objectAtIndex(v15, v19); v23 = (GameObject *)v22; if ( a1->m_isUpsideDown ) { v50 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 1312LL))(v22); if ( v5 ) { cocos2d::CCRect::getMaxY(v50); y = v61 + (float)(v86.size.height * 0.5); } else { cocos2d::CCRect::getMaxX(v50); y = v51 + (float)(v86.size.width * 0.5); } v28 = 0; if ( v23->getType(v23) != Slope ) goto LABEL_39; } else { v24 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 1312LL))(v22); if ( v5 ) { cocos2d::CCRect::getMinY(v24); v26 = v86.size.height; } else { cocos2d::CCRect::getMinX(v24); v26 = v86.size.width; } y = v25 - (float)(v26 * 0.5); v28 = 0; if ( v23->getType(v23) != Slope ) goto LABEL_39; } v23->getRealPosition(v23); if ( a1->m_isSideways ) PlayerObject::rotateGameplayObject(a1, v23); v28 = 0; if ( a1->m_isUpsideDown != GameObject::slopeFloorTop(v23) ) { GameObject::slopeYPos(v23, v81->x); v52 = v23->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; *(_OWORD *)v77 = v53; ((void (__fastcall *)(cocos2d::CCRect *__return_ptr, GameObject *))v52->getRealPosition)(&v91, v23); v54 = v77[0] - v91.origin.y; if ( v5 ) { v55 = v86.size.height; v56 = v54 + v78->y; } else { v55 = v86.size.width; v56 = v54 + v78->x; } *(float *)v77 = v56; v28 = 1; v57 = PlayerObject::flipMod(a1); y = *(float *)v77 + (float)((float)(v55 * 0.5) * (float)-v57); } if ( a1->m_isSideways ) PlayerObject::unrotateGameplayObject(a1, v23); LABEL_39: if ( a1->m_isUpsideDown ) break; if ( v5 ) x = v81->y; else x = v81->x; if ( y >= (float)(x - 10.0) ) goto LABEL_43; ++v19; } if ( v5 ) v29 = v81->y; else v29 = v81->x; if ( y > (float)(v29 + 10.0) ) goto LABEL_80; LABEL_43: v30 = a1->m_isPlatformer; if ( a1->m_isPlatformer ) { if ( !v28 ) goto LABEL_98; } else { if ( !a1->m_isGoingLeft ) { v71 = (cocos2d::CCRect *)v23->getObjectRect(v23); if ( m_isSideways ) { cocos2d::CCRect::getMinY(v71); v73 = v81->y; } else { cocos2d::CCRect::getMinX(v71); v73 = v81->x; } if ( v73 < v72 ) goto LABEL_69; if ( !a1->m_isGoingLeft ) goto LABEL_48; } v31 = (cocos2d::CCRect *)v23->getObjectRect(v23); if ( m_isSideways ) { cocos2d::CCRect::getMaxY(v31); v33 = v81->y; } else { cocos2d::CCRect::getMaxX(v31); v33 = v81->x; } if ( v33 <= v32 ) { LABEL_48: v34 = v20; v30 = a1->m_isPlatformer; goto LABEL_49; } } LABEL_69: v46 = 0; if ( !(unsigned int)cocos2d::CCArray::count(v15) ) break; while ( 1 ) { v47 = cocos2d::CCArray::objectAtIndex(v15, v46); if ( v19 != v46 ) { if ( v5 ) { v59 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v47 + 1312LL); v90.origin.y = y - (float)(v86.size.height * 0.5); v60 = (const cocos2d::CCRect *)v59(v47); cocos2d::CCRect::CCRect(&v91, v60); if ( !v28 ) { v91.size.height = v91.size.height - 4.0; v91.origin.y = v91.origin.y + 2.0; } } else { v48 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v47 + 1312LL); v90.origin.x = y - (float)(v86.size.width * 0.5); v49 = (const cocos2d::CCRect *)v48(v47); cocos2d::CCRect::CCRect(&v91, v49); if ( !v28 ) { v91.size.width = v91.size.width - 4.0; v91.origin.x = v91.origin.x + 2.0; } } if ( (unsigned __int8)cocos2d::CCRect::intersectsRect(&v91, &v90) ) break; } if ( ++v46 >= (unsigned int)cocos2d::CCArray::count(v15) ) goto LABEL_97; } if ( v28 ) { if ( v20 == 0.0 ) goto LABEL_79; if ( a1->m_isUpsideDown ) { if ( y <= v20 ) goto LABEL_80; LABEL_79: v20 = y; goto LABEL_80; } if ( y < v20 ) v20 = y; } LABEL_80: ++v19; } LABEL_97: v30 = a1->m_isPlatformer; LABEL_98: v34 = v20; LABEL_49: v35 = 0; if ( !v30 ) { LABEL_50: if ( y == 0.0 ) goto LABEL_51; v34 = y; goto LABEL_55; } if ( v20 == 0.0 ) { v35 = 0; if ( y == 0.0 ) goto LABEL_51; v34 = y; } else if ( a1->m_isUpsideDown ) { if ( y < v20 ) goto LABEL_107; LABEL_116: if ( y != 0.0 ) v34 = y; } else if ( y <= v20 ) { goto LABEL_116; } LABEL_107: if ( !(unsigned int)cocos2d::CCArray::count(v80) ) goto LABEL_56; v62 = cocos2d::CCArray::objectAtIndex(v80, 0); (*(void (__fastcall **)(cocos2d::CCRect *__return_ptr))(*(_QWORD *)v62 + 1344LL))(&v91); if ( v5 ) v63 = v91.origin.y; else v63 = v91.origin.x; if ( a1->m_isUpsideDown ) { if ( v34 < v63 ) goto LABEL_112; LABEL_56: v37 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v81 = &v84; v38 = v37->getPosition(a1); cocos2d::CCPoint::CCPoint(&v84, v38); cocos2d::CCPoint::CCPoint(&v85, &v84); setPosition = a1->setPosition; if ( v5 ) { v85.y = v34; setPosition(a1, &v85); PlayerObject::flipGravity(a1, !a1->m_isUpsideDown, 1); v70 = PlayerObject::flipMod(a1); PlayerObject::setYVelocity(a1, (double)-v70, 36); a1->m_isOnGround3 = 0; a1->m_jumpBuffered = 0; PlayerObject::resetCollisionLog(a1, 1); a1->m_position.y = v85.y; } else { v85.x = v34; setPosition(a1, &v85); PlayerObject::flipGravity(a1, !a1->m_isUpsideDown, 1); v40 = PlayerObject::flipMod(a1); PlayerObject::setYVelocity(a1, (double)-v40, 36); a1->m_isOnGround3 = 0; a1->m_jumpBuffered = 0; PlayerObject::resetCollisionLog(a1, 1); a1->m_position.x = v85.x; } v41 = v81; a1->m_lastSpiderFlipTime = a1->m_totalTime; cocos2d::CCPoint::CCPoint(&v90.origin, v41); cocos2d::CCPoint::CCPoint(&v91.origin, &v85); PlayerObject::playSpiderDashEffect(a1, v92, v93); if ( v79 ) { v42 = a1->m_gameLayer; if ( v42 ) GJBaseGameLayer::checkCameraLimitAfterTeleport(v42, a1, 60.0); } } else { if ( v34 <= v63 ) goto LABEL_56; LABEL_112: v34 = v63; if ( v83 ) goto LABEL_56; PlayerObject::spiderTestJumpInternal(a1, 1); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source