// // GJGarageLayer::onSelect from 0x100305920 to 0x100305dcc (1196 bytes) // // 1 xrefs: // > GJGarageLayer::getItems @ 0x100305788 // // 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 __fastcall GJGarageLayer::onSelect(GJGarageLayer *a1, cocos2d::CCObject *a2) { __int64 v4; // x20 IconType m_uOrderOfArrival; // w21 GameManager *v6; // x0 bool isIconUnlocked; // w23 GameManager *v8; // x0 GameManager *v9; // x23 float v10; // s0 __int64 v11; // x0 GameManager *v12; // x23 float v13; // s0 GameManager *v14; // x23 float v15; // s0 GameManager *v16; // x23 float v17; // s0 GameManager *v18; // x23 float v19; // s0 GameManager *v20; // x23 float v21; // s0 GameManager *v22; // x23 float v23; // s0 GameManager *v24; // x23 float v25; // s0 GameManager *v26; // x23 float v27; // s0 GameManager *v28; // x23 float v29; // s0 float v30; // s0 GameManager *v31; // x23 float v32; // s0 __int64 v33; // x8 __int64 v34; // x23 cocos2d::CCNode *v35; // x24 const cocos2d::CCPoint *v36; // x0 SimplePlayer *m_playerObject; // x22 GameManager *v38; // x0 __n128 v39; // q0 GameManager *v40; // x0 __int64 v41; // x0 _BYTE v42[8]; // [xsp+8h] [xbp-38h] BYREF cocos2d::CCPoint v43; // 0:kr00_8.8 v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2); m_uOrderOfArrival = a2[8].m_uOrderOfArrival; v6 = GameManager::sharedState(); isIconUnlocked = GameManager::isIconUnlocked(v6, v4, m_uOrderOfArrival); v8 = GameManager::sharedState(); if ( isIconUnlocked ) { v8->m_scoreValid = 0; if ( m_uOrderOfArrival > Robot ) { if ( m_uOrderOfArrival > 97 ) { switch ( m_uOrderOfArrival ) { case DeathEffect: v24 = GameManager::sharedState(); v24->m_playerDeathEffect.value = v4; v25 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v24->m_playerDeathEffect.seed = (int)v25; v24->m_playerDeathEffect.random = v4 + (int)v25; break; case Special: v31 = GameManager::sharedState(); v31->m_playerStreak.value = v4; v32 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v31->m_playerStreak.seed = (int)v32; v31->m_playerStreak.random = v4 + (int)v32; break; case ShipFire: v16 = GameManager::sharedState(); v16->m_playerShipFire.value = v4; v17 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v16->m_playerShipFire.seed = (int)v17; v16->m_playerShipFire.random = v4 + (int)v17; break; } } else { switch ( m_uOrderOfArrival ) { case Spider: v20 = GameManager::sharedState(); v20->m_playerSpider.value = v4; v21 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v20->m_playerSpider.seed = (int)v21; v20->m_playerSpider.random = v4 + (int)v21; break; case Swing: v28 = GameManager::sharedState(); v28->m_playerSwing.value = v4; v29 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v28->m_playerSwing.seed = (int)v29; v28->m_playerSwing.random = v4 + (int)v29; break; case Jetpack: v12 = GameManager::sharedState(); v12->m_playerJetpack.value = v4; v13 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v12->m_playerJetpack.seed = (int)v13; v12->m_playerJetpack.random = v4 + (int)v13; break; } } } else if ( m_uOrderOfArrival > Ball ) { if ( m_uOrderOfArrival == Ufo ) { v22 = GameManager::sharedState(); v22->m_playerBird.value = v4; v23 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v22->m_playerBird.seed = (int)v23; v22->m_playerBird.random = v4 + (int)v23; } else { v14 = GameManager::sharedState(); if ( m_uOrderOfArrival == Wave ) { v14->m_playerDart.value = v4; v30 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v14->m_playerDart.seed = (int)v30; v14->m_playerDart.random = v4 + (int)v30; } else { v14->m_playerRobot.value = v4; v15 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v14->m_playerRobot.seed = (int)v15; v14->m_playerRobot.random = v4 + (int)v15; } } } else if ( m_uOrderOfArrival ) { if ( m_uOrderOfArrival == Ship ) { v26 = GameManager::sharedState(); v26->m_playerShip.value = v4; v27 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v26->m_playerShip.seed = (int)v27; v26->m_playerShip.random = v4 + (int)v27; } else if ( m_uOrderOfArrival == Ball ) { v9 = GameManager::sharedState(); v9->m_playerBall.value = v4; v10 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v9->m_playerBall.seed = (int)v10; v9->m_playerBall.random = v4 + (int)v10; } } else { v18 = GameManager::sharedState(); v18->m_playerFrame.value = v4; v19 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0; v18->m_playerFrame.seed = (int)v19; v18->m_playerFrame.random = v4 + (int)v19; } SimplePlayer::updateColors(a1->m_playerObject); if ( m_uOrderOfArrival == Special && (_DWORD)v4 == 2 ) GJGarageLayer::playRainbowEffect(a1); v33 = 544; if ( m_uOrderOfArrival == ShipFire ) v33 = 552; v34 = *(__int64 *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v33); v35 = (cocos2d::CCNode *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[6].~CCObject_0)(a2); v36 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[2].acceptVisitor)(a2); v43 = cocos2d::CCNode::convertToWorldSpace(v35, v36); (*(void (__fastcall **)(__int64, _BYTE *, float, float))(*(_QWORD *)v34 + 184LL))(v34, v42, v43.x, v43.y); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v34 + 328LL))(v34, 1); if ( (unsigned int)m_uOrderOfArrival <= Jetpack ) { SimplePlayer::updatePlayerFrame(a1->m_playerObject, v4, a1->m_iconType); GameManager::sharedState()->m_playerIconType = a1->m_iconType; m_playerObject = a1->m_playerObject; v38 = GameManager::sharedState(); v39.n128_u32[0] = 1070386381; if ( v38->m_playerIconType == Jetpack ) v39.n128_f32[0] = 1.5; ((void (__fastcall *)(SimplePlayer *, __n128))m_playerObject->setScale)(m_playerObject, v39); } if ( a1->m_iconID == (_DWORD)v4 && a1->m_selectedIconType == m_uOrderOfArrival ) { v40 = GameManager::sharedState(); v41 = GameManager::iconTypeToUnlockType(v40, m_uOrderOfArrival); ((void (__fastcall *)(GJGarageLayer *, __int64, __int64))a1->showUnlockPopup)(a1, v4, v41); } a1->m_iconID = v4; a1->m_selectedIconType = m_uOrderOfArrival; } else { v11 = GameManager::iconTypeToUnlockType(v8, m_uOrderOfArrival); ((void (__fastcall *)(GJGarageLayer *, __int64, __int64))a1->showUnlockPopup)(a1, v4, v11); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source