// // PlayerObject::spiderTestJumpX from 0x34ab1c to 0x34b3d2 (2230 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::spiderTestJumpX(PlayerObject *a1, bool a2) { GJBaseGameLayer *m_gameLayer; // r11 const cocos2d::CCRect *v4; // r0 float x; // s19 float v6; // s20 float v7; // s15 float *p_m_vehicleSize; // r9 cocos2d::CCArray *v9; // r6 cocos2d::CCArray *v10; // r7 size_t *p_num; // r3 void *v12; // r0 size_t v13; // r1 int (**v14)(const void *, const void *); // r3 size_t *v15; // r3 void *v16; // r0 size_t v17; // r1 int (**v18)(const void *, const void *); // r3 unsigned int v19; // r8 const cocos2d::CCPoint *v20; // r0 int v21; // r11 int (*v22)(void); // r3 cocos2d::CCRect *v23; // r0 float v24; // r0 float v25; // s16 cocos2d::CCRect *v26; // r0 float v27; // r0 cocos2d::CCRect *v28; // r0 float v29; // r0 cocos2d::CCRect *v30; // r0 float v31; // r0 unsigned int v32; // r10 int v33; // r0 const cocos2d::CCRect *v34; // r0 int v35; // r3 int v36; // r0 int v37; // r0 const cocos2d::CCPoint *v38; // r0 int v39; // r0 int v40; // r0 int v41; // r0 GameManager *v42; // r0 float v43; // r3 CCCircleWave *v44; // r0 CCCircleWave *v45; // r6 cocos2d::ccColor3B *p_m_playerColor1; // r3 GLubyte r; // r1 GLubyte g; // r2 GLubyte b; // r3 PlayLayer *m_playLayer; // r3 GameManager *v51; // r0 CCCircleWave *v52; // r0 CCCircleWave *v53; // r6 cocos2d::ccColor3B *p_m_playerColor2; // r3 GLubyte v55; // r1 GLubyte v56; // r2 GLubyte v57; // r3 PlayLayer *v58; // r3 GameManager *v59; // r0 CCCircleWave *v60; // r0 CCCircleWave *v61; // r6 cocos2d::ccColor3B *v62; // r3 GLubyte v63; // r1 GLubyte v64; // r2 GLubyte v65; // r3 PlayLayer *v66; // r3 GameManager *v67; // r0 float v68; // r2 cocos2d::CCEaseElasticOut *v69; // r0 float v70; // r2 cocos2d::CCAction *v71; // r6 cocos2d::CCSprite *v72; // r0 int v73; // r1 cocos2d::CCNode *v74; // r6 GameManager *v75; // r0 cocos2d::CCNode_vtbl *v76; // r2 void (__fastcall *setScaleX)(cocos2d::CCNode *__hidden, float); // r7 float v78; // s16 float *v79; // r0 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::ccColor3B *v81; // r1 cocos2d::CCArray *v82; // r0 int v83; // r7 cocos2d::CCArray *v84; // r8 cocos2d::CCSpriteFrameCache *v85; // r0 const char *v86; // r1 cocos2d::CCSpriteFrameCache *v87; // r10 cocos2d::CCString *v88; // r0 const char *CString; // r0 cocos2d::CCSpriteFrame *v90; // r0 cocos2d::CCAnimation *v91; // r0 cocos2d::CCSequence *v92; // r7 cocos2d::CCFiniteTimeAction *v93; // r0 cocos2d::CCAction *v94; // r0 GJBaseGameLayer *v95; // r0 float v96; // r3 float v97; // [sp+0h] [bp-94h] cocos2d::ccColor3B v98; // [sp+0h] [bp-94h] bool v99; // [sp+4h] [bp-90h] bool v100; // [sp+4h] [bp-90h] bool v101; // [sp+4h] [bp-90h] bool v102; // [sp+4h] [bp-90h] bool v103; // [sp+4h] [bp-90h] _BOOL4 v104; // [sp+Ch] [bp-88h] cocos2d::CCPoint v105; // [sp+1Ch] [bp-78h] BYREF cocos2d::CCPoint v106; // [sp+24h] [bp-70h] BYREF cocos2d::CCRect v107; // [sp+2Ch] [bp-68h] BYREF cocos2d::CCRect v108; // [sp+3Ch] [bp-58h] BYREF cocos2d::CCRect v109; // [sp+4Ch] [bp-48h] BYREF cocos2d::CCRect v110; // [sp+5Ch] [bp-38h] BYREF cocos2d::CCRect v111; // [sp+6Ch] [bp-28h] BYREF cocos2d::CCRect v112; // [sp+7Ch] [bp-18h] BYREF cocos2d::CCRect v113; // 0:kr00_16.16 cocos2d::CCRect v114; // 0:r1.12,12:^0.4 cocos2d::CCRect v115; // 0:r1.12,12:^0.4 v104 = a2; if ( a1->m_isDead || a1->m_isLocked || a1->m_maybeReducedEffects ) return; m_gameLayer = a1->m_gameLayer; v4 = a1->getObjectRect(a1); cocos2d::CCRect::CCRect(&v107, v4); cocos2d::CCRect::CCRect(&v108, &v107); x = a1->getPosition(a1)->x; v6 = a1->getPosition(a1)->x; if ( a1->m_isUpsideDown ) v7 = (float)(v108.size.width - 2.0) + v108.origin.x; else v7 = v108.origin.x - 2998.0; p_m_vehicleSize = &a1->m_vehicleSize; v108.origin.x = v7; v108.size.width = 3000.0; cocos2d::CCRect::CCRect(&v109, &v108); v109.size.height = v107.size.height; v109.origin.y = v107.origin.y; cocos2d::CCRect::CCRect(&v110, &v109); v110.size.height = v110.size.height + 4.0; v109.size.height = a1->m_vehicleSize * 8.0; v109.origin.y = v109.origin.y + (float)((float)(v108.size.height - v109.size.height) * 0.5); v108.size.height = (float)(v107.size.height * 0.5) + 1.0; v108.origin.y = v108.origin.y + (float)(v107.size.height * 0.5); cocos2d::CCRect::CCRect(&v112, &v108); LODWORD(v113.origin.x) = &v112; LODWORD(v113.origin.y) = 1; v113.size.width = v96; v113.size.height = v97; v9 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v113, v99); cocos2d::CCRect::CCRect(&v112, &v109); LODWORD(v114.origin.x) = &v112; LODWORD(v114.origin.y) = 1; v10 = GJBaseGameLayer::damagingObjectsInRect(m_gameLayer, v114, v100); if ( !cocos2d::CCArray::count(v9) && cocos2d::CCArray::count(v10) || v104 ) { cocos2d::CCRect::CCRect(&v112, &v110); LODWORD(v115.origin.x) = &v112; LODWORD(v115.origin.y) = 1; v104 = 1; v9 = GJBaseGameLayer::staticObjectsInRect(m_gameLayer, v115, v101); } if ( cocos2d::CCArray::count(v9) ) { p_num = &v9->data->num; v12 = (void *)p_num[3]; v13 = *p_num; if ( a1->m_isUpsideDown ) v14 = (int (**)(const void *, const void *))&boxCompMinX; else v14 = (int (**)(const void *, const void *))&boxCompMaxX; qsort(v12, v13, 4u, *v14); } if ( cocos2d::CCArray::count(v10) ) { v15 = &v10->data->num; v16 = (void *)v15[3]; v17 = *v15; if ( a1->m_isUpsideDown ) v18 = (int (**)(const void *, const void *))&boxCompMinX; else v18 = (int (**)(const void *, const void *))&boxCompMaxX; qsort(v16, v17, 4u, *v18); } if ( cocos2d::CCArray::count(v9) ) { v19 = 0; v20 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v106, v20); while ( v19 < cocos2d::CCArray::count(v9) ) { v21 = cocos2d::CCArray::objectAtIndex(v9, v19); v22 = *(int (**)(void))(*(_DWORD *)v21 + 656); if ( a1->m_isUpsideDown ) { v23 = (cocos2d::CCRect *)v22(); v24 = COERCE_FLOAT(cocos2d::CCRect::getMinX(v23)); v25 = v24 - (float)(v107.size.width * 0.5); } else { v26 = (cocos2d::CCRect *)v22(); v27 = COERCE_FLOAT(cocos2d::CCRect::getMaxX(v26)); v25 = v27 + (float)(v107.size.height * 0.5); } if ( a1->m_isUpsideDown ) { if ( v25 >= (float)(v106.x - 10.0) ) goto LABEL_32; } else if ( v25 <= (float)(v106.x + 10.0) ) { LABEL_32: if ( !a1->m_isGoingLeft && (v28 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v21 + 656))(v21), v29 = COERCE_FLOAT(cocos2d::CCRect::getMinY(v28)), v29 > v106.y) || a1->m_isGoingLeft && (v30 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v21 + 656))(v21), v31 = COERCE_FLOAT(cocos2d::CCRect::getMaxY(v30)), v31 < v106.y) ) { v32 = 0; cocos2d::CCRect::CCRect(&v111, &v107); v111.origin.x = v25 - (float)(v107.size.width * 0.5); while ( v32 < cocos2d::CCArray::count(v9) ) { v33 = cocos2d::CCArray::objectAtIndex(v9, v32); if ( v19 != v32 ) { v34 = (const cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v33 + 656))(v33); cocos2d::CCRect::CCRect(&v112, v34); v112.size.width = v112.size.width - 4.0; v112.origin.x = v112.origin.x + 2.0; if ( cocos2d::CCRect::intersectsRect(&v112, &v111) ) goto LABEL_43; } ++v32; } } if ( v25 != 0.0 ) goto LABEL_53; goto LABEL_45; } LABEL_43: ++v19; } goto LABEL_45; } if ( !cocos2d::CCArray::count(v10) ) { LABEL_45: v35 = 0; goto LABEL_49; } v36 = cocos2d::CCArray::objectAtIndex(v10, 0); (*(void (__fastcall **)(cocos2d::CCRect *, int))(*(_DWORD *)v36 + 672))(&v112, v36); v25 = v112.origin.x; if ( v112.origin.x != 0.0 ) goto LABEL_56; v35 = 1; LABEL_49: if ( a1->m_isUpsideDown ) v25 = (float)(x + 3000.0) - (float)(v107.size.width * 0.5); else v25 = (float)(v6 - 3000.0) + (float)(v107.size.width * 0.5); if ( v35 ) goto LABEL_56; LABEL_53: if ( cocos2d::CCArray::count(v10) ) { v37 = cocos2d::CCArray::objectAtIndex(v10, 0); (*(void (__fastcall **)(cocos2d::CCRect *, int))(*(_DWORD *)v37 + 672))(&v112, v37); if ( a1->m_isUpsideDown ) { if ( v112.origin.x >= v25 ) goto LABEL_56; LABEL_93: if ( !v104 ) { PlayerObject::spiderTestJump(a1, 1); return; } v25 = v112.origin.x; goto LABEL_56; } if ( v112.origin.x > v25 ) goto LABEL_93; } LABEL_56: v38 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v105, v38); cocos2d::CCPoint::CCPoint(&v106, v25, v105.y); a1->setPosition(a1, &v106); PlayerObject::flipGravity(a1, !a1->m_isUpsideDown, 1); v39 = PlayerObject::flipMod(a1); PlayerObject::setYVelocity(a1, (double)-v39, 35); a1->m_isOnGround3 = 0; a1->m_jumpBuffered = 0; PlayerObject::resetCollisionLog(a1, 1); a1->m_position.x = v106.x; a1->m_lastSpiderFlipTime = a1->m_totalTime; if ( a1->m_playEffects && !a1->m_isHidden ) { v40 = PlayerObject::reverseMod(a1); v105.x = v105.x + (float)((float)v40 * 7.5); v41 = PlayerObject::reverseMod(a1); v106.x = v106.x + (float)((float)v41 * 7.5); v42 = GameManager::sharedState(); LODWORD(v43) = v42->m_performanceMode; if ( !v42->m_performanceMode ) { v106.x = v106.x + 6.0; v44 = CCCircleWave::create( COERCE_CCCIRCLEWAVE_((float)(*p_m_vehicleSize * 10.0) * 1.3), 1.0, 0.15, v43, SLOBYTE(v43), v101); v45 = v44; if ( a1->m_swapColors ) p_m_playerColor1 = &a1->m_playerColor1; else p_m_playerColor1 = &a1->m_playerColor2; r = p_m_playerColor1->r; g = p_m_playerColor1->g; b = p_m_playerColor1->b; v44->m_color.r = r; v44->m_color.g = g; v44->m_color.b = b; v44->setPosition(v44, &v105); a1->m_parentLayer->addChild_0(a1->m_parentLayer, v45, 0); m_playLayer = GameManager::sharedState()->m_playLayer; if ( m_playLayer ) m_playLayer = (PlayLayer *)((char *)m_playLayer + 11756); v45->m_delegate = (CCCircleWaveDelegate *)m_playLayer; v51 = GameManager::sharedState(); PlayLayer::addCircle(v51->m_playLayer, v45); v45->m_opacityMod = 0.42; v52 = CCCircleWave::create(COERCE_CCCIRCLEWAVE_((float)(*p_m_vehicleSize * 20.0) * 1.3), 2.0, 0.25, 0.0, 0, v102); v53 = v52; if ( a1->m_swapColors ) p_m_playerColor2 = &a1->m_playerColor1; else p_m_playerColor2 = &a1->m_playerColor2; v55 = p_m_playerColor2->r; v56 = p_m_playerColor2->g; v57 = p_m_playerColor2->b; v52->m_color.r = v55; v52->m_color.g = v56; v52->m_color.b = v57; v52->setPosition(v52, &v106); a1->m_parentLayer->addChild_0(a1->m_parentLayer, v53, 0); v58 = GameManager::sharedState()->m_playLayer; if ( v58 ) v58 = (PlayLayer *)((char *)v58 + 11756); v53->m_delegate = (CCCircleWaveDelegate *)v58; v59 = GameManager::sharedState(); PlayLayer::addCircle(v59->m_playLayer, v53); v53->m_opacityMod = 0.84; v60 = CCCircleWave::create( COERCE_CCCIRCLEWAVE_(*p_m_vehicleSize * 10.0), (float)(*p_m_vehicleSize * 30.0) * 1.5, 0.25, 0.0, 0, v103); v61 = v60; if ( a1->m_swapColors ) v62 = &a1->m_playerColor1; else v62 = &a1->m_playerColor2; v63 = v62->r; v64 = v62->g; v65 = v62->b; v60->m_color.r = v63; v60->m_color.g = v64; v60->m_color.b = v65; v60->setPosition(v60, &v106); a1->m_parentLayer->addChild_0(a1->m_parentLayer, v61, 0); v66 = GameManager::sharedState()->m_playLayer; if ( v66 ) v66 = (PlayLayer *)((char *)v66 + 11756); v61->m_delegate = (CCCircleWaveDelegate *)v66; v67 = GameManager::sharedState(); PlayLayer::addCircle(v67->m_playLayer, v61); v61->m_circleMode = Outline; } *(_WORD *)&v98.r = -1; v98.b = -1; PlayerObject::flashPlayer(a1, 0.3, 0.05, (cocos2d::ccColor3B)-1, v98); cocos2d::CCNode::stopActionByTag(a1->m_spiderSprite, 10); ((void (__fastcall *)(GJSpiderSprite *, int))a1->m_spiderSprite->setScale)(a1->m_spiderSprite, 1053609165); v69 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3EE66666, 1.0, v68); v71 = (cocos2d::CCAction *)cocos2d::CCEaseElasticOut::create(v69, (cocos2d::CCActionInterval *)0x3EB33333, v70); v71->setTag(v71, 10); cocos2d::CCNode::runAction(a1->m_spiderSprite, v71); if ( a1->m_playEffects ) { v72 = cocos2d::CCSprite::createWithSpriteFrameName("spiderDash_002.png"); if ( a1->m_isUpsideDown ) v73 = 0; else v73 = 1127481344; v74 = v72; ((void (__fastcall *)(cocos2d::CCSprite *, int))v72->setRotation)(v72, v73); v75 = GameManager::sharedState(); v75->m_playLayer->m_objectLayer->addChild_0(v75->m_playLayer->m_objectLayer, v74, 40); v76 = v74->__vftable; LODWORD(v111.origin.x) = 770; LODWORD(v111.origin.y) = 1; ((void (__fastcall *)(cocos2d::CCNode *, int, int))v76[1].setPosition)(v74, 770, 1); setScaleX = v74->setScaleX; v78 = fabsf(v105.x - v106.x) + 30.0; v79 = (float *)v74->getContentSize(v74); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))setScaleX)(v74, v78 / *v79); setPosition = v74->setPosition; cocos2d::CCPoint::CCPoint(&v112.origin, v105.x + (float)((float)(v106.x - v105.x) * 0.5), v105.y); setPosition(v74, &v112.origin); if ( a1->m_swapColors ) v81 = &a1->m_playerColor1; else v81 = &a1->m_playerColor2; v82 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCNode *, cocos2d::ccColor3B *))v74->__vftable[1].getTag)( v74, v81); v83 = 1; v84 = (cocos2d::CCArray *)cocos2d::CCArray::create(v82); do { v85 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v86 = (const char *)v83++; v87 = v85; v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"spiderDash_%03d.png", v86); CString = cocos2d::CCString::getCString(v88); v90 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v87, CString); cocos2d::CCArray::addObject(v84, v90); } while ( v83 != 9 ); v91 = cocos2d::CCAnimation::createWithSpriteFrames(v84, 0.04); v92 = (cocos2d::CCSequence *)cocos2d::CCAnimate::create(v91); LODWORD(v112.origin.x) = 260; LODWORD(v112.origin.y) = 1; v93 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v74, 260, 1); v94 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v92, v93, 0); cocos2d::CCNode::runAction(v74, v94); } } if ( !a1->m_isHidden && (!a1->m_isSpider || !a1->m_isPlatformer) ) cocos2d::CCParticleSystem::resetSystem(a1->m_playerGroundParticles); v95 = a1->m_gameLayer; if ( v95 ) GJBaseGameLayer::checkCameraLimitAfterTeleport(v95, a1, 60.0); }
GD Web Decomp Icon

GD Web Decomp

Raw Source