// // GJGarageLayer::setupSpecialPage from 0x100305158 to 0x100305660 (1288 bytes) // // 1 xrefs: // > GJGarageLayer::setupPage @ 0x100304c04 // // 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::setupSpecialPage(GJGarageLayer *a1) { cocos2d::CCDirector *v2; // x0 ListButtonBar *m_iconSelection; // x0 cocos2d::CCArray *Items_1; // x20 __n128 v5; // q0 __n128 v6; // q1 float v7; // s4 float v8; // s5 ListButtonBar *v9; // x0 CCMenuItemSpriteExtra *m_currentIcon; // x0 cocos2d::CCSprite *m_cursor1; // x20 cocos2d::CCNode *v12; // x21 const cocos2d::CCPoint *v13; // x0 cocos2d::CCArray *v14; // x20 __n128 v15; // q0 __n128 v16; // q1 float v17; // s4 float v18; // s5 ListButtonBar *v19; // x20 CCMenuItemSpriteExtra *v20; // x0 cocos2d::CCSprite *m_cursor2; // x20 cocos2d::CCNode *v22; // x21 const cocos2d::CCPoint *v23; // x0 __int64 v24; // x1 __int64 v25; // x2 __int64 v26; // x3 __int64 v27; // x4 __int64 v28; // x5 __int64 v29; // x6 __int64 v30; // x7 cocos2d::CCMenu *v31; // x20 __n128 v32; // q0 __n128 v33; // q1 cocos2d::CCSprite *v34; // x21 int v35; // w28 __int64 v36; // x22 GameManager *v37; // x0 _BOOL4 isIconUnlocked; // w24 GameStatsManager *v39; // x0 int ItemUnlockState; // w25 GJItemIcon *v41; // x26 GameStatsManager *v42; // x0 bool isItemEnabled; // w0 CCMenuItemSpriteExtra *v44; // x27 __int64 v45; // x0 float v46; // s9 __n128 v47; // q1 __n128 v48; // q0 __n128 v49; // q0 __n128 v50; // q1 double v51; // d0 char v52; // [xsp+0h] [xbp-A0h] float32x2_t v53; // [xsp+8h] [xbp-98h] BYREF float32x2_t v54; // [xsp+10h] [xbp-90h] BYREF float32x2_t v55; // [xsp+18h] [xbp-88h] BYREF cocos2d::CCPoint v56; // [xsp+20h] [xbp-80h] BYREF float v57; // [xsp+28h] [xbp-78h] float v58; // [xsp+2Ch] [xbp-74h] cocos2d::CCSize WinSize; // 0:kr00_8.8 cocos2d::CCPoint v60; // 0:kr08_8.8 cocos2d::CCPoint v61; // 0:kr10_8.8 cocos2d::SEL_MenuHandler v62; // 0:x3.16 cocos2d::CCPoint v63; // 0:s0.4,4:s1.4 cocos2d::CCPoint v64; // 0:s0.4,4:s1.4 v2 = cocos2d::CCDirector::sharedDirector(); WinSize = cocos2d::CCDirector::getWinSize(v2); m_iconSelection = a1->m_iconSelection; if ( m_iconSelection ) { ((void (__fastcall *)(ListButtonBar *, float, float))m_iconSelection->removeMeAndCleanup)( m_iconSelection, WinSize.width, WinSize.height); a1->m_iconSelection = nullptr; } Items_1 = GJGarageLayer::getItems_1(a1, Special); v5.n128_f32[0] = v57 * 0.5; v6.n128_f32[0] = (float)((float)(v58 * 0.5) + -5.0) + -60.0; sub_100022980(v5, v6, &v56); v63.x = 5.0; v63.y = 5.0; v9 = ListButtonBar::create(Items_1, v63, (int)&v56, 12, 25.0, 220.0, v7, v8, 3); a1->m_iconSelection = v9; BoomScrollLayer::togglePageIndicators(v9->m_scrollLayer, 0); ((void (__fastcall *)(GJGarageLayer *, ListButtonBar *, __int64))a1->addChild_0)(a1, a1->m_iconSelection, 100); m_currentIcon = a1->m_currentIcon; m_cursor1 = a1->m_cursor1; if ( m_currentIcon ) { v12 = (cocos2d::CCNode *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))m_currentIcon->getParent)(m_currentIcon); v13 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_currentIcon->getPosition)(a1->m_currentIcon); v60 = cocos2d::CCNode::convertToWorldSpace(v12, v13); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, float, float))m_cursor1->setPosition)( m_cursor1, &v56, v60.x, v60.y); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_cursor1->setVisible)(a1->m_cursor1, 1); } else { ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))m_cursor1->setVisible)(a1->m_cursor1, 0); } v14 = GJGarageLayer::getItems_1(a1, ShipFire); v15.n128_f32[0] = v57 * 0.5; v16.n128_f32[0] = (float)((float)((float)(v58 * 0.5) + -5.0) + -60.0) + -30.0; sub_100022980(v15, v16, &v56); v64.x = 5.0; v64.y = 5.0; v19 = ListButtonBar::create(v14, v64, (int)&v56, 12, 25.0, 220.0, v17, v18, 3); BoomScrollLayer::togglePageIndicators(v19->m_scrollLayer, 0); ((void (__fastcall *)(ListButtonBar *, ListButtonBar *, __int64))a1->m_iconSelection->addChild_0)( a1->m_iconSelection, v19, 100); v20 = a1->m_currentIcon; m_cursor2 = a1->m_cursor2; if ( v20 ) { v22 = (cocos2d::CCNode *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v20->getParent)(v20); v23 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_currentIcon->getPosition)(a1->m_currentIcon); v61 = cocos2d::CCNode::convertToWorldSpace(v22, v23); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, float, float))m_cursor2->setPosition)( m_cursor2, &v56, v61.x, v61.y); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_cursor2->setVisible)(a1->m_cursor2, 1); } else { ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))m_cursor2->setVisible)(a1->m_cursor2, 0); } v31 = sub_1001D7ED0(nullptr, v24, v25, v26, v27, v28, v29, v30, v52); v32 = ((__n128 (__fastcall *)(ListButtonBar *, cocos2d::CCMenu *, __int64))a1->m_iconSelection->addChild_0)( a1->m_iconSelection, v31, 1000); v32.n128_f32[0] = (float)((float)(v57 * 0.5) + -137.5) + -27.5; v33.n128_f32[0] = (float)((float)((float)(v58 * 0.5) + -5.0) + -60.0) + -30.0; sub_100022980(v32, v33, &v56); cocos2d::CCNode::convertToWorldSpace(a1->m_iconSelection, &v56); cocos2d::CCNode::convertToNodeSpace(v31, (const cocos2d::CCPoint *)&v54); v34 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v35 = 0; v36 = 18; do { v37 = GameManager::sharedState(); isIconUnlocked = GameManager::isIconUnlocked(v37, v36, Item); v39 = GameStatsManager::sharedState(); ItemUnlockState = GameStatsManager::getItemUnlockState(v39, v36, GJItem); v41 = GJItemIcon::create( GJItem, v36, (cocos2d::ccColor3B)-5263441, (cocos2d::ccColor3B)-1, 0, 1, 1, (cocos2d::ccColor3B)-1); if ( isIconUnlocked ) { v42 = GameStatsManager::sharedState(); isItemEnabled = GameStatsManager::isItemEnabled(v42, GJItem, v36); GJItemIcon::toggleEnabledState(v41, isItemEnabled); } if ( v41 ) { ((void (__fastcall *)(GJItemIcon *, float))v41->setScale)(v41, 0.8); v62.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onToggleItem; v62.adj = 0; v44 = CCMenuItemSpriteExtra::create(v41, nullptr, a1, v62); v45 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v34->getContentSize)(v34); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v44->setContentSize)(v44, v45); v46 = *(float *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v44->getContentSize)(v44) * 0.5; v47.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v44->getContentSize)(v44) + 4) * 0.5; v48.n128_f32[0] = v46; sub_100022980(v48, v47, &v54); ((void (__fastcall *)(GJItemIcon *, float32x2_t *))v41->setPosition)(v41, &v54); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v44->setTag)(v44, v36); v44->m_iconType = Item; v49 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v31->addChild)(v31, v44); v49.n128_f32[0] = (float)(30 * v35); v50.n128_u32[0] = 0; sub_100022980(v49, v50, &v53); *(float32x2_t *)&v51 = sub_1000229DC(&v55, &v53, &v54); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, double))v44->setPosition)(v44, &v54, v51); ++v35; if ( !isIconUnlocked ) { if ( ItemUnlockState ) GJItemIcon::changeToLockedState(v41, 1.25); else GJItemIcon::darkenStoreItem(v41, (cocos2d::ccColor3B)3289650); } } v36 = (unsigned int)(v36 + 1); } while ( (_DWORD)v36 != 21 ); }
GD Web Decomp Icon

GD Web Decomp

Raw Source