// // PlayerObject::spiderTestJumpY from 0x635d68 to 0x63682c (2756 bytes) // // 1 xrefs: // > @ 0x6c9d8 // // 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::spiderTestJumpY(PlayerObject *a1, bool a2) { _BOOL4 v2; // w27 GJBaseGameLayer *m_gameLayer; // x19 float MinPortalY; // s13 float MaxPortalY; // s14 const cocos2d::CCRect *v7; // x0 float v8; // s0 float v9; // s1 cocos2d::CCArray *v10; // x21 cocos2d::ccArray *data; // x1 cocos2d::CCObject **arr; // x0 size_t num; // x1 int (*v14)(const void *, const void *); // x3 cocos2d::ccArray *v15; // x1 cocos2d::CCObject **v16; // x0 size_t v17; // x1 int (*v18)(const void *, const void *); // x3 unsigned int v19; // w24 const cocos2d::CCPoint *v20; // x0 __int64 v21; // x0 __int64 v22; // x19 cocos2d::CCRect *v23; // x0 float v24; // s0 float y; // s8 cocos2d::CCRect *v26; // x0 float v27; // s0 unsigned int v28; // w19 __int64 v29; // x0 __int64 (__fastcall *v30)(__int64); // x1 const cocos2d::CCRect *v31; // x0 __int64 v32; // x0 const cocos2d::CCPoint *v33; // x0 int v34; // w0 _BOOL4 m_playEffects; // w0 GJBaseGameLayer *v36; // x0 cocos2d::CCRect *v37; // x0 float v38; // s0 _BOOL8 m_performanceMode; // x0 cocos2d::CCScaleTo *v40; // x0 cocos2d::CCEaseElasticOut *v41; // x0 cocos2d::CCActionInterval *v42; // x1 cocos2d::CCAction *v43; // x19 cocos2d::CCSprite *v44; // x21 long double v45; // q0 unsigned int v46; // w19 GameManager *v47; // x0 void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // x24 float v49; // s8 float *v50; // x0 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 cocos2d::ccColor3B *v52; // x1 cocos2d::CCArray *v53; // x0 cocos2d::CCArray *v54; // x25 cocos2d::CCSpriteFrameCache *v55; // x20 const char *v56; // x1 cocos2d::CCString *v57; // x0 const char *CString; // x0 cocos2d::CCSpriteFrame *v59; // x0 cocos2d::CCAnimation *v60; // x0 cocos2d::CCSequence *v61; // x19 cocos2d::CCFiniteTimeAction *v62; // x0 cocos2d::CCAction *v63; // x0 int v64; // w19 __int64 v65; // x0 float v66; // s0 __int64 v67; // x0 __int64 v68; // x19 cocos2d::ccColor3B *p_m_playerColor2; // x2 __int64 v70; // x4 GLubyte r; // w5 GLubyte g; // w3 PlayLayer *m_playLayer; // x0 CCCircleWaveDelegate *v74; // x0 GameManager *v75; // x0 __int64 v76; // x0 __int64 v77; // x19 cocos2d::ccColor3B *p_m_playerColor1; // x2 __int64 v79; // x4 GLubyte v80; // w5 GLubyte v81; // w3 PlayLayer *v82; // x0 CCCircleWaveDelegate *v83; // x0 GameManager *v84; // x0 __int64 v85; // x0 __int64 v86; // x19 cocos2d::ccColor3B *v87; // x2 __int64 v88; // x4 GLubyte v89; // w5 GLubyte v90; // w3 PlayLayer *v91; // x0 CCCircleWaveDelegate *v92; // x0 GameManager *v93; // x0 _QWORD v94[2]; // [xsp+0h] [xbp+0h] BYREF int v95; // [xsp+A4h] [xbp+A4h] cocos2d::CCArray *v96; // [xsp+A8h] [xbp+A8h] cocos2d::CCPoint v97; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCRect v98; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCRect v99; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCRect v100; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCRect v101; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCRect v102; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCRect v103; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCRect v104; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v105; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v106; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v2 = a2; if ( a1->m_isDead || a1->m_isLocked || a1->m_maybeReducedEffects ) return; m_gameLayer = a1->m_gameLayer; MinPortalY = GJBaseGameLayer::getMinPortalY(m_gameLayer); MaxPortalY = GJBaseGameLayer::getMaxPortalY(m_gameLayer); if ( m_gameLayer->m_gameState.m_isFreeMode || PlayerObject::isInBasicMode(a1) ) { MaxPortalY = 2490.0; MinPortalY = 90.0; v95 = 1; } else { v95 = 0; } v7 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v98, v7); cocos2d::CCRect::CCRect(&v99, &v98); if ( a1->m_isUpsideDown ) { v8 = MinPortalY; v9 = (float)(v99.origin.y - MinPortalY) + 2.0; } else { v8 = (float)(v99.size.height - 2.0) + v99.origin.y; v9 = MaxPortalY - v8; } v99.size.height = v9; v99.origin.y = v8; cocos2d::CCRect::CCRect(&v100, &v99); v100.size.width = v98.size.width; v100.origin.x = v98.origin.x; cocos2d::CCRect::CCRect(&v101, &v100); v100.size.width = a1->m_vehicleSize * 8.0; v99.origin.x = v99.origin.x + (float)(v98.size.width * 0.5); v100.origin.x = v100.origin.x + (float)((float)(v99.size.width - v100.size.width) * 0.5); v99.size.width = (float)(v98.size.width * 0.5) + 1.0; v101.size.width = v101.size.width + 4.0; cocos2d::CCRect::CCRect(&v103, &v99); v10 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v104, (unsigned __int8)v94 + 8); cocos2d::CCRect::CCRect(&v103, &v100); v96 = GJBaseGameLayer::damagingObjectsInRect(m_gameLayer, v105, (unsigned __int8)v94 + 8); if ( !(unsigned int)cocos2d::CCArray::count(v10) && (unsigned int)cocos2d::CCArray::count(v96) || v2 ) { v2 = 1; cocos2d::CCRect::CCRect(&v103, &v101); v10 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v106, (unsigned __int8)v94 + 8); } if ( (unsigned int)cocos2d::CCArray::count(v10) ) { data = v10->data; arr = data->arr; num = data->num; if ( a1->m_isUpsideDown ) v14 = (int (*)(const void *, const void *))boxCompMax; else v14 = (int (*)(const void *, const void *))boxCompMin; qsort(arr, num, 8u, v14); } if ( (unsigned int)cocos2d::CCArray::count(v96) ) { v15 = v96->data; v16 = v15->arr; v17 = v15->num; if ( a1->m_isUpsideDown ) v18 = (int (*)(const void *, const void *))boxCompMax; else v18 = (int (*)(const void *, const void *))boxCompMin; qsort(v16, v17, 8u, v18); } if ( (unsigned int)cocos2d::CCArray::count(v10) ) { v19 = 0; cocos2d::CCRect::CCRect(&v102, &v98); v20 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v97, v20); while ( 1 ) { if ( v19 >= (unsigned int)cocos2d::CCArray::count(v10) ) goto LABEL_62; v21 = cocos2d::CCArray::objectAtIndex(v10, v19); v22 = v21; if ( a1->m_isUpsideDown ) { v37 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 1312LL))(v21); cocos2d::CCRect::getMaxY(v37); y = v38 + (float)(v98.size.height * 0.5); } else { v23 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 1312LL))(v21); cocos2d::CCRect::getMinY(v23); y = v24 - (float)(v98.size.height * 0.5); } if ( a1->m_isUpsideDown ) { if ( y > (float)(v97.y + 10.0) ) goto LABEL_43; } else if ( y < (float)(v97.y - 10.0) ) { goto LABEL_43; } v26 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 1312LL))(v22); cocos2d::CCRect::getMinX(v26); if ( v27 <= v97.x || (v28 = 0, !(unsigned int)cocos2d::CCArray::count(v10)) ) { LABEL_32: if ( y == 0.0 ) goto LABEL_62; goto LABEL_33; } while ( 1 ) { v29 = cocos2d::CCArray::objectAtIndex(v10, v28); if ( v19 != v28 ) { v30 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v29 + 1312LL); v102.origin.y = y - (float)(v98.size.height * 0.5); v31 = (const cocos2d::CCRect *)v30(v29); cocos2d::CCRect::CCRect(&v103, v31); v103.size.height = v103.size.height - 4.0; v103.origin.y = v103.origin.y + 2.0; if ( (unsigned __int8)cocos2d::CCRect::intersectsRect(&v103, &v102) ) break; } if ( ++v28 >= (unsigned int)cocos2d::CCArray::count(v10) ) goto LABEL_32; } LABEL_43: ++v19; } } if ( (unsigned int)cocos2d::CCArray::count(v96) ) { v65 = cocos2d::CCArray::objectAtIndex(v96, 0); (*(void (__fastcall **)(__int64))(*(_QWORD *)v65 + 1344LL))(v65); y = v103.origin.y; if ( v103.origin.y != 0.0 ) goto LABEL_37; v64 = 1; } else { LABEL_62: v64 = 0; } if ( a1->m_isUpsideDown ) { y = MinPortalY + (float)(v98.size.height * 0.5); if ( v64 ) goto LABEL_37; } else { y = MaxPortalY - (float)(v98.size.height * 0.5); if ( v64 ) goto LABEL_37; } LABEL_33: if ( !(unsigned int)cocos2d::CCArray::count(v96) ) goto LABEL_37; v32 = cocos2d::CCArray::objectAtIndex(v96, 0); (*(void (__fastcall **)(__int64))(*(_QWORD *)v32 + 1344LL))(v32); if ( a1->m_isUpsideDown ) { if ( y >= v103.origin.y ) goto LABEL_37; } else if ( y <= v103.origin.y ) { goto LABEL_37; } y = v103.origin.y; if ( !v2 ) { PlayerObject::spiderTestJump(a1, 1); return; } LABEL_37: v33 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v97, v33); cocos2d::CCPoint::CCPoint(&v102.origin, v97.x, y); a1->setPosition(a1, (const cocos2d::CCPoint *)&v102); PlayerObject::flipGravity(a1, !a1->m_isUpsideDown, 1); v34 = PlayerObject::flipMod(a1); PlayerObject::setYVelocity(a1, (double)-v34, 36); a1->m_isOnGround3 = 0; a1->m_jumpBuffered = 0; PlayerObject::resetCollisionLog(a1, 1); m_playEffects = a1->m_playEffects; a1->m_lastSpiderFlipTime = a1->m_totalTime; a1->m_position.y = v102.origin.y; if ( !m_playEffects ) { LABEL_57: if ( !a1->m_isHidden && (!a1->m_isSpider || !a1->m_isPlatformer) ) cocos2d::CCParticleSystem::resetSystem(a1->m_playerGroundParticles); goto LABEL_39; } if ( !a1->m_isHidden ) { v97.x = v97.x + (float)((float)PlayerObject::reverseMod(a1) * 7.5); v102.origin.x = v102.origin.x + (float)((float)PlayerObject::reverseMod(a1) * 7.5); m_performanceMode = GameManager::sharedState()->m_performanceMode; if ( !m_performanceMode ) { v66 = (float)(a1->m_vehicleSize * 10.0) * 1.3; v102.origin.x = v102.origin.x + 6.0; v67 = CCCircleWave::create((CCCircleWave *)m_performanceMode, v66, 1.0, 0.15, 0); v68 = v67; p_m_playerColor2 = &a1->m_playerColor2; v70 = *(_QWORD *)v67; if ( a1->m_swapColors ) p_m_playerColor2 = &a1->m_playerColor1; r = p_m_playerColor2->r; g = p_m_playerColor2->g; *(_BYTE *)(v67 + 342) = p_m_playerColor2->b; *(_BYTE *)(v67 + 340) = r; *(_BYTE *)(v67 + 341) = g; (*(void (**)(void))(v70 + 184))(); a1->m_parentLayer->addChild_0(a1->m_parentLayer, (cocos2d::CCNode *)v68, 0); m_playLayer = GameManager::sharedState()->m_playLayer; if ( m_playLayer ) v74 = &m_playLayer->CCCircleWaveDelegate; else v74 = nullptr; *(_QWORD *)(v68 + 368) = v74; v75 = GameManager::sharedState(); PlayLayer::addCircle(v75->m_playLayer, (CCCircleWave *)v68); *(_DWORD *)(v68 + 360) = 1054280254; v76 = CCCircleWave::create(nullptr, (float)(a1->m_vehicleSize * 20.0) * 1.3, 2.0, 0.25, 0); v77 = v76; p_m_playerColor1 = &a1->m_playerColor2; v79 = *(_QWORD *)v76; if ( a1->m_swapColors ) p_m_playerColor1 = &a1->m_playerColor1; v80 = p_m_playerColor1->r; v81 = p_m_playerColor1->g; *(_BYTE *)(v76 + 342) = p_m_playerColor1->b; *(_BYTE *)(v76 + 340) = v80; *(_BYTE *)(v76 + 341) = v81; (*(void (**)(void))(v79 + 184))(); a1->m_parentLayer->addChild_0(a1->m_parentLayer, (cocos2d::CCNode *)v77, 0); v82 = GameManager::sharedState()->m_playLayer; if ( v82 ) v83 = &v82->CCCircleWaveDelegate; else v83 = nullptr; *(_QWORD *)(v77 + 368) = v83; v84 = GameManager::sharedState(); PlayLayer::addCircle(v84->m_playLayer, (CCCircleWave *)v77); *(_DWORD *)(v77 + 360) = 1062668862; v85 = CCCircleWave::create(nullptr, a1->m_vehicleSize * 10.0, (float)(a1->m_vehicleSize * 30.0) * 1.5, 0.25, 0); v86 = v85; v87 = &a1->m_playerColor2; v88 = *(_QWORD *)v85; if ( a1->m_swapColors ) v87 = &a1->m_playerColor1; v89 = v87->r; v90 = v87->g; *(_BYTE *)(v85 + 342) = v87->b; *(_BYTE *)(v85 + 340) = v89; *(_BYTE *)(v85 + 341) = v90; (*(void (**)(void))(v88 + 184))(); a1->m_parentLayer->addChild_0(a1->m_parentLayer, (cocos2d::CCNode *)v86, 0); v91 = GameManager::sharedState()->m_playLayer; if ( v91 ) v92 = &v91->CCCircleWaveDelegate; else v92 = nullptr; *(_QWORD *)(v86 + 368) = v92; v93 = GameManager::sharedState(); PlayLayer::addCircle(v93->m_playLayer, (CCCircleWave *)v86); *(_DWORD *)(v86 + 352) = 1; } PlayerObject::flashPlayer(a1, 0.3, 0.05, (cocos2d::ccColor3B)&unk_FFFFFF, (cocos2d::ccColor3B)&unk_FFFFFF); cocos2d::CCNode::stopActionByTag(a1->m_spiderSprite, 10); v40 = (cocos2d::CCScaleTo *)((__int64 (__fastcall *)(GJSpiderSprite *, float))a1->m_spiderSprite->setScale)( a1->m_spiderSprite, 0.4); v41 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create(v40, 0.45, 1.0); v43 = (cocos2d::CCAction *)cocos2d::CCEaseElasticOut::create(v41, v42, 0.35); v43->setTag(v43, 10); cocos2d::CCNode::runAction(a1->m_spiderSprite, v43); if ( a1->m_playEffects ) { v44 = cocos2d::CCSprite::createWithSpriteFrameName("spiderDash_002.png"); if ( a1->m_isUpsideDown ) LODWORD(v45) = 1119092736; else LODWORD(v45) = -1028390912; v46 = 1; v44->setRotation(v44, v45); v47 = GameManager::sharedState(); v47->m_playLayer->m_objectLayer->addChild_0(v47->m_playLayer->m_objectLayer, v44, 40); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v44->setBlendFunc)(v44, 0x100000302LL); setScaleX = v44->setScaleX; v49 = vabds_f32(v97.y, v102.origin.y) + 30.0; v50 = (float *)v44->getContentSize(v44); setScaleX(v44, v49 / *v50); setPosition = v44->setPosition; cocos2d::CCPoint::CCPoint(&v103.origin, v97.x, v97.y + (float)((float)(v102.origin.y - v97.y) * 0.5)); setPosition(v44, &v103.origin); v52 = &a1->m_playerColor2; if ( a1->m_swapColors ) v52 = &a1->m_playerColor1; v53 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))v44->setColor)( v44, v52); v54 = (cocos2d::CCArray *)cocos2d::CCArray::create(v53); do { v55 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v56 = (const char *)v46++; v57 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"spiderDash_%03d.png", v56); CString = cocos2d::CCString::getCString(v57); v59 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v55, CString); cocos2d::CCArray::addObject(v54, v59); } while ( v46 != 9 ); v60 = cocos2d::CCAnimation::createWithSpriteFrames(v54, 0.04); v61 = (cocos2d::CCSequence *)cocos2d::CCAnimate::create(v60); v62 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v44, 520, 1); v63 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v61, v62, 0); cocos2d::CCNode::runAction(v44, v63); } goto LABEL_57; } LABEL_39: if ( v95 ) { v36 = a1->m_gameLayer; if ( v36 ) GJBaseGameLayer::checkCameraLimitAfterTeleport(v36, a1, 60.0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source