// // GJShopLayer::init from 0x4e303c to 0x4e3ddc (3488 bytes) // // 1 xrefs: // > GJShopLayer::create @ 0x4e3e78 // // 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 GJShopLayer::init(GJShopLayer *a1, ShopType a2) { cocos2d::CCDirector *v3; // r0 cocos2d::CCTouchDispatcher *v4; // r0 char *v5; // r1 cocos2d::CCTextureCache *v6; // r9 cocos2d::CCSpriteFrameCache *v7; // r9 cocos2d::CCDirector *v8; // r0 CCSpriteWithHue *v9; // r7 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2 void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v13; // r8 void (__fastcall *v14)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 AnimatedShopKeeper *v15; // r0 GJShopLayer_vtbl *v16; // r3 AnimatedShopKeeper *m_shopKeeper; // r8 void (__fastcall *v18)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 AnimatedShopKeeper *v19; // r8 cocos2d::CCSequence *v20; // r9 AnimatedShopKeeper *v21; // r0 cocos2d::CCFiniteTimeAction *v22; // r0 cocos2d::CCAction *v23; // r0 CCSpriteWithHue *v24; // r8 void (__fastcall *v25)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2 void (__fastcall *v27)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2 void (__fastcall *v28)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2 cocos2d::CCSprite *v29; // r10 CCMenuItemSpriteExtra *v30; // r0 cocos2d::CCMenu *v31; // r7 void (__fastcall *v32)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v33; // r8 cocos2d::CCMenu *v34; // r7 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v36; // r0 CCMenuItemSpriteExtra *v37; // r8 cocos2d::CCSprite *v38; // r0 CCMenuItemSpriteExtra *v39; // r8 cocos2d::CCNode *v40; // r7 void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCDirector *v42; // r0 float v43; // s16 cocos2d::CCDirector *v44; // r0 float v45; // r0 FMODAudioEngine *v46; // r7 GameStatsManager *v47; // r0 const char *v48; // r1 int Stat; // r0 CCCounterLabel *v50; // r0 GJShopLayer_vtbl *v51; // r3 CCCounterLabel *m_currencyLabel; // r7 void (__fastcall *v53)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 CCCounterLabel *v54; // r7 void (__fastcall *v55)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8 char *v56; // r1 cocos2d::CCSprite *v57; // r7 void (__fastcall *v58)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 const cocos2d::CCPoint *v59; // r10 bool v60; // r2 cocos2d::CCParticleSystem *v61; // r8 void (__fastcall *setStartColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r9 void (__fastcall *setEndColor)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r9 void (__fastcall *setStartColorVar)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r2 void (__fastcall *setEndColorVar)(cocos2d::CCParticleSystem *__hidden, const cocos2d::ccColor4F *); // r3 void (__fastcall *setPosVar)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // r9 void (__fastcall *v67)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 int v68; // r0 cocos2d::CCArray *v69; // r0 cocos2d::CCArray *v70; // r0 cocos2d::CCArray *m_uReference; // r7 GameManager *v72; // r0 _BOOL4 UGV; // r8 unsigned int i; // r5 cocos2d::CCObject *v75; // r0 ShopType m_type; // r3 cocos2d::CCDictionary *v77; // r0 cocos2d::CCSprite *v78; // r0 _DWORD *v79; // r5 int v80; // r7 UnlockType v81; // r8 GameStatsManager *v82; // r0 _BOOL4 isStoreItemUnlocked; // r11 _BOOL4 v84; // r9 GJItemIcon *StoreItem; // r10 CCMenuItemSpriteExtra *v86; // r7 cocos2d::CCLabelBMFont *v87; // r9 void (__fastcall *v88)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 float *v89; // r0 char *v90; // r1 cocos2d::CCSprite *v91; // r8 int v92; // r11 float v93; // s16 float v94; // s14 float v95; // s15 cocos2d::CCPoint v96; // r1 ListButtonBar *v97; // r5 _DWORD *v98; // r0 BoomScrollLayer *m_scrollLayer; // r4 int v101; // [sp+14h] [bp-B0h] unsigned int v103; // [sp+20h] [bp-A4h] cocos2d::CCArray *v104; // [sp+24h] [bp-A0h] _BOOL4 v105; // [sp+28h] [bp-9Ch] cocos2d::CCArray *v106; // [sp+2Ch] [bp-98h] cocos2d::CCArray *v107; // [sp+30h] [bp-94h] void (__fastcall *v108)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+34h] [bp-90h] cocos2d::CCSprite *v109; // [sp+50h] [bp-74h] BYREF cocos2d::CCSprite *v110; // [sp+54h] [bp-70h] BYREF cocos2d::CCSprite *v111; // [sp+58h] [bp-6Ch] BYREF _BYTE v112[4]; // [sp+5Ch] [bp-68h] BYREF cocos2d::CCSprite *v113; // [sp+60h] [bp-64h] BYREF char *v114; // [sp+64h] [bp-60h] BYREF cocos2d::CCLabelBMFont *v115; // [sp+68h] [bp-5Ch] BYREF cocos2d::CCSize v116; // [sp+6Ch] [bp-58h] BYREF cocos2d::CCPoint v117; // [sp+74h] [bp-50h] BYREF cocos2d::CCPoint v118; // [sp+7Ch] [bp-48h] BYREF void (*v119)(AnimatedShopKeeper *); // [sp+84h] [bp-40h] int v120; // [sp+88h] [bp-3Ch] void (*v121)(GJShopLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-38h] int v122; // [sp+90h] [bp-34h] void (*v123)(GJShopLayer *, cocos2d::CCObject *); // [sp+94h] [bp-30h] int v124; // [sp+98h] [bp-2Ch] void (*v125)(GJShopLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-28h] int v126; // [sp+A0h] [bp-24h] cocos2d::CCPoint v127; // [sp+A4h] [bp-20h] BYREF cocos2d::CCRect v128; // [sp+ACh] [bp-18h] BYREF cocos2d::ccColor3B v129; // 0:^4C.3 v105 = cocos2d::CCLayer::init(a1); if ( v105 ) { v3 = cocos2d::CCDirector::sharedDirector(); v4 = v3->getTouchDispatcher(v3); cocos2d::CCTouchDispatcher::registerForcePrio(v4, a1, 2); a1->m_type = a2; sub_776584((int)&v109, "shopBG_001.png"); sub_776584((int)&v110, "storeDesk_001.png"); sub_776584((int)&v111, "shopSign_001.png"); sub_7753D4((int)&a1->m_sheetName, "GJ_ShopSheet01"); sub_776584((int)v112, "shop.mp3"); switch ( a1->m_type ) { case Secret: sub_7753D4((int)&v111, "shopSign2_001.png"); v5 = "secretShop.mp3"; goto LABEL_7; case Community: sub_7753D4((int)&v111, "shopSign3_001.png"); v5 = "shop3.ogg"; goto LABEL_7; case Mechanic: sub_7753D4((int)&a1->m_sheetName, "GJ_ShopSheet02"); sub_7753D4((int)&v109, "shopBG_02_001.png"); sub_7753D4((int)&v110, "storeDesk_02_001.png"); sub_7753D4((int)&v111, "shopSign4_001.png"); v5 = "shop4.mp3"; goto LABEL_7; case Diamond: sub_7753D4((int)&a1->m_sheetName, "GJ_ShopSheet03"); sub_7753D4((int)&v109, "shopBG_03_001.png"); sub_7753D4((int)&v110, "storeDesk_03_001.png"); sub_7753D4((int)&v111, "shopSign5_001.png"); v5 = "shop5.ogg"; LABEL_7: sub_7753D4((int)v112, v5); break; default: break; } v6 = cocos2d::CCTextureCache::sharedTextureCache(); std::operator+((int)&v114, (int)&a1->m_sheetName, ".png"); cocos2d::CCTextureCache::addImage(v6, v114, 0); sub_774008(&v114); v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); std::operator+((int)&v115, (int)&a1->m_sheetName, ".plist"); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v7, (const char *)v115); sub_774008(&v115); a1->setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); a1->setTouchEnabled(a1, 1); a1->setMouseEnabled(a1, 1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v116, v8); if ( a1->m_type == Community ) { sub_776584((int)&v117, (char *)v109); v9 = CCSpriteWithHue::createWithSpriteFrameName((const char **)&v117); sub_774008(&v117); CCSpriteWithHue::setHueDegrees(v9, -110.0); setColor = v9->setColor; LOWORD(v128.origin.x) = 240; BYTE2(v128.origin.x) = -16; setColor(v9, (const cocos2d::ccColor3B *)&v128); } else { v9 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)v109); } setAnchorPoint = v9->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v128.origin, 0.0, 0.0); setAnchorPoint(v9, &v128.origin); a1->addChild_0(a1, v9, -2); ((void (__fastcall *)(CCSpriteWithHue *, _DWORD))v9->setScaleX)( v9, (float)(v116.width + 5.0) / v9->m_obRect.size.width); ((void (__fastcall *)(CCSpriteWithHue *, _DWORD))v9->setScaleY)( v9, (float)(v116.height + 5.0) / v9->m_obRect.size.height); setPosition = v9->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, -2.5, -2.5); setPosition(v9, &v128.origin); v13 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v111); v14 = v13->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, (float)(v116.width * 0.5) - 70.0, v116.height - 38.0); v14(v13, &v128.origin); a1->addChild(a1, v13); v15 = AnimatedShopKeeper::create(a2); v16 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_shopKeeper = v15; v16->addChild_0(a1, v15, 3); m_shopKeeper = a1->m_shopKeeper; v18 = m_shopKeeper->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, (float)((float)(v116.width * 0.5) + 100.0) + 0.0, 230.0); v18(m_shopKeeper, &v128.origin); v19 = a1->m_shopKeeper; v20 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(0.1); v21 = a1->m_shopKeeper; v119 = AnimatedShopKeeper::startAnimating; v120 = 0; v22 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v21, AnimatedShopKeeper::startAnimating, 0); v23 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v20, v22, 0); cocos2d::CCNode::runAction(v19, v23); if ( a1->m_type == Community ) { sub_776584((int)&v118, (char *)v110); v24 = CCSpriteWithHue::createWithSpriteFrameName((const char **)&v118); sub_774008(&v118); CCSpriteWithHue::setHueDegrees(v24, -120.0); } else { v24 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)v110); } a1->addChild_0(a1, v24, 1); v25 = v24->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v116.width * 0.5, 95.0); v25(v24, &v128.origin); ((void (__fastcall *)(CCSpriteWithHue *, int))v24->setScaleX)(v24, 1064682127); if ( a2 == Secret ) { v26 = v9->setColor; LOWORD(v128.origin.x) = -256; BYTE2(v128.origin.x) = -1; v26(v9, (const cocos2d::ccColor3B *)&v128); v27 = v24->setColor; LOBYTE(v128.origin.x) = 0; *(_WORD *)((char *)&v128.origin.x + 1) = -1; v27(v24, (const cocos2d::ccColor3B *)&v128); } else if ( a2 == Mechanic ) { v28 = v9->setColor; LOWORD(v128.origin.x) = -20561; BYTE2(v128.origin.x) = -81; v28(v9, (const cocos2d::ccColor3B *)&v128); } else if ( a2 ) { if ( a2 == Community ) { v34 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v34, -1); v35 = v34->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v116.width - 40.0, v116.height - 60.0); v35(v34, &v128.origin); v36 = cocos2d::CCSprite::createWithSpriteFrameName("communityCreditsBtn_001.png"); v124 = 0; v123 = GJShopLayer::onCommunityCredits; v37 = CCMenuItemSpriteExtra::create( v36, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(GJShopLayer::onCommunityCredits, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v37, 1.2); v34->addChild(v34, v37); } } else { v29 = cocos2d::CCSprite::createWithSpriteFrameName("plushies_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v29->setScale)(v29, 1066192077); v122 = 0; v121 = GJShopLayer::onPlushies; v30 = CCMenuItemSpriteExtra::create( v29, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(GJShopLayer::onPlushies, (unsigned int)a1)); v30->m_animationEnabled = 0; v30->m_colorEnabled = 1; v31 = cocos2d::CCMenu::createWithItem(v30); a1->addChild_0(a1, v31, 0); v32 = v31->setPosition; v33 = (int)v24->getPosition(v24); cocos2d::CCPoint::CCPoint(&v127, -130.0, 120.0); cocos2d::CCPoint::operator+(&v128, v33, &v127); v32(v31, &v128.origin); v31->setEnabled(v31, 0); } v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); v126 = 0; v125 = GJShopLayer::onBack; v39 = CCMenuItemSpriteExtra::create( v38, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(GJShopLayer::onBack, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v39, 1.6); v40 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v39, nullptr); a1->addChild_0(a1, v40, 1); v41 = v40->setPosition; v42 = cocos2d::CCDirector::sharedDirector(); v43 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v42)) + 24.0; v44 = cocos2d::CCDirector::sharedDirector(); v45 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v44)); cocos2d::CCPoint::CCPoint(&v128.origin, v43, v45 - 23.0); v41(v40, &v128.origin); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v39); v46 = FMODAudioEngine::sharedEngine(); sub_775C20(&v128); FMODAudioEngine::playMusic((FMOD::Channel *)v46, (int)&v128, 1, 0.0, 0); sub_774008(&v128); if ( a1->m_type == Diamond ) { v47 = GameStatsManager::sharedState(); v48 = "29"; } else { v47 = GameStatsManager::sharedState(); v48 = "14"; } Stat = GameStatsManager::getStat(v47, v48); v50 = CCCounterLabel::create(Stat, "bigFont.fnt", Integer); v51 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_currencyLabel = v50; v51->addChild_0(a1, v50, 3); m_currencyLabel = a1->m_currencyLabel; v53 = m_currencyLabel->setPosition; cocos2d::CCPoint::CCPoint(&v128.origin, v116.width - 34.0, v116.height - 15.0); v53(m_currencyLabel, &v128.origin); v54 = a1->m_currencyLabel; v55 = v54->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v128.origin, 1.0, 0.5); v55(v54, &v128.origin); ((void (__fastcall *)(CCCounterLabel *, int))a1->m_currencyLabel->setScale)(a1->m_currencyLabel, 1058642330); if ( a1->m_type == Diamond ) v56 = "currencyDiamondIcon_001.png"; else v56 = "currencyOrbIcon_001.png"; sub_776584((int)&v113, v56); v57 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v113); a1->addChild_0(a1, v57, 3); v58 = v57->setPosition; v59 = a1->m_currencyLabel->getPosition(a1->m_currencyLabel); cocos2d::CCPoint::CCPoint(&v127, 13.0, -0.5); cocos2d::CCPoint::operator+(&v128, v59, &v127); v58(v57, &v128.origin); v61 = (cocos2d::CCParticleSystem *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"keyEffect.plist", nullptr, v60); v61->setTotalParticles(v61, 8u); setStartColor = v61->setStartColor; memset(&v128, 0, sizeof(v128)); v128.size.height = 1.0; v128.size.width = 1.0; v128.origin.y = 0.78431; setStartColor(v61, (const cocos2d::ccColor4F *)&v128); setEndColor = v61->setEndColor; memset(&v128, 0, sizeof(v128)); v128.size.height = 1.0; v128.size.width = 0.58824; setEndColor(v61, (const cocos2d::ccColor4F *)&v128); setStartColorVar = v61->setStartColorVar; memset(&v128, 0, sizeof(v128)); setStartColorVar(v61, (const cocos2d::ccColor4F *)&v128); setEndColorVar = v61->setEndColorVar; memset(&v128, 0, sizeof(v128)); setEndColorVar(v61, (const cocos2d::ccColor4F *)&v128); ((void (__fastcall *)(cocos2d::CCParticleSystem *, int))v61->setLife)(v61, 1065353216); ((void (__fastcall *)(cocos2d::CCParticleSystem *, int))v61->setLifeVar)(v61, 1045220557); setPosVar = v61->setPosVar; cocos2d::CCPoint::CCPoint(&v128.origin, 12.0, 10.0); setPosVar(v61, &v128.origin); a1->addChild_0(a1, v61, 100); v67 = v61->setPosition; v68 = (int)v57->getPosition(v57); v67(v61, (const cocos2d::CCPoint *)v68); v61->setPositionType(v61, kCCPositionTypeGrouped); cocos2d::CCParticleSystem::resetSystem(v61); v106 = (cocos2d::CCArray *)cocos2d::CCArray::create(v69); v70 = (cocos2d::CCArray *)GameStatsManager::sharedState(); m_uReference = (cocos2d::CCArray *)v70[6].m_uReference; v104 = (cocos2d::CCArray *)cocos2d::CCArray::create(v70); v72 = GameManager::sharedState(); UGV = GameManager::getUGV(v72, (const char *)&aO1i2r3e45s7t89[10]); for ( i = 0; i < cocos2d::CCArray::count(m_uReference); ++i ) { v75 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(m_uReference, i); m_type = a1->m_type; if ( (cocos2d::CCObject_vtbl *)m_type == v75[6].__vftable && (m_type != Secret || UGV || v75[5].m_uID - v75[5].m_nLuaID != 20) ) { cocos2d::CCArray::addObject(v104, v75); } } v77 = cocos2d::CCDictionary::create(); a1->m_shopItems = v77; cocos2d::CCObject::retain(v77); v78 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v103 = 0; v107 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v78); while ( v103 < cocos2d::CCArray::count(v104) ) { v79 = (_DWORD *)cocos2d::CCArray::objectAtIndex(v104, v103); v80 = v79[69] - v79[70]; v81 = v79[72] - v79[73]; v114 = (char *)&unk_ACDDA8; v82 = GameStatsManager::sharedState(); isStoreItemUnlocked = GameStatsManager::isStoreItemUnlocked(v82, v79[66] - v79[67]); v84 = (unsigned int)(v81 - 8) > 1 && v81 != 1; v129 = GJItemIcon::unlockedColorForType(a2); StoreItem = GJItemIcon::createStoreItem(v81, v80, isStoreItemUnlocked, v129); ((void (__fastcall *)(GJItemIcon *, int))StoreItem->setScale)(StoreItem, 1066192077); v127.y = 0.0; LODWORD(v127.x) = GJShopLayer::onSelectItem; v86 = CCMenuItemSpriteExtra::create( StoreItem, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(GJShopLayer::onSelectItem, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v86, 2.0); cocos2d::CCArray::addObject(v106, v86); v86->setTag(v86, v79[66] - v79[67]); StoreItem->setTag(StoreItem, v81); if ( v84 ) cocos2d::CCArray::addObject(v107, v86); if ( isStoreItemUnlocked ) { v86->setEnabled(v86, 0); GJItemIcon::darkenStoreItem(StoreItem, a1->m_type); } else { GameToolbox::pointsToString((GameToolbox *)&v115, v79[75] - v79[76]); v87 = cocos2d::CCLabelBMFont::create(); StoreItem->addChild(StoreItem, v87); v88 = v87->setPosition; v89 = (float *)StoreItem->getContentSize(StoreItem); cocos2d::CCPoint::CCPoint(&v128.origin, (float)(*v89 * 0.5) - 4.0, -6.5); v88(v87, &v128.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v87->setScale)(v87, 1051931443); v87->setTag(v87, 1234); if ( a2 == Diamond ) v90 = "currencyDiamondIcon_001.png"; else v90 = "currencyOrbIcon_001.png"; sub_776584((int)&v117, v90); v91 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)LODWORD(v117.x)); StoreItem->addChild(StoreItem, v91); v108 = v91->setPosition; v92 = (int)v87->getPosition(v87); v93 = v87->getContentSize(v87)->width * 0.5; v94 = (float)(v93 * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v87->getScale)(v87))) + 6.0; v95 = 1.0; if ( a2 != Diamond ) v95 = 0.0; cocos2d::CCPoint::CCPoint(&v118, v94 + v95, -0.5); cocos2d::CCPoint::operator+(&v128, v92, &v118); v108(v91, &v128.origin); ((void (__fastcall *)(cocos2d::CCSprite *, int))v91->setScale)(v91, 1056964608); v91->setTag(v91, 1234); sub_774008(&v117); sub_774008(&v115); } cocos2d::CCDictionary::setObject(a1->m_shopItems, v86, v79[66] - v79[67]); sub_774008(&v114); ++v103; } cocos2d::CCPoint::CCPoint(&v117, v116.width * 0.5, 93.0); cocos2d::CCPoint::CCPoint(&v128.origin, &v117); LODWORD(v96.x) = &v128; LODWORD(v96.y) = 4; v97 = ListButtonBar::create(v106, v96, 2, 1103626240, 15.0, 60.0, 221.0, COERCE_FLOAT(1), v101); a1->addChild_0(a1, v97, 100); v98 = &v97->m_scrollLayer->__vftable; v97->m_useMoveAnimation = 1; v98[104] = 1058642330; (*(void (__fastcall **)(_DWORD *))(*v98 + 492))(v98); ListButtonBar::goToPage(v97, 0); v97->m_scrollLayer->m_doVisit = 1; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v118, 406.0, 200.0); m_scrollLayer = v97->m_scrollLayer; cocos2d::CCRect::CCRect(&v128, v117.x - (float)(v118.x * 0.5), v117.y - (float)(v118.y * 0.5), v118.x, v118.y); cocos2d::CCRect::operator=(&m_scrollLayer->m_clippingRect, &v128); sub_774008(&v113); sub_774008(v112); sub_774008(&v111); sub_774008(&v110); sub_774008(&v109); } return v105; }
GD Web Decomp Icon

GD Web Decomp

Raw Source