// // PlayerObject::init from 0x100217810 to 0x100218734 (3876 bytes) // // 1 xrefs: // > PlayerObject::create @ 0x1002177bc // // 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 // bool __fastcall PlayerObject::init( PlayerObject *a1, int a2, int a3, GJBaseGameLayer *a4, cocos2d::CCLayer *a5, bool a6) { int v10; // w8 int v11; // w22 int v12; // w8 int v13; // w21 GameManager *v14; // x0 GameManager *v15; // x0 GameManager *v16; // x0 cocos2d::CCString *v17; // x0 char *CString; // x0 cocos2d::CCString *v19; // x0 char *v20; // x0 const char *v21; // x1 bool v22; // w20 cocos2d::CCNode *v23; // x0 GameManager *v24; // x0 GameManager *v25; // x0 GameManager *v26; // x0 GameStatsManager *v27; // x0 GameStatsManager *v28; // x0 GameStatsManager *v29; // x0 __int64 v30; // x0 cocos2d::CCArray *v31; // x0 const char *v32; // x0 const char *v33; // x0 cocos2d::CCSprite *m_iconSpriteSecondary; // x23 const char *v35; // x0 cocos2d::CCSprite *m_iconSpriteWhitener; // x23 cocos2d::CCString *v37; // x0 char *v38; // x0 cocos2d::CCString *v39; // x0 char *v40; // x0 cocos2d::CCString *v41; // x0 char *v42; // x0 void **v43; // x0 void **v44; // x0 cocos2d::CCSprite *m_vehicleSpriteSecondary; // x23 void **v46; // x0 cocos2d::CCSprite *m_birdVehicle; // x23 void **v48; // x0 cocos2d::CCSprite *m_vehicleSpriteWhitener; // x23 cocos2d::CCString *v50; // x0 char *v51; // x0 GameManager *v52; // x0 GameManager *v53; // x0 int v54; // w27 PlayerFireBoostSprite **p_m_swingFireTop; // x24 PlayerFireBoostSprite **p_m_swingFireBottom; // x25 PlayerFireBoostSprite **p_m_swingFireMiddle; // x26 PlayerFireBoostSprite *v58; // x23 PlayerFireBoostSprite **v59; // x8 __n128 v60; // q0 PlayerFireBoostSprite *v61; // x23 __n128 v62; // q1 __n128 v63; // q0 PlayerFireBoostSprite *v64; // x23 __n128 v65; // q1 __n128 v66; // q0 PlayerFireBoostSprite *v67; // x23 __n128 v68; // q1 GameObject *v69; // x0 cocos2d::CCDictionary *v70; // x0 cocos2d::CCDictionary *v71; // x0 cocos2d::CCDictionary *v72; // x0 cocos2d::CCDictionary *v73; // x0 __int64 v74; // x0 cocos2d::CCArray *v75; // x0 GJActionManager *v76; // x0 cocos2d::CCParticleSystemQuad *v77; // x0 cocos2d::CCParticleSystemQuad *v78; // x0 cocos2d::CCParticleSystemQuad *v79; // x0 cocos2d::CCParticleSystemQuad *v80; // x0 cocos2d::CCParticleSystemQuad *v81; // x0 __n128 v82; // q0 cocos2d::CCParticleSystemQuad *m_trailingParticles; // x23 __n128 v84; // q1 cocos2d::CCParticleSystemQuad *v85; // x0 cocos2d::CCParticleSystemQuad *v86; // x23 float v87; // s0 cocos2d::CCParticleSystemQuad *v88; // x23 float v89; // s0 __n128 v90; // q0 cocos2d::CCParticleSystemQuad *m_shipClickParticles; // x23 __n128 v92; // q1 cocos2d::CCParticleSystemQuad *v93; // x23 float v94; // s0 cocos2d::CCParticleSystemQuad *v95; // x23 float v96; // s0 cocos2d::CCParticleSystemQuad *v97; // x23 float v98; // s0 cocos2d::CCParticleSystemQuad *v99; // x23 float v100; // s0 cocos2d::CCParticleSystemQuad *v101; // x23 float v102; // s0 cocos2d::CCParticleSystemQuad *v103; // x0 cocos2d::CCParticleSystemQuad *v104; // x0 cocos2d::CCParticleSystemQuad *v105; // x0 cocos2d::CCParticleSystemQuad *v106; // x0 char i; // w25 cocos2d::CCParticleSystemQuad *v108; // x24 cocos2d::CCParticleSystemQuad *v109; // x0 cocos2d::CCParticleSystemQuad *v110; // x0 cocos2d::CCParticleSystemQuad *v111; // x0 cocos2d::CCString *v112; // x0 char *v113; // x0 cocos2d::CCSprite *v114; // x0 cocos2d::CCSprite *v115; // x0 __n128 v116; // q0 cocos2d::CCSprite *m_dashFireSprite; // x22 __n128 v118; // q1 cocos2d::CCSprite *v119; // x22 void **v120; // x0 cocos2d::CCSprite *v121; // x0 cocos2d::CCString *v122; // x0 char *v123; // x0 void **v124; // x0 GameManager *v125; // x0 GameManager *v126; // x0 GameManager *v127; // x0 void *v129[2]; // [xsp+30h] [xbp-130h] BYREF char v130; // [xsp+47h] [xbp-119h] cocos2d::CCPoint v131; // [xsp+48h] [xbp-118h] BYREF void *v132[2]; // [xsp+50h] [xbp-110h] BYREF char v133; // [xsp+67h] [xbp-F9h] void *v134[2]; // [xsp+68h] [xbp-F8h] BYREF char v135; // [xsp+7Fh] [xbp-E1h] void *v136[2]; // [xsp+80h] [xbp-E0h] BYREF char v137; // [xsp+97h] [xbp-C9h] void *v138[2]; // [xsp+98h] [xbp-C8h] BYREF char v139; // [xsp+AFh] [xbp-B1h] void *__p[2]; // [xsp+B0h] [xbp-B0h] BYREF char v141; // [xsp+C7h] [xbp-99h] void *v142[2]; // [xsp+C8h] [xbp-98h] BYREF char v143; // [xsp+DFh] [xbp-81h] void *v144[2]; // [xsp+E0h] [xbp-80h] BYREF char v145; // [xsp+F7h] [xbp-69h] cocos2d::CCPoint v146; // 0:kr00_8.8 cocos2d::CCPoint v147; // 0:kr08_8.8 cocos2d::CCPoint v148; // 0:kr10_8.8 cocos2d::CCPoint v149; // 0:kr18_8.8 cocos2d::CCPoint v150; // 0:kr20_8.8 cocos2d::CCPoint v151; // 0:kr28_8.8 cocos2d::CCPoint v152; // 0:kr30_8.8 if ( a2 >= 485 ) v10 = 485; else v10 = a2; if ( v10 <= 1 ) v11 = 1; else v11 = v10; if ( a3 >= 169 ) v12 = 169; else v12 = a3; if ( v12 <= 1 ) v13 = 1; else v13 = v12; v14 = GameManager::sharedState(); a1->m_iconRequestID = GameManager::getIconRequestID(v14); v15 = GameManager::sharedState(); GameManager::loadIcon(v15, v11, 0, a1->m_iconRequestID); v16 = GameManager::sharedState(); GameManager::loadIcon(v16, v13, 1, a1->m_iconRequestID); v17 = (cocos2d::CCString *)sub_100268F4C("player_%02d_001.png", v11); CString = (char *)cocos2d::CCString::getCString(v17); sub_100009900(v144, CString); v19 = (cocos2d::CCString *)sub_100268F4C("player_%02d_2_001.png", v11); v20 = (char *)cocos2d::CCString::getCString(v19); sub_100009900(v142, v20); if ( v145 >= 0 ) v21 = (const char *)v144; else v21 = (const char *)v144[0]; v22 = GameObject::init(a1, v21); if ( v22 ) { a1->m_bUnkBool2 = 0; a1->m_bDontDraw = 1; v23 = cocos2d::CCNode::create(); a1->m_mainLayer = v23; ((void (__fastcall *)(cocos2d::CCNode *, void *))v23->setContentSize)(v23, &unk_10086CBF8); ((void (__fastcall *)(PlayerObject *, cocos2d::CCNode *))a1->addChild)(a1, a1->m_mainLayer); std::string::assign((std::string *)&a1->m_currentRobotAnimation, "run"); v24 = GameManager::sharedState(); a1->m_switchWaveTrailColor = GameManager::getGameVariable(v24, "0096"); v25 = GameManager::sharedState(); a1->m_practiceDeathEffect = GameManager::getGameVariable(v25, "0100"); v26 = GameManager::sharedState(); a1->m_gv0123 = GameManager::getGameVariable(v26, "0123"); v27 = GameStatsManager::sharedState(); a1->m_robotAnimation1Enabled = GameStatsManager::isItemEnabled(v27, GJItem, 18); v28 = GameStatsManager::sharedState(); a1->m_robotAnimation2Enabled = GameStatsManager::isItemEnabled(v28, GJItem, 19); v29 = GameStatsManager::sharedState(); a1->m_spiderAnimationEnabled = GameStatsManager::isItemEnabled(v29, GJItem, 20); a1->m_maybeSavedPlayerFrame = v11; a1->m_ghostType = 0; a1->m_playerSpeed = 0.9; v30 = rand(); a1->m_playerSpeedAC = (float)(vcvts_n_f32_s32(v30, 0x1Fu) * 10.0) + 5.0; a1->m_gameLayer = a4; a1->m_parentLayer = a5; a1->m_playEffects = a6; a1->m_maybeCanRunIntoBlocks = !a6; v31 = (cocos2d::CCArray *)sub_10024A15C(v30); a1->m_touchingRings = v31; cocos2d::CCObject::retain(v31); ((void (__fastcall *)(PlayerObject *, void *))a1->setTextureRect)(a1, &unk_10086CC00); if ( v145 >= 0 ) v32 = (const char *)v144; else v32 = (const char *)v144[0]; a1->m_iconSprite = cocos2d::CCSprite::createWithSpriteFrameName(v32); ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); if ( v143 >= 0 ) v33 = (const char *)v142; else v33 = (const char *)v142[0]; a1->m_iconSpriteSecondary = cocos2d::CCSprite::createWithSpriteFrameName(v33); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->addChild_0)(a1->m_iconSprite); m_iconSpriteSecondary = a1->m_iconSpriteSecondary; v146 = cocos2d::CCNode::convertToNodeSpace(a1->m_iconSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_iconSpriteSecondary->setPosition)( m_iconSpriteSecondary, v138, v146.x, v146.y); if ( v143 >= 0 ) v35 = (const char *)v142; else v35 = (const char *)v142[0]; a1->m_iconSpriteWhitener = cocos2d::CCSprite::createWithSpriteFrameName(v35); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->addChild_0)(a1->m_iconSprite); m_iconSpriteWhitener = a1->m_iconSpriteWhitener; v147 = cocos2d::CCNode::convertToNodeSpace(a1->m_iconSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_iconSpriteWhitener->setPosition)( m_iconSpriteWhitener, v138, v147.x, v147.y); v37 = (cocos2d::CCString *)sub_100268F4C("player_%02d_extra_001.png", v11); v38 = (char *)cocos2d::CCString::getCString(v37); sub_100009900(__p, v38); PlayerObject::updatePlayerSpriteExtra(a1, __p); if ( v141 < 0 ) operator delete(__p[0]); v39 = (cocos2d::CCString *)sub_100268F4C("ship_%02d_001.png", v13); v40 = (char *)cocos2d::CCString::getCString(v39); sub_100009900(v138, v40); v41 = (cocos2d::CCString *)sub_100268F4C("ship_%02d_2_001.png", v13); v42 = (char *)cocos2d::CCString::getCString(v41); sub_100009900(v136, v42); if ( v139 >= 0 ) v43 = v138; else v43 = (void **)v138[0]; a1->m_vehicleSprite = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v43); ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_vehicleSprite->setVisible)(a1->m_vehicleSprite, 0); if ( v137 >= 0 ) v44 = v136; else v44 = (void **)v136[0]; a1->m_vehicleSpriteSecondary = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v44); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_vehicleSprite->addChild_0)(a1->m_vehicleSprite); m_vehicleSpriteSecondary = a1->m_vehicleSpriteSecondary; v148 = cocos2d::CCNode::convertToNodeSpace(a1->m_vehicleSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_vehicleSpriteSecondary->setPosition)( m_vehicleSpriteSecondary, v132, v148.x, v148.y); if ( v137 >= 0 ) v46 = v136; else v46 = (void **)v136[0]; a1->m_birdVehicle = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v46); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_vehicleSprite->addChild_0)(a1->m_vehicleSprite); m_birdVehicle = a1->m_birdVehicle; v149 = cocos2d::CCNode::convertToNodeSpace(a1->m_vehicleSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_birdVehicle->setPosition)( m_birdVehicle, v132, v149.x, v149.y); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_birdVehicle->setVisible)(a1->m_birdVehicle, 0); if ( v137 >= 0 ) v48 = v136; else v48 = (void **)v136[0]; a1->m_vehicleSpriteWhitener = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v48); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_vehicleSprite->addChild_0)(a1->m_vehicleSprite); m_vehicleSpriteWhitener = a1->m_vehicleSpriteWhitener; v150 = cocos2d::CCNode::convertToNodeSpace(a1->m_vehicleSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_vehicleSpriteWhitener->setPosition)( m_vehicleSpriteWhitener, v132, v150.x, v150.y); v50 = (cocos2d::CCString *)sub_100268F4C("ship_%02d_extra_001.png", v13); v51 = (char *)cocos2d::CCString::getCString(v50); sub_100009900(v134, v51); PlayerObject::updateShipSpriteExtra(a1, v134); if ( v135 < 0 ) operator delete(v134[0]); v52 = GameManager::sharedState(); PlayerObject::createRobot(a1, v52->m_playerRobot.random - v52->m_playerRobot.seed); a1->m_robotFire = PlayerFireBoostSprite::create(); ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); ((void (__fastcall *)(PlayerFireBoostSprite *, _QWORD))a1->m_robotFire->setVisible)(a1->m_robotFire, 0); v53 = GameManager::sharedState(); PlayerObject::createSpider(a1, v53->m_playerSpider.random - v53->m_playerSpider.seed); v54 = 0; p_m_swingFireTop = &a1->m_swingFireTop; p_m_swingFireBottom = &a1->m_swingFireBottom; p_m_swingFireMiddle = &a1->m_swingFireMiddle; do { v58 = PlayerFireBoostSprite::create(); ((void (__fastcall *)(cocos2d::CCNode *, PlayerFireBoostSprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v58, 0xFFFFFFFFLL); LODWORD(v58->m_size) = dword_10063A7C0[v54 == 0]; ((void (__fastcall *)(PlayerFireBoostSprite *, _QWORD))v58->setVisible)(v58, 0); if ( v54 == 1 ) v59 = &a1->m_swingFireBottom; else v59 = &a1->m_swingFireTop; if ( !v54 ) v59 = &a1->m_swingFireMiddle; *v59 = v58; ++v54; } while ( v54 != 3 ); v60 = ((__n128 (__fastcall *)(PlayerFireBoostSprite *, float))(*p_m_swingFireMiddle)->setRotation)( *p_m_swingFireMiddle, 90.0); v61 = *p_m_swingFireMiddle; v60.n128_u32[0] = -14.0; v62.n128_u32[0] = 0; sub_100022980(v60, v62, v132); ((void (__fastcall *)(PlayerFireBoostSprite *, void **))v61->setPosition)(v61, v132); v63 = ((__n128 (__fastcall *)(PlayerFireBoostSprite *, float))(*p_m_swingFireBottom)->setRotation)( *p_m_swingFireBottom, 45.0); v64 = *p_m_swingFireBottom; v63.n128_u32[0] = -9.5; v65.n128_u32[0] = -10.0; sub_100022980(v63, v65, v132); ((void (__fastcall *)(PlayerFireBoostSprite *, void **))v64->setPosition)(v64, v132); v66 = ((__n128 (__fastcall *)(PlayerFireBoostSprite *, float))(*p_m_swingFireTop)->setRotation)( *p_m_swingFireTop, 135.0); v67 = *p_m_swingFireTop; v66.n128_u32[0] = -9.5; v68.n128_u32[0] = 10.0; sub_100022980(v66, v68, v132); ((void (__fastcall *)(PlayerFireBoostSprite *, void **))v67->setPosition)(v67, v132); a1->m_yVelocity = 0.0; a1->m_maybeIsBoosted = 0; a1->m_isOnGround2 = 0; *(_WORD *)&a1->m_isDead = 0; a1->m_vehicleSize = 1.0; a1->m_unkAngle1 = 30.0; PlayerObject::updateTimeMod(a1, 0.9, 0); a1->m_pendingCheckpoint = nullptr; v69 = (GameObject *)cocos2d::CCNode::create(); a1->m_maybeLastGroundObject = v69; cocos2d::CCObject::retain(v69); v70 = cocos2d::CCDictionary::create(); a1->m_collisionLogTop = v70; cocos2d::CCObject::retain(v70); v71 = cocos2d::CCDictionary::create(); a1->m_collisionLogBottom = v71; cocos2d::CCObject::retain(v71); v72 = cocos2d::CCDictionary::create(); a1->m_collisionLogLeft = v72; cocos2d::CCObject::retain(v72); v73 = cocos2d::CCDictionary::create(); a1->m_collisionLogRight = v73; cocos2d::CCObject::retain(v73); v75 = (cocos2d::CCArray *)sub_10024A15C(v74); a1->m_particleSystems = v75; cocos2d::CCObject::retain(v75); v76 = GJActionManager::create(); a1->m_actionManager = v76; cocos2d::CCObject::retain(v76); v77 = cocos2d::CCParticleSystemQuad::create("dragEffect.plist", 0); a1->m_playerGroundParticles = v77; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v77->setPositionType)(v77, 1); cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles); sub_10024A2D0(a1->m_particleSystems, a1->m_playerGroundParticles); a1->m_hasGroundParticles = 0; v78 = cocos2d::CCParticleSystemQuad::create("dashEffect.plist", 0); a1->m_dashParticles = v78; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v78->setPositionType)(v78, 1); cocos2d::CCParticleSystem::stopSystem(a1->m_dashParticles); sub_10024A2D0(a1->m_particleSystems, a1->m_dashParticles); v79 = cocos2d::CCParticleSystemQuad::create("burstEffect.plist", 0); a1->m_ufoClickParticles = v79; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v79->setPositionType)(v79, 1); cocos2d::CCParticleSystem::stopSystem(a1->m_ufoClickParticles); sub_10024A2D0(a1->m_particleSystems, a1->m_ufoClickParticles); v80 = cocos2d::CCParticleSystemQuad::create("burstEffect2.plist", 0); a1->m_robotBurstParticles = v80; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v80->setPositionType)(v80, 1); cocos2d::CCParticleSystem::stopSystem(a1->m_robotBurstParticles); sub_10024A2D0(a1->m_particleSystems, a1->m_robotBurstParticles); v81 = cocos2d::CCParticleSystemQuad::create("dragEffect.plist", 0); a1->m_trailingParticles = v81; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v81->setPositionType)(v81, 1); sub_10024A2D0(a1->m_particleSystems, a1->m_trailingParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_trailingParticles); v82.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_trailingParticles->getLife)(a1->m_trailingParticles); LODWORD(a1->m_trailingParticleLife) = v82.n128_u32[0]; m_trailingParticles = a1->m_trailingParticles; v82.n128_u32[0] = 0; v84.n128_u32[0] = 2.0; sub_100022980(v82, v84, v132); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))m_trailingParticles->setPosVar)( m_trailingParticles, v132); v85 = cocos2d::CCParticleSystemQuad::create("dragEffect.plist", 0); a1->m_shipClickParticles = v85; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v85->setPositionType)(v85, 1); sub_10024A2D0(a1->m_particleSystems, a1->m_shipClickParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles); v86 = a1->m_trailingParticles; v87 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v86->getSpeed)(v86); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v86->setSpeed)(v86, v87 * 0.2); v88 = a1->m_trailingParticles; v89 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v88->getSpeedVar)(v88); v90 = ((__n128 (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v88->setSpeedVar)(v88, v89 * 0.2); m_shipClickParticles = a1->m_shipClickParticles; v90.n128_u32[0] = 0; v92.n128_u32[0] = 2.0; sub_100022980(v90, v92, v132); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))m_shipClickParticles->setPosVar)( m_shipClickParticles, v132); v93 = a1->m_shipClickParticles; v94 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v93->getSpeed)(v93); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v93->setSpeed)(v93, v94 + v94); v95 = a1->m_shipClickParticles; v96 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v95->getSpeedVar)(v95); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v95->setSpeedVar)(v95, v96 + v96); v97 = a1->m_shipClickParticles; v98 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v97->getAngleVar)(v97); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v97->setAngleVar)(v97, v98 + v98); v99 = a1->m_shipClickParticles; v100 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v99->getStartSize)(v99); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v99->setStartSize)(v99, v100 * 1.5); v101 = a1->m_shipClickParticles; v102 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))v101->getStartSizeVar)(v101); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v101->setStartSizeVar)(v101, v102 * 1.5); a1->m_hasShipParticles = 0; v103 = a1->m_trailingParticles; *(_OWORD *)v132 = xmmword_10063A730; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v103->setStartColor)(v103, v132); v104 = a1->m_trailingParticles; *(_OWORD *)v132 = xmmword_1006356D0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v104->setEndColor)(v104, v132); v105 = a1->m_shipClickParticles; *(_OWORD *)v132 = xmmword_10063A740; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v105->setStartColor)(v105, v132); v106 = a1->m_shipClickParticles; *(_OWORD *)v132 = xmmword_1006356D0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v106->setEndColor)(v106, v132); for ( i = 1; ; i = 0 ) { v108 = cocos2d::CCParticleSystemQuad::create("swingBurstEffect.plist", 0); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v108->setPositionType)(v108, 2); sub_10024A2D0(a1->m_particleSystems, v108); cocos2d::CCParticleSystem::stopSystem(v108); *(_OWORD *)v132 = xmmword_10063A730; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v108->setStartColor)(v108, v132); *(_OWORD *)v132 = xmmword_1006356D0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, void **))v108->setEndColor)(v108, v132); if ( (i & 1) == 0 ) break; a1->m_swingBurstParticles1 = v108; } a1->m_swingBurstParticles2 = v108; v109 = cocos2d::CCParticleSystemQuad::create("shipDragEffect.plist", 0); a1->m_vehicleGroundParticles = v109; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v109->setPositionType)(v109, 2); sub_10024A2D0(a1->m_particleSystems, a1->m_vehicleGroundParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_vehicleGroundParticles); v110 = cocos2d::CCParticleSystemQuad::create("landEffect.plist", 0); a1->m_landParticles0 = v110; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v110->setPositionType)(v110, 2); sub_10024A2D0(a1->m_particleSystems, a1->m_landParticles0); cocos2d::CCParticleSystem::stopSystem(a1->m_landParticles0); a1->m_landParticlesAngle = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_landParticles0->getAngle)(a1->m_landParticles0); a1->m_landParticleRelatedY = *(float *)(((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_landParticles0->getGravity)(a1->m_landParticles0) + 4); v111 = cocos2d::CCParticleSystemQuad::create("landEffect.plist", 0); a1->m_landParticles1 = v111; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v111->setPositionType)(v111, 2); sub_10024A2D0(a1->m_particleSystems, a1->m_landParticles1); cocos2d::CCParticleSystem::stopSystem(a1->m_landParticles1); PlayerObject::setupStreak(a1); v112 = (cocos2d::CCString *)sub_100268F4C("player_%02d_glow_001.png", v11); v113 = (char *)cocos2d::CCString::getCString(v112); sub_100009900(v132, v113); v114 = cocos2d::CCSprite::create_1(); a1->m_dashSpritesContainer = v114; ((void (__fastcall *)(cocos2d::CCSprite *, void *))v114->setTextureRect)(v114, &unk_10086CC00); a1->m_dashSpritesContainer->m_bDontDraw = 1; ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); v115 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_001.png"); a1->m_dashFireSprite = v115; ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v115->setBlendFunc)(v115, 0x100000302LL); v116 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))a1->m_dashSpritesContainer->addChild)( a1->m_dashSpritesContainer, a1->m_dashFireSprite); m_dashFireSprite = a1->m_dashFireSprite; v116.n128_u32[0] = 0; v118.n128_u32[0] = 0; sub_100022980(v116, v118, &v131); v151 = cocos2d::CCNode::convertToNodeSpace(a1, &v131); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))m_dashFireSprite->setPosition)( m_dashFireSprite, v129, v151.x, v151.y); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_dashFireSprite->setVisible)(a1->m_dashFireSprite, 0); v119 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_outline_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_dashFireSprite->addChild_0)( a1->m_dashFireSprite, v119, 1); v152 = cocos2d::CCNode::convertToNodeSpace(a1->m_dashFireSprite, &stru_10086CBF0); ((void (__fastcall *)(cocos2d::CCSprite *, void **, float, float))v119->setPosition)(v119, v129, v152.x, v152.y); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v119->setOpacity)(v119, 150); if ( v133 >= 0 ) v120 = v132; else v120 = (void **)v132[0]; v121 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v120); a1->m_iconGlow = v121; ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))v121->setVisible)(v121, 0); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_dashSpritesContainer->addChild_0)( a1->m_dashSpritesContainer, a1->m_iconGlow, 2); v122 = (cocos2d::CCString *)sub_100268F4C("ship_%02d_glow_001.png", v13); v123 = (char *)cocos2d::CCString::getCString(v122); sub_100009900(v129, v123); if ( v130 >= 0 ) v124 = v129; else v124 = (void **)v129[0]; a1->m_vehicleGlow = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v124); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashSpritesContainer->addChild_0)(a1->m_dashSpritesContainer); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_vehicleGlow->setVisible)(a1->m_vehicleGlow, 0); *(_QWORD *)&a1->m_width = 0x41F0000041F00000LL; a1->m_unkAngle1 = 30.0; v125 = GameManager::sharedState(); a1->m_defaultMiniIcon = GameManager::getGameVariable(v125, "0060"); v126 = GameManager::sharedState(); a1->m_swapColors = GameManager::getGameVariable(v126, "0061"); v127 = GameManager::sharedState(); a1->m_switchDashFireColor = GameManager::getGameVariable(v127, "0062"); v131.x = 0.0; sub_10004C7D8(&a1->m_playerFollowFloats.__begin_, 0xC8u); a1->m_quickCheckpointMode = 0; if ( v130 < 0 ) operator delete(v129[0]); if ( v133 < 0 ) operator delete(v132[0]); if ( v137 < 0 ) operator delete(v136[0]); if ( v139 < 0 ) operator delete(v138[0]); } if ( v143 < 0 ) operator delete(v142[0]); if ( v145 < 0 ) operator delete(v144[0]); return v22; }
GD Web Decomp Icon

GD Web Decomp

Raw Source