// // PlayerObject::setupStreak from 0x63d0f8 to 0x63d4e8 (1008 bytes) // // 2 xrefs: // > PlayerObject::init @ 0x63e208 // > @ 0x77238 // // 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::setupStreak(PlayerObject *a1) { GameManager *v2; // x0 GameManager *v3; // x0 GameManager *v4; // x0 GameManager *v5; // x0 GameManager *v6; // x0 const char *m_playerStreak; // x1 cocos2d::CCString *v8; // x0 const char *CString; // x1 float v10; // s2 int v11; // w0 float v12; // s0 cocos2d::CCMotionStreak *v13; // x0 cocos2d::CCMotionStreak *m_regularTrail; // x3 cocos2d::CCLayer *m_parentLayer; // x0 cocos2d::CCLayer_vtbl *v16; // x4 GameManager *v17; // x0 int v18; // w0 cocos2d::CCMotionStreak *v19; // x1 HardStreak *v20; // x0 cocos2d::CCLayer *v21; // x3 GameManager *v22; // x0 float v23; // s10 float v24; // s9 cocos2d::CCTextureCache *v25; // x23 cocos2d::CCTexture2D *v26; // x0 cocos2d::CCTexture2D *v27; // x2 char *v28; // x0 cocos2d::CCMotionStreak *m_shipStreak; // x2 cocos2d::CCMotionStreak_vtbl *v30; // x3 void (__fastcall *setBlendFunc)(cocos2d::CCMotionStreak *__hidden, cocos2d::ccBlendFunc); // x3 unsigned int *v32; // x3 int v33; // w1 float v34; // [xsp+58h] [xbp+58h] BYREF float v35; // [xsp+5Ch] [xbp+5Ch] BYREF char *v36; // [xsp+60h] [xbp+60h] BYREF v2 = GameManager::sharedState(); if ( v2->m_playerStreak.random - v2->m_playerStreak.seed <= 7 && (v3 = GameManager::sharedState(), v3->m_playerStreak.random - v3->m_playerStreak.seed <= 0) ) { LODWORD(v5) = 1; } else { v4 = GameManager::sharedState(); if ( v4->m_playerStreak.random - v4->m_playerStreak.seed <= 7 ) { v5 = GameManager::sharedState(); LODWORD(v5) = v5->m_playerStreak.random - v5->m_playerStreak.seed; } else { v5 = (GameManager *)&byte_7; } } a1->m_playerStreak = (int)v5; v6 = GameManager::sharedState(); m_playerStreak = (const char *)(unsigned int)a1->m_playerStreak; a1->m_hasGlow = v6->m_playerGlow; v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"streak_%02d_001.png", m_playerStreak); CString = cocos2d::CCString::getCString(v8); v10 = 10.0; v11 = a1->m_playerStreak - 2; a1->m_streakStrokeWidth = 10.0; v12 = 0.3; switch ( v11 ) { case 0: case 5: v12 = 0.3; v10 = 14.0; a1->m_disableStreakTint = 1; a1->m_streakStrokeWidth = 14.0; break; case 1: v10 = 8.5; v12 = 0.3; a1->m_streakStrokeWidth = 8.5; break; case 2: v10 = 10.0; v12 = 0.4; break; case 3: v10 = 5.0; v12 = 0.6; a1->m_alwaysShowStreak = 1; a1->m_streakStrokeWidth = 5.0; break; case 4: v10 = 3.0; v12 = 1.0; a1->m_alwaysShowStreak = 1; a1->m_streakStrokeWidth = 3.0; break; default: break; } v13 = cocos2d::CCMotionStreak::create(v12, 5.0, v10, (const cocos2d::ccColor3B *)&off_EBEFE8, CString); a1->m_regularTrail = v13; m_regularTrail = v13; if ( a1->m_playerStreak == 6 ) { cocos2d::CCMotionStreak::enableRepeatMode(v13, 0.1); m_regularTrail = a1->m_regularTrail; } m_parentLayer = a1->m_parentLayer; v16 = m_parentLayer->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; m_regularTrail->m_fMaxSeg = 50.0; v16->addChild_0(m_parentLayer, m_regularTrail, -2); v17 = GameManager::sharedState(); v18 = v17->m_playerShipFire.random - v17->m_playerShipFire.seed; a1->m_shipStreakType = v18; if ( v18 <= 6 ) { if ( v18 > 1 ) { v34 = 0.0; v35 = 0.0; getSettingsForStreak(v18, &v34, &v35, 1.6, 1.0); v23 = v34; v24 = v35; v25 = cocos2d::CCTextureCache::sharedTextureCache(); getFrameForStreak(a1->m_shipStreakType, (__int64)&v36, 0.0); v26 = cocos2d::CCTextureCache::addImage(v25, v36, 0); a1->m_shipStreak = (cocos2d::CCMotionStreak *)cocos2d::CCMotionStreak::create( (cocos2d::CCMotionStreak *)&off_EBEFE8, v23, 1.0, v24, (const cocos2d::_ccColor3B *)v26, v27); v28 = v36 - 24; if ( v36 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v32 = (unsigned int *)(v36 - 8); do v33 = __ldaxr(v32); while ( __stlxr(v33 - 1, v32) ); } else { v33 = *((_DWORD *)v36 - 2); *((_DWORD *)v36 - 2) = v33 - 1; } if ( v33 <= 0 ) operator delete(v28); } ((void (__fastcall *)(cocos2d::CCLayer *))a1->m_parentLayer->addChild_0)(a1->m_parentLayer); m_shipStreak = a1->m_shipStreak; v30 = m_shipStreak->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; m_shipStreak->m_bDontOpacityFade = 1; setBlendFunc = v30->setBlendFunc; m_shipStreak->m_fMaxSeg = 50.0; ((void (__fastcall *)(cocos2d::CCMotionStreak *, __int64))setBlendFunc)(m_shipStreak, 0x100000302LL); } } else { a1->m_shipStreakType = ShipFire1; } v19 = a1->m_regularTrail; v36 = (char *)0x100000302LL; ((void (__fastcall *)(cocos2d::CCMotionStreak *, __int64))v19->setBlendFunc)(v19, 0x100000302LL); v20 = HardStreak::create(); v21 = a1->m_parentLayer; a1->m_waveTrail = v20; v21->addChild_0(v21, v20, -3); v22 = GameManager::sharedState(); if ( v22->m_playerColor.random - v22->m_playerColor.seed != 15 || a1->m_switchWaveTrailColor ) cocos2d::CCDrawNode::setBlendFunc(a1->m_waveTrail, (const cocos2d::ccBlendFunc *)&v36); else a1->m_waveTrail->m_isSolid = 1; PlayerObject::deactivateStreak(a1, 1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source