// // PlayerObject::init from 0x350c34 to 0x351902 (3278 bytes) // // 1 xrefs: // > PlayerObject::create @ 0x35246e // // 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 PlayerObject::init(PlayerObject *a1, int a2, int a3, GJBaseGameLayer *a4, cocos2d::CCLayer *a5, bool a6) { const char *v7; // r5 const char *v9; // r6 GameManager *v10; // r0 GameManager *v11; // r0 GameManager *v12; // r0 cocos2d::CCString *v13; // r0 char *CString; // r0 cocos2d::CCString *v15; // r0 char *v16; // r0 cocos2d::CCNode *v17; // r0 cocos2d::CCNode_vtbl *v18; // r3 GameManager *v19; // r0 GameManager *v20; // r0 GameManager *v21; // r0 GameStatsManager *v22; // r0 GameStatsManager *v23; // r0 GameStatsManager *v24; // r0 bool isItemEnabled; // r0 cocos2d::CCArray *v26; // r0 cocos2d::CCArray *v27; // r0 cocos2d::CCSprite *v28; // r0 cocos2d::CCSprite *v29; // r0 cocos2d::CCSprite *m_iconSpriteSecondary; // r8 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v32; // r0 cocos2d::CCSprite *m_iconSpriteWhitener; // r8 void (__fastcall *v34)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCString *v35; // r0 char *v36; // r0 cocos2d::CCString *v37; // r0 char *v38; // r0 cocos2d::CCString *v39; // r0 char *v40; // r0 cocos2d::CCSprite *v41; // r0 cocos2d::CCSprite *v42; // r0 cocos2d::CCSprite *m_vehicleSpriteSecondary; // r8 void (__fastcall *v44)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v45; // r0 cocos2d::CCSprite *m_birdVehicle; // r8 void (__fastcall *v47)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v48; // r0 cocos2d::CCSprite *m_vehicleSpriteWhitener; // r8 void (__fastcall *v50)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCString *v51; // r0 char *v52; // r0 GameManager *v53; // r0 PlayerFireBoostSprite *v54; // r0 GameManager *v55; // r0 int i; // r10 PlayerFireBoostSprite *v57; // r8 int v58; // s15 void (__fastcall *setVisible)(cocos2d::CCSprite *__hidden, bool); // r3 PlayerFireBoostSprite *m_swingFireMiddle; // r8 void (__fastcall *v61)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 PlayerFireBoostSprite *m_swingFireBottom; // r8 void (__fastcall *v63)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 PlayerFireBoostSprite *m_swingFireTop; // r8 void (__fastcall *v65)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 GameObject *v66; // r0 cocos2d::CCDictionary *v67; // r0 cocos2d::CCDictionary *v68; // r0 cocos2d::CCDictionary *v69; // r0 cocos2d::CCDictionary *v70; // r0 cocos2d::CCArray *v71; // r0 cocos2d::CCArray *v72; // r0 GJActionManager *v73; // r0 bool v74; // r2 cocos2d::CCParticleSystemQuad *v75; // r0 cocos2d::CCParticleSystemQuad_vtbl *v76; // r3 bool v77; // r2 cocos2d::CCParticleSystemQuad *v78; // r0 cocos2d::CCParticleSystemQuad_vtbl *v79; // r3 bool v80; // r2 cocos2d::CCParticleSystemQuad *v81; // r0 cocos2d::CCParticleSystemQuad_vtbl *v82; // r3 bool v83; // r2 cocos2d::CCParticleSystemQuad *v84; // r0 cocos2d::CCParticleSystemQuad_vtbl *v85; // r3 bool v86; // r2 cocos2d::CCParticleSystemQuad *v87; // r0 cocos2d::CCParticleSystemQuad_vtbl *v88; // r3 float v89; // r0 cocos2d::CCParticleSystemQuad *m_trailingParticles; // r8 void (__fastcall *setPosVar)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // r10 bool v92; // r2 cocos2d::CCParticleSystemQuad *v93; // r0 cocos2d::CCParticleSystemQuad_vtbl *v94; // r3 cocos2d::CCParticleSystemQuad *v95; // r8 void (__fastcall *setSpeed)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v97; // r0 cocos2d::CCParticleSystemQuad *v98; // r8 void (__fastcall *setSpeedVar)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v100; // r0 cocos2d::CCParticleSystemQuad *m_shipClickParticles; // r8 void (__fastcall *v102)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCParticleSystemQuad *v103; // r8 void (__fastcall *v104)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v105; // r0 cocos2d::CCParticleSystemQuad *v106; // r8 void (__fastcall *v107)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v108; // r0 cocos2d::CCParticleSystemQuad *v109; // r8 void (__fastcall *setAngleVar)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v111; // r0 cocos2d::CCParticleSystemQuad *v112; // r8 void (__fastcall *setStartSize)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v114; // r0 cocos2d::CCParticleSystemQuad *v115; // r8 void (__fastcall *setStartSizeVar)(cocos2d::CCParticleSystem *__hidden, float); // r10 float v117; // r0 cocos2d::CCParticleSystemQuad *v118; // r10 void (__fastcall *setStartColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r8 cocos2d::CCParticleSystemQuad *v120; // r10 void (__fastcall *setEndColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r8 cocos2d::CCParticleSystemQuad *v122; // r10 void (__fastcall *v123)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r8 cocos2d::CCParticleSystemQuad *v124; // r10 void (__fastcall *v125)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r8 bool v126; // r2 int j; // r10 cocos2d::CCParticleSystemQuad *v128; // r7 cocos2d::CCParticleSystemQuad *v129; // r0 cocos2d::CCParticleSystemQuad_vtbl *v130; // r3 bool v131; // r2 cocos2d::CCParticleSystemQuad *v132; // r0 cocos2d::CCParticleSystemQuad_vtbl *v133; // r3 float y; // r2 cocos2d::CCParticleSystemQuad *v135; // r0 cocos2d::CCParticleSystemQuad_vtbl *v136; // r3 cocos2d::CCString *v137; // r0 char *v138; // r0 cocos2d::CCSprite *v139; // r0 cocos2d::CCSprite_vtbl *v140; // r3 cocos2d::CCNode *m_mainLayer; // r0 cocos2d::CCSprite *v142; // r0 cocos2d::CCSprite_vtbl *v143; // r3 cocos2d::CCSprite *m_dashFireSprite; // r8 void (__fastcall *v145)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v146; // r8 void (__fastcall *v147)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v148; // r0 cocos2d::CCSprite_vtbl *v149; // r3 cocos2d::CCString *v150; // r0 char *v151; // r0 cocos2d::CCSprite *v152; // r0 GameManager *v153; // r0 GameManager *v154; // r0 GameManager *v155; // r0 bool GameVariable; // r0 int *m_finish; // r1 float *m_start; // r3 unsigned int v159; // r2 _BOOL4 v161; // [sp+Ch] [bp-50h] void (__fastcall *v162)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // [sp+14h] [bp-48h] void (__fastcall *v163)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // [sp+14h] [bp-48h] cocos2d::CCSprite *v164; // [sp+1Ch] [bp-40h] BYREF cocos2d::CCSprite *v165; // [sp+20h] [bp-3Ch] BYREF const char *v166; // [sp+24h] [bp-38h] BYREF cocos2d::CCSprite *v167; // [sp+28h] [bp-34h] BYREF cocos2d::CCSprite *v168; // [sp+2Ch] [bp-30h] BYREF cocos2d::CCSprite *v169; // [sp+30h] [bp-2Ch] BYREF int v170; // [sp+34h] [bp-28h] int v171; // [sp+38h] [bp-24h] cocos2d::CCPoint v172; // [sp+3Ch] [bp-20h] BYREF cocos2d::CCPoint v173[2]; // [sp+44h] [bp-18h] BYREF v7 = (const char *)a3; if ( a2 <= 0 ) { v9 = (_BYTE *)(&dword_0 + 1); } else { if ( a2 >= 485 ) a2 = 485; v9 = (const char *)a2; } if ( a3 <= 0 ) { v7 = (_BYTE *)(&dword_0 + 1); } else if ( a3 >= 169 ) { v7 = (_BYTE *)(&dword_A8 + 1); } v10 = GameManager::sharedState(); a1->m_iconRequestID = GameManager::getIconRequestID(v10); v11 = GameManager::sharedState(); GameManager::loadIcon(v11, (int)v9, 0, a1->m_iconRequestID); v12 = GameManager::sharedState(); GameManager::loadIcon(v12, (int)v7, 1, a1->m_iconRequestID); v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"player_%02d_001.png", v9); CString = (char *)cocos2d::CCString::getCString(v13); sub_776584((int)&v164, CString); v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"player_%02d_2_001.png", v9); v16 = (char *)cocos2d::CCString::getCString(v15); sub_776584((int)&v165, v16); v161 = GameObject::init(a1, (const char *)v164); if ( v161 ) { a1->m_bUnkBool2 = 0; a1->m_bDontDraw = 1; v17 = cocos2d::CCNode::create(); v18 = v17->__vftable; a1->m_mainLayer = v17; v18->setContentSize(v17, &stru_AC5C80); a1->addChild(a1, a1->m_mainLayer); sub_7753D4((int)&a1->m_currentRobotAnimation, "run"); v19 = GameManager::sharedState(); a1->m_switchWaveTrailColor = GameManager::getGameVariable(v19, "0096"); v20 = GameManager::sharedState(); a1->m_practiceDeathEffect = GameManager::getGameVariable(v20, "0100"); v21 = GameManager::sharedState(); a1->m_gv0123 = GameManager::getGameVariable(v21, "0123"); v22 = GameStatsManager::sharedState(); a1->m_robotAnimation1Enabled = GameStatsManager::isItemEnabled(v22, GJItem, 18); v23 = GameStatsManager::sharedState(); a1->m_robotAnimation2Enabled = GameStatsManager::isItemEnabled(v23, GJItem, 19); v24 = GameStatsManager::sharedState(); isItemEnabled = GameStatsManager::isItemEnabled(v24, GJItem, 20); a1->m_ghostType = 0; a1->m_spiderAnimationEnabled = isItemEnabled; a1->m_maybeSavedPlayerFrame = (int)v9; a1->m_playerSpeed = 0.9; v26 = (cocos2d::CCArray *)rand(); a1->m_playerSpeedAC = (float)(vcvts_n_f32_s32((unsigned int)v26, 0x1Fu) * 10.0) + 5.0; a1->m_playEffects = a6; a1->m_gameLayer = a4; a1->m_parentLayer = a5; a1->m_maybeCanRunIntoBlocks = !a6; v27 = (cocos2d::CCArray *)cocos2d::CCArray::create(v26); a1->m_touchingRings = v27; cocos2d::CCObject::retain(v27); a1->setTextureRect(a1, &stru_AC5C70); v28 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v164); a1->m_iconSprite = v28; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v28, 1); v29 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v165); a1->m_iconSpriteSecondary = v29; a1->m_iconSprite->addChild_0(a1->m_iconSprite, v29, -1); m_iconSpriteSecondary = a1->m_iconSpriteSecondary; setPosition = m_iconSpriteSecondary->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_iconSprite, &stru_AC5C68); setPosition(m_iconSpriteSecondary, v173); v32 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v165); a1->m_iconSpriteWhitener = v32; a1->m_iconSprite->addChild_0(a1->m_iconSprite, v32, 2); m_iconSpriteWhitener = a1->m_iconSpriteWhitener; v34 = m_iconSpriteWhitener->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_iconSprite, &stru_AC5C68); v34(m_iconSpriteWhitener, v173); v35 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"player_%02d_extra_001.png", v9); v36 = (char *)cocos2d::CCString::getCString(v35); sub_776584((int)&v166, v36); PlayerObject::updatePlayerSpriteExtra((int)a1, &v166); sub_774008(&v166); v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"ship_%02d_001.png", v7); v38 = (char *)cocos2d::CCString::getCString(v37); sub_776584((int)&v167, v38); v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"ship_%02d_2_001.png", v7); v40 = (char *)cocos2d::CCString::getCString(v39); sub_776584((int)&v168, v40); v41 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v167); a1->m_vehicleSprite = v41; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v41, 2); a1->m_vehicleSprite->setVisible(a1->m_vehicleSprite, 0); v42 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v168); a1->m_vehicleSpriteSecondary = v42; a1->m_vehicleSprite->addChild_0(a1->m_vehicleSprite, v42, -1); m_vehicleSpriteSecondary = a1->m_vehicleSpriteSecondary; v44 = m_vehicleSpriteSecondary->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_vehicleSprite, &stru_AC5C68); v44(m_vehicleSpriteSecondary, v173); v45 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v168); a1->m_birdVehicle = v45; a1->m_vehicleSprite->addChild_0(a1->m_vehicleSprite, v45, -2); m_birdVehicle = a1->m_birdVehicle; v47 = m_birdVehicle->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_vehicleSprite, &stru_AC5C68); v47(m_birdVehicle, v173); a1->m_birdVehicle->setVisible(a1->m_birdVehicle, 0); v48 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v168); a1->m_vehicleSpriteWhitener = v48; a1->m_vehicleSprite->addChild_0(a1->m_vehicleSprite, v48, 1); m_vehicleSpriteWhitener = a1->m_vehicleSpriteWhitener; v50 = m_vehicleSpriteWhitener->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_vehicleSprite, &stru_AC5C68); v50(m_vehicleSpriteWhitener, v173); v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"ship_%02d_extra_001.png", v7); v52 = (char *)cocos2d::CCString::getCString(v51); sub_776584((int)v173, v52); PlayerObject::updateShipSpriteExtra((int)a1, (const char **)v173); sub_774008(v173); v53 = GameManager::sharedState(); PlayerObject::createRobot(a1, v53->m_playerRobot.random - v53->m_playerRobot.seed); v54 = PlayerFireBoostSprite::create(); a1->m_robotFire = v54; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v54, -1); a1->m_robotFire->setVisible(a1->m_robotFire, 0); v55 = GameManager::sharedState(); PlayerObject::createSpider(a1, v55->m_playerSpider.random - v55->m_playerSpider.seed); for ( i = 0; i != 3; ++i ) { v57 = PlayerFireBoostSprite::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v57, -1); if ( i ) v58 = 1060655596; else v58 = 1064682128; setVisible = v57->setVisible; LODWORD(v57->m_size) = v58; setVisible(v57, 0); if ( i ) { if ( i == 1 ) a1->m_swingFireBottom = v57; else a1->m_swingFireTop = v57; } else { a1->m_swingFireMiddle = v57; } } ((void (__fastcall *)(PlayerFireBoostSprite *, int))a1->m_swingFireMiddle->setRotation)( a1->m_swingFireMiddle, 1119092736); m_swingFireMiddle = a1->m_swingFireMiddle; v61 = m_swingFireMiddle->setPosition; cocos2d::CCPoint::CCPoint(v173, -14.0, 0.0); v61(m_swingFireMiddle, v173); ((void (__fastcall *)(PlayerFireBoostSprite *, int))a1->m_swingFireBottom->setRotation)( a1->m_swingFireBottom, 1110704128); m_swingFireBottom = a1->m_swingFireBottom; v63 = m_swingFireBottom->setPosition; cocos2d::CCPoint::CCPoint(v173, -9.5, -10.0); v63(m_swingFireBottom, v173); ((void (__fastcall *)(PlayerFireBoostSprite *, int))a1->m_swingFireTop->setRotation)(a1->m_swingFireTop, 1124532224); m_swingFireTop = a1->m_swingFireTop; v65 = m_swingFireTop->setPosition; cocos2d::CCPoint::CCPoint(v173, -9.5, 10.0); v65(m_swingFireTop, v173); PlayerObject::setYVelocity(a1, 0.0, 51); a1->m_maybeIsBoosted = 0; a1->m_isOnGround = 0; a1->m_isOnGround2 = 0; a1->m_isDead = 0; a1->m_vehicleSize = 1.0; a1->m_unkAngle1 = 30.0; PlayerObject::updateTimeMod(a1, 0.9, 0); a1->m_pendingCheckpoint = nullptr; v66 = (GameObject *)cocos2d::CCNode::create(); a1->m_maybeLastGroundObject = v66; cocos2d::CCObject::retain(v66); v67 = cocos2d::CCDictionary::create(); a1->m_collisionLogTop = v67; cocos2d::CCObject::retain(v67); v68 = cocos2d::CCDictionary::create(); a1->m_collisionLogBottom = v68; cocos2d::CCObject::retain(v68); v69 = cocos2d::CCDictionary::create(); a1->m_collisionLogLeft = v69; cocos2d::CCObject::retain(v69); v70 = cocos2d::CCDictionary::create(); a1->m_collisionLogRight = v70; cocos2d::CCObject::retain(v70); v72 = (cocos2d::CCArray *)cocos2d::CCArray::create(v71); a1->m_particleSystems = v72; cocos2d::CCObject::retain(v72); v73 = GJActionManager::create(); a1->m_actionManager = v73; cocos2d::CCObject::retain(v73); v75 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"dragEffect.plist", nullptr, v74); v76 = v75->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playerGroundParticles = v75; v76->setPositionType(v75, kCCPositionTypeRelative); cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_playerGroundParticles); a1->m_hasGroundParticles = 0; v78 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"dashEffect.plist", nullptr, v77); v79 = v78->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_dashParticles = v78; v79->setPositionType(v78, kCCPositionTypeRelative); cocos2d::CCParticleSystem::stopSystem(a1->m_dashParticles); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_dashParticles); v81 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"burstEffect.plist", nullptr, v80); v82 = v81->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_ufoClickParticles = v81; v82->setPositionType(v81, kCCPositionTypeRelative); cocos2d::CCParticleSystem::stopSystem(a1->m_ufoClickParticles); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_ufoClickParticles); v84 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"burstEffect2.plist", nullptr, v83); v85 = v84->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_robotBurstParticles = v84; v85->setPositionType(v84, kCCPositionTypeRelative); cocos2d::CCParticleSystem::stopSystem(a1->m_robotBurstParticles); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_robotBurstParticles); v87 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"dragEffect.plist", nullptr, v86); v88 = v87->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_trailingParticles = v87; v88->setPositionType(v87, kCCPositionTypeRelative); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_trailingParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_trailingParticles); v89 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_trailingParticles->getLife)(a1->m_trailingParticles)); m_trailingParticles = a1->m_trailingParticles; a1->m_trailingParticleLife = v89; setPosVar = m_trailingParticles->setPosVar; cocos2d::CCPoint::CCPoint(v173, 0.0, 2.0); setPosVar(m_trailingParticles, v173); v93 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"dragEffect.plist", nullptr, v92); v94 = v93->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_shipClickParticles = v93; v94->setPositionType(v93, kCCPositionTypeRelative); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_shipClickParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles); v95 = a1->m_trailingParticles; setSpeed = v95->setSpeed; v97 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v95->getSpeed)(v95)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))setSpeed)(v95, v97 * 0.2); v98 = a1->m_trailingParticles; setSpeedVar = v98->setSpeedVar; v100 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v98->getSpeedVar)(v98)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))setSpeedVar)(v98, v100 * 0.2); m_shipClickParticles = a1->m_shipClickParticles; v102 = m_shipClickParticles->setPosVar; cocos2d::CCPoint::CCPoint(v173, 0.0, 2.0); v102(m_shipClickParticles, v173); v103 = a1->m_shipClickParticles; v104 = v103->setSpeed; v105 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v103->getSpeed)(v103)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))v104)(v103, v105 + v105); v106 = a1->m_shipClickParticles; v107 = v106->setSpeedVar; v108 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v106->getSpeedVar)(v106)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))v107)(v106, v108 + v108); v109 = a1->m_shipClickParticles; setAngleVar = v109->setAngleVar; v111 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v109->getAngleVar)(v109)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))setAngleVar)(v109, v111 + v111); v112 = a1->m_shipClickParticles; setStartSize = v112->setStartSize; v114 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v112->getStartSize)(v112)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))setStartSize)(v112, v114 * 1.5); v115 = a1->m_shipClickParticles; setStartSizeVar = v115->setStartSizeVar; v117 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))v115->getStartSizeVar)(v115)); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _DWORD))setStartSizeVar)(v115, v117 * 1.5); v118 = a1->m_trailingParticles; a1->m_hasShipParticles = 0; setStartColor = v118->setStartColor; memset(v173, 0, sizeof(v173)); v173[1].y = 1.0; v173[0].x = 1.0; v173[0].y = 0.39216; setStartColor(v118, (const cocos2d::ccColor4F *)v173); v120 = a1->m_trailingParticles; setEndColor = v120->setEndColor; memset(v173, 0, sizeof(v173)); v173[1].y = 1.0; v173[0].x = 1.0; setEndColor(v120, (const cocos2d::ccColor4F *)v173); v122 = a1->m_shipClickParticles; v123 = v122->setStartColor; memset(v173, 0, sizeof(v173)); v173[1].y = 1.0; v173[0].x = 1.0; v173[0].y = 0.7451; v123(v122, (const cocos2d::ccColor4F *)v173); v124 = a1->m_shipClickParticles; v125 = v124->setEndColor; memset(v173, 0, sizeof(v173)); v173[1].y = 1.0; v173[0].x = 1.0; v125(v124, (const cocos2d::ccColor4F *)v173); for ( j = 0; ; j = 1 ) { v128 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"swingBurstEffect.plist", nullptr, v126); v128->setPositionType(v128, kCCPositionTypeGrouped); cocos2d::CCArray::addObject(a1->m_particleSystems, v128); cocos2d::CCParticleSystem::stopSystem(v128); v162 = v128->setStartColor; memset(v173, 0, sizeof(v173)); v173[0].y = 0.39216; v173[1].y = 1.0; v173[0].x = 1.0; v162(v128, (const cocos2d::ccColor4F *)v173); v163 = v128->setEndColor; memset(v173, 0, sizeof(v173)); v173[1].y = 1.0; v173[0].x = 1.0; v163(v128, (const cocos2d::ccColor4F *)v173); if ( j ) break; a1->m_swingBurstParticles1 = v128; } a1->m_swingBurstParticles2 = v128; v129 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"shipDragEffect.plist", nullptr, v126); v130 = v129->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_vehicleGroundParticles = v129; v130->setPositionType(v129, kCCPositionTypeGrouped); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_vehicleGroundParticles); cocos2d::CCParticleSystem::stopSystem(a1->m_vehicleGroundParticles); v132 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"landEffect.plist", nullptr, v131); v133 = v132->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_landParticles0 = v132; v133->setPositionType(v132, kCCPositionTypeGrouped); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_landParticles0); cocos2d::CCParticleSystem::stopSystem(a1->m_landParticles0); LODWORD(a1->m_landParticlesAngle) = ((int (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_landParticles0->getAngle)(a1->m_landParticles0); y = a1->m_landParticles0->getGravity(a1->m_landParticles0)->y; a1->m_landParticleRelatedY = y; v135 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"landEffect.plist", nullptr, SLOBYTE(y)); v136 = v135->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_landParticles1 = v135; v136->setPositionType(v135, kCCPositionTypeGrouped); cocos2d::CCArray::addObject(a1->m_particleSystems, a1->m_landParticles1); cocos2d::CCParticleSystem::stopSystem(a1->m_landParticles1); PlayerObject::setupStreak(a1); v170 = 770; v171 = 1; v137 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"player_%02d_glow_001.png", v9); v138 = (char *)cocos2d::CCString::getCString(v137); sub_776584((int)&v169, v138); v139 = cocos2d::CCSprite::create(); v140 = v139->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_dashSpritesContainer = v139; v140->setTextureRect(v139, &stru_AC5C70); m_mainLayer = a1->m_mainLayer; a1->m_dashSpritesContainer->m_bDontDraw = 1; ((void (__fastcall *)(cocos2d::CCNode *))m_mainLayer->addChild_0)(m_mainLayer); v142 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_001.png"); v143 = v142->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_dashFireSprite = v142; ((void (__fastcall *)(cocos2d::CCSprite *, int, int))v143->setBlendFunc)(v142, v170, v171); a1->m_dashSpritesContainer->addChild(a1->m_dashSpritesContainer, a1->m_dashFireSprite); m_dashFireSprite = a1->m_dashFireSprite; v145 = m_dashFireSprite->setPosition; cocos2d::CCPoint::CCPoint(&v172, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(v173, a1, &v172); v145(m_dashFireSprite, v173); a1->m_dashFireSprite->setVisible(a1->m_dashFireSprite, 0); v146 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_outline_001.png"); a1->m_dashFireSprite->addChild_0(a1->m_dashFireSprite, v146, 1); v147 = v146->setPosition; cocos2d::CCNode::convertToNodeSpace(v173, a1->m_dashFireSprite, &stru_AC5C68); v147(v146, v173); v146->setOpacity(v146, 150); v148 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v169); v149 = v148->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_iconGlow = v148; v149->setVisible(v148, 0); a1->m_dashSpritesContainer->addChild_0(a1->m_dashSpritesContainer, a1->m_iconGlow, 2); v150 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"ship_%02d_glow_001.png", v7); v151 = (char *)cocos2d::CCString::getCString(v150); sub_776584((int)&v172, v151); v152 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)LODWORD(v172.x)); a1->m_vehicleGlow = v152; a1->m_dashSpritesContainer->addChild_0(a1->m_dashSpritesContainer, v152, -3); a1->m_vehicleGlow->setVisible(a1->m_vehicleGlow, 0); a1->m_width = 30.0; a1->m_height = 30.0; a1->m_unkAngle1 = 30.0; v153 = GameManager::sharedState(); a1->m_defaultMiniIcon = GameManager::getGameVariable(v153, "0060"); v154 = GameManager::sharedState(); a1->m_swapColors = GameManager::getGameVariable(v154, "0061"); v155 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v155, "0062"); m_finish = (int *)a1->m_playerFollowFloats.m_finish; v173[0].x = 0.0; m_start = a1->m_playerFollowFloats.m_start; a1->m_switchDashFireColor = GameVariable; v159 = ((char *)m_finish - (char *)m_start) >> 2; if ( v159 > 0xC7 ) { if ( v159 != 200 ) a1->m_playerFollowFloats.m_finish = m_start + 200; } else { std::vector::_M_fill_insert((int)&a1->m_playerFollowFloats, m_finish, 200 - v159, (int *)v173); } PlayerObject::updateCheckpointMode(a1, 0); sub_774008(&v172); sub_774008(&v169); sub_774008(&v168); sub_774008(&v167); } sub_774008(&v165); sub_774008(&v164); return v161; }
GD Web Decomp Icon

GD Web Decomp

Raw Source