// // GJGarageLayer::setupSpecialPage from 0x405d74 to 0x406148 (980 bytes) // // 1 xrefs: // > GJGarageLayer::setupPage @ 0x406186 // // 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 GJGarageLayer::setupSpecialPage(GJGarageLayer *a1) { cocos2d::CCDirector *v2; // r0 ListButtonBar *m_iconSelection; // r0 cocos2d::CCArray *Items; // r6 cocos2d::CCPoint v5; // r1 ListButtonBar *v6; // r0 cocos2d::CCSprite *m_cursor1; // r9 CCMenuItemSpriteExtra *m_currentIcon; // r1 cocos2d::CCSprite_vtbl *v9; // r3 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCNode *v11; // r11 const cocos2d::CCPoint *v12; // r0 cocos2d::CCArray *v13; // r8 cocos2d::CCPoint v14; // r1 ListButtonBar *v15; // r7 cocos2d::CCSprite *m_cursor2; // r7 CCMenuItemSpriteExtra *v17; // r1 cocos2d::CCSprite_vtbl *v18; // r3 void (__fastcall *v19)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCNode *v20; // r9 const cocos2d::CCPoint *v21; // r0 cocos2d::CCMenuItem *v22; // r1 int v23; // r7 int v24; // r10 cocos2d::CCNode *v25; // r9 cocos2d::CCSprite *v26; // r11 GameManager *v27; // r0 GameStatsManager *v28; // r0 GJItemIcon *BrowserItem; // r6 GameStatsManager *v30; // r0 bool isItemEnabled; // r0 float v32; // s17 CCMenuItemSpriteExtra *v33; // r5 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r8 int v35; // r0 float width; // s16 int v37; // r0 int v38; // r1 int v39; // [sp+14h] [bp-58h] int v40; // [sp+14h] [bp-58h] _BOOL4 isIconUnlocked; // [sp+1Ch] [bp-50h] int ItemUnlockState; // [sp+20h] [bp-4Ch] void (__fastcall *v43)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-44h] void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+2Ch] [bp-40h] cocos2d::CCSize v45; // [sp+34h] [bp-38h] BYREF cocos2d::CCPoint v46; // [sp+3Ch] [bp-30h] BYREF cocos2d::CCPoint v47; // [sp+44h] [bp-28h] BYREF cocos2d::CCPoint v48; // [sp+4Ch] [bp-20h] BYREF cocos2d::CCPoint v49; // [sp+54h] [bp-18h] BYREF cocos2d::CCPoint v50; // [sp+5Ch] [bp-10h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v45, v2); m_iconSelection = a1->m_iconSelection; if ( m_iconSelection ) { m_iconSelection->removeMeAndCleanup(m_iconSelection); a1->m_iconSelection = nullptr; } Items = GJGarageLayer::getItems(a1, Special); cocos2d::CCPoint::CCPoint(&v50, v45.width * 0.5, (float)((float)(v45.height * 0.5) - 5.0) - 60.0); LODWORD(v5.y) = 12; LODWORD(v5.x) = &v50; v6 = ListButtonBar::create(Items, v5, 3, COERCE_INT(5.0), 5.0, 25.0, 220.0, COERCE_FLOAT(1), v39); a1->m_iconSelection = v6; BoomScrollLayer::togglePageIndicators(v6->m_scrollLayer, 0); a1->addChild_0(a1, a1->m_iconSelection, 100); m_cursor1 = a1->m_cursor1; m_currentIcon = a1->m_currentIcon; v9 = m_cursor1->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( m_currentIcon ) { setPosition = v9->setPosition; v11 = m_currentIcon->getParent(a1->m_currentIcon); v12 = a1->m_currentIcon->getPosition(a1->m_currentIcon); cocos2d::CCNode::convertToWorldSpace(&v50, v11, v12); setPosition(m_cursor1, &v50); a1->m_cursor1->setVisible(a1->m_cursor1, 1); } else { v9->setVisible(a1->m_cursor1, 0); } v13 = GJGarageLayer::getItems(a1, ShipFire); cocos2d::CCPoint::CCPoint(&v50, v45.width * 0.5, (float)((float)((float)(v45.height * 0.5) - 5.0) - 60.0) - 30.0); LODWORD(v14.y) = 12; LODWORD(v14.x) = &v50; v15 = ListButtonBar::create(v13, v14, 3, COERCE_INT(5.0), 5.0, 25.0, 220.0, COERCE_FLOAT(1), v40); BoomScrollLayer::togglePageIndicators(v15->m_scrollLayer, 0); a1->m_iconSelection->addChild_0(a1->m_iconSelection, v15, 100); m_cursor2 = a1->m_cursor2; v17 = a1->m_currentIcon; v18 = m_cursor2->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v17 ) { v19 = v18->setPosition; v20 = v17->getParent(a1->m_currentIcon); v21 = a1->m_currentIcon->getPosition(a1->m_currentIcon); cocos2d::CCNode::convertToWorldSpace(&v50, v20, v21); v19(m_cursor2, &v50); a1->m_cursor2->setVisible(a1->m_cursor2, 1); } else { v18->setVisible(a1->m_cursor2, 0); } v23 = 18; v24 = 0; v25 = (cocos2d::CCNode *)cocos2d::CCMenu::create(nullptr, v22); a1->m_iconSelection->addChild_0(a1->m_iconSelection, v25, 1000); cocos2d::CCPoint::CCPoint( &v46, (float)((float)(v45.width * 0.5) - 137.5) - 27.5, (float)((float)((float)(v45.height * 0.5) - 5.0) - 60.0) - 30.0); cocos2d::CCNode::convertToWorldSpace(&v50, a1->m_iconSelection, &v46); cocos2d::CCNode::convertToNodeSpace(&v47, v25, &v50); v26 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); do { v27 = GameManager::sharedState(); isIconUnlocked = GameManager::isIconUnlocked(v27, v23, Item); v28 = GameStatsManager::sharedState(); ItemUnlockState = GameStatsManager::getItemUnlockState(v28, v23, GJItem); BrowserItem = GJItemIcon::createBrowserItem(GJItem, v23); if ( isIconUnlocked ) { v30 = GameStatsManager::sharedState(); isItemEnabled = GameStatsManager::isItemEnabled(v30, GJItem, v23); GJItemIcon::toggleEnabledState(BrowserItem, isItemEnabled); } if ( BrowserItem ) { v32 = GJItemIcon::scaleForType(GJItem); BrowserItem->setScale(BrowserItem, COERCE_FLOAT(LODWORD(v32))); v50.y = 0.0; LODWORD(v50.x) = GJGarageLayer::onToggleItem; v33 = CCMenuItemSpriteExtra::create( BrowserItem, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(GJGarageLayer::onToggleItem, (unsigned int)a1)); setContentSize = v33->setContentSize; v35 = (int)v26->getContentSize(v26); setContentSize(v33, (const cocos2d::CCSize *)v35); v43 = BrowserItem->setPosition; width = v33->getContentSize(v33)->width; v37 = (int)v33->getContentSize(v33); cocos2d::CCPoint::CCPoint(&v49, width * 0.5, *(float *)(v37 + 4) * 0.5); v43(BrowserItem, &v49); v33->setTag(v33, v23); v33->m_iconType = Item; v25->addChild(v25, v33); v38 = 30 * v24++; v44 = v33->setPosition; cocos2d::CCPoint::CCPoint(&v48, (float)v38, 0.0); cocos2d::CCPoint::operator+(&v49, &v47, &v48); v44(v33, &v49); if ( !isIconUnlocked ) { if ( ItemUnlockState ) GJItemIcon::changeToLockedState(BrowserItem, 1.0 / v32); else GJItemIcon::darkenStoreItem(BrowserItem, (ShopType)&byte_5); } } ++v23; } while ( v23 != 21 ); }
GD Web Decomp Icon

GD Web Decomp

Raw Source