// // PlayLayer::playGravityEffect from 0x314aec to 0x314d18 (556 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 PlayLayer::playGravityEffect(PlayLayer *a1, bool a2) { _BOOL4 v3; // r11 GameManager *v4; // r0 _BOOL4 m_performanceMode; // r7 int m_activeGravityEffects; // r3 cocos2d::CCDirector *v7; // r0 GravityEffectSprite *v8; // r5 int m_gravityEffectIndex; // r3 int v10; // r2 float width; // s15 char v12; // r3 int v13; // r1 cocos2d::CCSequence *v14; // r7 cocos2d::CCFiniteTimeAction *v15; // r0 cocos2d::CCAction *v16; // r0 cocos2d::CCDelayTime *v17; // r0 cocos2d::CCSequence *v18; // r7 cocos2d::CCFiniteTimeAction *v19; // r0 cocos2d::CCAction *v20; // r0 cocos2d::ccColor3B v21; // [sp+8h] [bp-44h] cocos2d::CCSize v22; // [sp+Ch] [bp-40h] BYREF cocos2d::CCPoint v23; // [sp+14h] [bp-38h] BYREF cocos2d::CCPoint v24; // [sp+1Ch] [bp-30h] BYREF cocos2d::CCPoint v25; // [sp+24h] [bp-28h] BYREF cocos2d::CCPoint v26; // [sp+2Ch] [bp-20h] BYREF int v27; // [sp+34h] [bp-18h] int v28; // [sp+38h] [bp-14h] cocos2d::CCPoint v29; // [sp+3Ch] [bp-10h] BYREF v3 = a2; if ( !a1->m_disableGravityEffect ) { v4 = GameManager::sharedState(); m_performanceMode = v4->m_performanceMode; if ( !v4->m_performanceMode ) { m_activeGravityEffects = a1->m_activeGravityEffects; if ( m_activeGravityEffects < a1->m_totalGravityEffects ) { a1->m_activeGravityEffects = m_activeGravityEffects + 1; v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v22, v7); v8 = (GravityEffectSprite *)cocos2d::CCArray::objectAtIndex(a1->m_gravityEffects, a1->m_gravityEffectIndex); v8->removeFromParentAndCleanup(v8, 1); m_gravityEffectIndex = a1->m_gravityEffectIndex; if ( m_gravityEffectIndex >= a1->m_totalGravityEffects - 1 ) v10 = m_performanceMode; else v10 = m_gravityEffectIndex + 1; width = v22.width; a1->m_gravityEffectIndex = v10; cocos2d::CCPoint::CCPoint(&v23, width * 0.5, v22.height + 95.0); cocos2d::CCPoint::CCPoint(&v24, v22.width * 0.5, -95.0); if ( a1->m_player1->m_isSideways ) { cocos2d::CCPoint::CCPoint(&v29, v22.width + 95.0, v22.height * 0.5); cocos2d::CCPoint::operator=(&v24, &v29); cocos2d::CCPoint::CCPoint(&v29, -95.0, v22.height * 0.5); cocos2d::CCPoint::operator=(&v23, &v29); } cocos2d::CCPoint::CCPoint(&v25); cocos2d::CCPoint::CCPoint(&v26); if ( v3 ) { cocos2d::CCPoint::operator=(&v25, &v24); cocos2d::CCPoint::operator=(&v26, &v23); v12 = 0; *(_WORD *)&v21.r = -1; } else { cocos2d::CCPoint::operator=(&v25, &v23); cocos2d::CCPoint::operator=(&v26, &v24); cocos2d::CCSprite::setFlipY(v8, 1); v12 = -1; v21.r = 0; v21.g = -1; } v21.b = v12; if ( a1->m_player1->m_isSideways ) v13 = 1119092736; else v13 = 0; ((void (__fastcall *)(GravityEffectSprite *, int))v8->setRotation)(v8, v13); a1->addChild_0(a1, v8, 0); v8->setPosition(v8, &v25); GravityEffectSprite::updateSpritesColor(v8, v21); v14 = (cocos2d::CCSequence *)cocos2d::CCMoveTo::create(0.4, &v26); v27 = 260; v28 = 1; v15 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v8, 260, 1); v16 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v14, v15, 0); cocos2d::CCNode::runAction(v8, v16); v17 = cocos2d::CCDelayTime::create(0.4); v29.y = 0.0; LODWORD(v29.x) = PlayLayer::gravityEffectFinished; v18 = (cocos2d::CCSequence *)v17; v19 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, PlayLayer::gravityEffectFinished, 0); v20 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v18, v19, 0); cocos2d::CCNode::runAction(a1, v20); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source