// // GJShopLayer::init from 0x612a1c to 0x613860 (3652 bytes) // // 1 xrefs: // > GJShopLayer::create @ 0x613928 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:54:54 +0000 // cocos2d::CCDirector *__fastcall GJShopLayer::init(int a1, GJItemIcon *a2) { cocos2d::CCDirector *v4; // r0 int v5; // r0 cocos2d::CCTouchDispatcher *v6; // r0 cocos2d::CCTextureCache *v7; // r0 char *v8; // r1 cocos2d::CCTextureCache *v9; // r8 const char *v10; // r1 cocos2d::CCSpriteFrameCache *v11; // r0 cocos2d::CCSpriteFrameCache *v12; // r8 cocos2d::CCSprite *v13; // r5 const char *v14; // r1 cocos2d::CCDirector *v15; // r0 size_t v16; // r0 float *v17; // r5 void (__fastcall *v18)(float *, _DWORD *); // r2 cocos2d::CCSprite *v19; // r0 void (__fastcall *v20)(float *, _DWORD *); // r8 void (__fastcall *v21)(float *, _DWORD *); // r8 const char *v22; // r1 cocos2d::CCSprite *v23; // r0 int v24; // r8 void (__fastcall *v25)(int, _DWORD *); // r9 cocos2d::CCSprite *v26; // r0 int v27; // r3 int v28; // r8 void (__fastcall *v29)(int, _DWORD *); // r9 cocos2d::CCSprite *v30; // r8 float v31; // r1 cocos2d::CCSequence *v32; // r9 int v33; // r0 cocos2d::CCFiniteTimeAction *v34; // r0 cocos2d::CCAction *v35; // r0 const char *v36; // r1 size_t v37; // r0 CCSpriteWithHue *v38; // r8 cocos2d::CCSprite *v39; // r0 void (__fastcall *v40)(CCSpriteWithHue *, _DWORD *); // r9 cocos2d::CCMenu *v41; // r0 const char *v42; // r1 void (__fastcall *v43)(float *, _DWORD *); // r2 void (__fastcall *v44)(CCSpriteWithHue *, _DWORD *); // r2 void (__fastcall *v45)(float *, _DWORD *); // r2 int v46; // r7 cocos2d::CCMenu *v47; // r0 cocos2d::CCMenuItem *v48; // r1 int v49; // r5 void (__fastcall *v50)(int, _DWORD *); // r10 int v51; // r8 int v52; // r5 void (__fastcall *v53)(int, _DWORD *); // r7 const char *v54; // r1 int v55; // r0 int v56; // r7 int v57; // r0 cocos2d::CCMenu *v58; // r7 int v59; // r5 cocos2d::CCDirector *v60; // r0 int (__fastcall *v61)(int, _DWORD *); // r8 cocos2d::CCDirector *v62; // r0 float v63; // r0 float v64; // s16 cocos2d::CCDirector *v65; // r0 float v66; // r0 PlatformToolbox *v67; // r0 FMODAudioEngine *isControllerConnected; // r0 cocos2d::CCMenuItem *v69; // r2 FMODAudioEngine *v70; // r7 GameStatsManager *v71; // r0 GameStatsManager *v72; // r0 const char *v73; // r1 int Stat; // r0 cocos2d::CCLabelBMFont *v75; // r0 int v76; // r3 int v77; // r5 void (__fastcall *v78)(int, _DWORD *); // r7 int v79; // r5 void (__fastcall *v80)(int, _DWORD *); // r7 const char *v81; // r5 size_t v82; // r0 cocos2d::CCSprite *v83; // r0 int v84; // r7 void (__fastcall *v85)(int, _DWORD *); // r9 int v86; // r10 bool v87; // r2 cocos2d::CCParticleSystem *v88; // r8 void (__fastcall *v89)(cocos2d::CCParticleSystem *, _DWORD *); // r9 void (__fastcall *v90)(cocos2d::CCParticleSystem *, _DWORD *); // r9 void (__fastcall *v91)(cocos2d::CCParticleSystem *, _DWORD *); // r2 void (__fastcall *v92)(cocos2d::CCParticleSystem *, _DWORD *); // r3 void (__fastcall *v93)(cocos2d::CCParticleSystem *, _DWORD *); // r9 void (__fastcall *v94)(cocos2d::CCParticleSystem *, int); // r5 int v95; // r0 cocos2d::CCArray *v96; // r0 cocos2d::CCArray *v97; // r0 cocos2d::CCArray *v98; // r7 GameManager *v99; // r0 int UGV; // r8 unsigned int i; // r5 cocos2d::CCDictionary *v102; // r0 cocos2d::CCObject *v103; // r0 int v104; // r3 cocos2d::CCObject *v105; // r0 const char *v106; // r1 cocos2d::CCArray *v107; // r0 GameStatsManager *v108; // r5 int v109; // r7 int v110; // r8 GameStatsManager *v111; // r0 int v112; // r1 int isStoreItemUnlocked; // r9 _BOOL4 v114; // r3 int *StoreItem; // r10 cocos2d::CCObject *v116; // r7 cocos2d::CCLabelBMFont *v117; // r0 int v118; // r9 float *v119; // r0 const char *v120; // r8 size_t v121; // r0 const char *v122; // r1 cocos2d::CCSprite *v123; // r0 int v124; // r8 float v125; // s16 float v126; // s14 float v127; // s15 int v128; // r5 int v129; // r3 int v130; // r4 unsigned int v132; // [sp+1Ch] [bp-100h] GameManager *v133; // [sp+20h] [bp-FCh] cocos2d::CCDirector *v134; // [sp+24h] [bp-F8h] _BOOL4 v135; // [sp+28h] [bp-F4h] void (__fastcall *v136)(int, _DWORD *); // [sp+28h] [bp-F4h] void (__fastcall *v137)(int, _DWORD *); // [sp+28h] [bp-F4h] GameStatsManager *v138; // [sp+2Ch] [bp-F0h] cocos2d::CCArray *v139; // [sp+30h] [bp-ECh] int v140; // [sp+34h] [bp-E8h] float v141; // [sp+4Ch] [bp-D0h] BYREF float v142; // [sp+50h] [bp-CCh] float v143[2]; // [sp+54h] [bp-C8h] BYREF float v144; // [sp+5Ch] [bp-C0h] BYREF float v145; // [sp+60h] [bp-BCh] int (__fastcall *v146)(AnimatedShopKeeper *, int, int, int); // [sp+64h] [bp-B8h] int v147; // [sp+68h] [bp-B4h] void (__fastcall *v148)(GJShopLayer *, cocos2d::CCObject *); // [sp+6Ch] [bp-B0h] int v149; // [sp+70h] [bp-ACh] int (__fastcall *v150)(GJShopLayer *, cocos2d::CCObject *); // [sp+74h] [bp-A8h] int v151; // [sp+78h] [bp-A4h] char **(__fastcall *v152)(char **, cocos2d::CCObject *); // [sp+7Ch] [bp-A0h] int v153; // [sp+80h] [bp-9Ch] _DWORD v154[2]; // [sp+84h] [bp-98h] BYREF int v155[2]; // [sp+8Ch] [bp-90h] BYREF cocos2d::CCSprite *v156; // [sp+94h] [bp-88h] int v157[2]; // [sp+98h] [bp-84h] BYREF cocos2d::CCSprite *v158; // [sp+A0h] [bp-7Ch] int v159[2]; // [sp+A4h] [bp-78h] BYREF cocos2d::CCSprite *v160; // [sp+ACh] [bp-70h] int v161[3]; // [sp+B0h] [bp-6Ch] BYREF unsigned int v162[3]; // [sp+BCh] [bp-60h] BYREF unsigned int v163[3]; // [sp+C8h] [bp-54h] BYREF int v164[2]; // [sp+D4h] [bp-48h] BYREF cocos2d::CCSprite *v165; // [sp+DCh] [bp-40h] int v166; // [sp+E0h] [bp-3Ch] BYREF int v167; // [sp+E4h] [bp-38h] int v168; // [sp+E8h] [bp-34h] int v169[2]; // [sp+ECh] [bp-30h] BYREF cocos2d::CCLabelBMFont *v170; // [sp+F4h] [bp-28h] int v171[2]; // [sp+F8h] [bp-24h] BYREF cocos2d::CCSprite *v172; // [sp+100h] [bp-1Ch] _DWORD v173[4]; // [sp+104h] [bp-18h] BYREF v4 = (cocos2d::CCDirector *)cocos2d::CCLayer::init((cocos2d::CCLayer *)a1); v134 = v4; if ( v4 ) { v5 = cocos2d::CCDirector::sharedDirector(v4); v6 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 80))(v5); cocos2d::CCTouchDispatcher::registerForcePrio(v6, (cocos2d::CCObject *)a1, 2, 0); *(_DWORD *)(a1 + 340) = a2; v155[0] = 0; v155[1] = 0; v156 = nullptr; std::string::__init(v155, "shopBG_001.png", 0xEu); v157[0] = 0; v157[1] = 0; v158 = nullptr; std::string::__init(v157, "storeDesk_001.png", 0x11u); v159[0] = 0; v159[1] = 0; v160 = nullptr; std::string::__init(v159, "shopSign_001.png", 0x10u); std::string::assign((int *)(a1 + 344), "GJ_ShopSheet01"); memset(v161, 0, sizeof(v161)); v7 = (cocos2d::CCTextureCache *)std::string::__init(v161, "shop.mp3", 8u); switch ( *(_DWORD *)(a1 + 340) ) { case 1: std::string::assign(v159, "shopSign2_001.png"); v8 = "secretShop.mp3"; goto LABEL_7; case 2: std::string::assign(v159, "shopSign3_001.png"); v8 = "shop3.ogg"; goto LABEL_7; case 3: std::string::assign((int *)(a1 + 344), "GJ_ShopSheet02"); std::string::assign(v155, "shopBG_02_001.png"); std::string::assign(v157, "storeDesk_02_001.png"); std::string::assign(v159, "shopSign4_001.png"); v8 = "shop4.mp3"; goto LABEL_7; case 4: std::string::assign((int *)(a1 + 344), "GJ_ShopSheet03"); std::string::assign(v155, "shopBG_03_001.png"); std::string::assign(v157, "storeDesk_03_001.png"); std::string::assign(v159, "shopSign5_001.png"); v8 = "shop5.ogg"; LABEL_7: v7 = (cocos2d::CCTextureCache *)std::string::assign(v161, v8); break; default: break; } v9 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v7); std::operator+(v162, (unsigned __int8 *)(a1 + 344), ".png"); if ( (v162[0] & 1) != 0 ) v10 = (const char *)v162[2]; else v10 = (char *)v162 + 1; cocos2d::CCTextureCache::addImage(v9, v10, 0); v11 = (cocos2d::CCSpriteFrameCache *)std::string::~string((int)v162); v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v11); std::operator+(v163, (unsigned __int8 *)(a1 + 344), ".plist"); v13 = (cocos2d::CCSprite *)(LOBYTE(v163[0]) << 31); if ( (v163[0] & 1) != 0 ) v14 = (const char *)v163[2]; else v14 = (char *)v163 + 1; cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v12, v14); std::string::~string((int)v163); (*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 536))(a1, 1); (*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 544))(a1, 1); (*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 500))(a1, 1); v15 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int))(*(_DWORD *)a1 + 552))(a1, 1); cocos2d::CCDirector::sharedDirector(v15); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v141); if ( *(_DWORD *)(a1 + 340) == 2 ) { if ( (v155[0] & 1) == 0 ) v13 = (cocos2d::CCSprite *)((char *)v155 + 1); v166 = 0; if ( (v155[0] & 1) != 0 ) v13 = v156; v167 = 0; v168 = 0; v16 = strlen((const char *)v13); std::string::__init(&v166, v13, v16); v17 = (float *)CCSpriteWithHue::createWithSpriteFrameName((char *)&v166); std::string::~string((int)&v166); CCSpriteWithHue::setHueDegrees((CCSpriteWithHue *)v17, -110.0); v18 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 480); LOWORD(v173[0]) = 240; BYTE2(v173[0]) = -16; v18(v17, v173); } else { if ( (v155[0] & 1) != 0 ) v19 = v156; else v19 = (cocos2d::CCSprite *)((char *)v155 + 1); v17 = (float *)cocos2d::CCSprite::createWithSpriteFrameName(v19, (const char *)(LOBYTE(v155[0]) << 31)); } v20 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, 0.0, 0.0); v20(v17, v173); (*(void (__fastcall **)(int, float *, int))(*(_DWORD *)a1 + 232))(a1, v17, -2); (*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v17 + 64))(v17, (float)(v141 + 5.0) / v17[86]); (*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v17 + 72))(v17, (float)(v142 + 5.0) / v17[87]); v21 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, -2.5, -2.5); v21(v17, v173); if ( (v159[0] & 1) != 0 ) v23 = v160; else v23 = (cocos2d::CCSprite *)((char *)v159 + 1); v24 = cocos2d::CCSprite::createWithSpriteFrameName(v23, v22); v25 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)(v141 * 0.5) - 70.0, v142 - 38.0); v25(v24, v173); (*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 228))(a1, v24); v26 = AnimatedShopKeeper::create((int)a2); v27 = *(_DWORD *)a1; *(_DWORD *)(a1 + 368) = v26; (*(void (__fastcall **)(int, cocos2d::CCSprite *, int))(v27 + 232))(a1, v26, 3); v28 = *(_DWORD *)(a1 + 368); v29 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v28 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)((float)(v141 * 0.5) + 100.0) + 0.0, 230.0); v29(v28, v173); v30 = *(cocos2d::CCSprite **)(a1 + 368); v32 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3DCCCCCD, v31); v33 = *(_DWORD *)(a1 + 368); v146 = AnimatedShopKeeper::startAnimating; v147 = 0; v34 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v33, AnimatedShopKeeper::startAnimating, 0); v35 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v32, v34, 0); cocos2d::CCNode::runAction(v30, v35); if ( *(_DWORD *)(a1 + 340) == 2 ) { if ( (v157[0] & 1) == 0 ) v30 = (cocos2d::CCSprite *)((char *)v157 + 1); v169[0] = 0; if ( (v157[0] & 1) != 0 ) v30 = v158; v169[1] = 0; v170 = nullptr; v37 = strlen((const char *)v30); std::string::__init(v169, v30, v37); v38 = CCSpriteWithHue::createWithSpriteFrameName((char *)v169); std::string::~string((int)v169); CCSpriteWithHue::setHueDegrees(v38, -120.0); } else { if ( (v157[0] & 1) != 0 ) v39 = v158; else v39 = (cocos2d::CCSprite *)((char *)v157 + 1); v38 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName(v39, v36); } (*(void (__fastcall **)(int, CCSpriteWithHue *, int))(*(_DWORD *)a1 + 232))(a1, v38, 1); v40 = *(void (__fastcall **)(CCSpriteWithHue *, _DWORD *))(*(_DWORD *)v38 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, v141 * 0.5, 95.0); v40(v38, v173); v41 = (cocos2d::CCMenu *)(*(int (__fastcall **)(CCSpriteWithHue *, int))(*(_DWORD *)v38 + 64))(v38, 1064682127); if ( a2 == (GJItemIcon *)((char *)&dword_0 + 1) ) { v43 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 480); LOWORD(v173[0]) = -256; BYTE2(v173[0]) = -1; v43(v17, v173); v44 = *(void (__fastcall **)(CCSpriteWithHue *, _DWORD *))(*(_DWORD *)v38 + 480); LOBYTE(v173[0]) = 0; *(_WORD *)((char *)v173 + 1) = -1; v44(v38, v173); } else if ( a2 == (GJItemIcon *)((char *)&dword_0 + 3) ) { v45 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 480); LOWORD(v173[0]) = -20561; BYTE2(v173[0]) = -81; v45(v17, v173); } else if ( a2 ) { if ( a2 == (GJItemIcon *)((char *)&dword_0 + 2) ) { v52 = cocos2d::CCMenu::create(v41); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1 + 232))(a1, v52, -1); v53 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v52 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, v141 - 40.0, v142 - 60.0); v53(v52, v173); v55 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"communityCreditsBtn_001.png", v54); v151 = 0; v150 = GJShopLayer::onCommunityCredits; v56 = CCMenuItemSpriteExtra::create(v55, 0, a1, (int)GJShopLayer::onCommunityCredits, 0); CCMenuItemSpriteExtra::setSizeMult(v56, 1.2); (*(void (__fastcall **)(int, int))(*(_DWORD *)v52 + 228))(v52, v56); } } else { v46 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"plushies_001.png", v42); (*(void (__fastcall **)(int, int))(*(_DWORD *)v46 + 80))(v46, 1066192077); v149 = 0; v148 = GJShopLayer::onPlushies; v47 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v46, 0, a1, (int)GJShopLayer::onPlushies, 0); *((_BYTE *)v47 + 320) = 0; *((_BYTE *)v47 + 321) = 1; v49 = cocos2d::CCMenu::createWithItem(v47, v48); (*(void (__fastcall **)(int, int, _DWORD))(*(_DWORD *)a1 + 232))(a1, v49, 0); v50 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v49 + 92); v51 = (*(int (__fastcall **)(CCSpriteWithHue *))(*(_DWORD *)v38 + 96))(v38); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v154, -130.0, 120.0); cocos2d::CCPoint::operator+(v173, v51, v154); v50(v49, v173); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 636))(v49, 0); } v57 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v42); v153 = 0; v152 = GJShopLayer::onBack; v58 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v57, 0, a1, (int)GJShopLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((int)v58, 1.6); v59 = cocos2d::CCMenu::create(v58, nullptr); v60 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int, int))(*(_DWORD *)a1 + 232))(a1, v59, 1); v61 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v59 + 92); v62 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v60); v63 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v62)); v64 = v63 + 24.0; v65 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v63)); v66 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v65)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, v64, v66 - 23.0); v67 = (PlatformToolbox *)v61(v59, v173); isControllerConnected = (FMODAudioEngine *)PlatformToolbox::isControllerConnected(v67); if ( isControllerConnected ) isControllerConnected = (FMODAudioEngine *)GameToolbox::addBackButton((GameToolbox *)a1, v58, v69); v70 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(isControllerConnected); std::string::basic_string(v171, (int)v161); FMODAudioEngine::playMusic(v70, (int)v171, 1, 0.0, 0); v71 = (GameStatsManager *)std::string::~string((int)v171); if ( *(_DWORD *)(a1 + 340) == 4 ) { v72 = (GameStatsManager *)GameStatsManager::sharedState(v71); v73 = "29"; } else { v72 = (GameStatsManager *)GameStatsManager::sharedState(v71); v73 = "14"; } Stat = GameStatsManager::getStat(v72, v73); v75 = CCCounterLabel::create(Stat, (cocos2d *)"bigFont.fnt", 0); v76 = *(_DWORD *)a1; *(_DWORD *)(a1 + 332) = v75; (*(void (__fastcall **)(int, cocos2d::CCLabelBMFont *, int))(v76 + 232))(a1, v75, 3); v77 = *(_DWORD *)(a1 + 332); v78 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v77 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, v141 - 34.0, v142 - 15.0); v78(v77, v173); v79 = *(_DWORD *)(a1 + 332); v80 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v79 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, 1.0, 0.5); v80(v79, v173); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 332) + 80))(*(_DWORD *)(a1 + 332), 1058642330); if ( *(_DWORD *)(a1 + 340) == 4 ) v81 = "currencyDiamondIcon_001.png"; else v81 = "currencyOrbIcon_001.png"; v164[0] = 0; v164[1] = 0; v165 = nullptr; v82 = strlen(v81); std::string::__init(v164, v81, v82); if ( (v164[0] & 1) != 0 ) v83 = v165; else v83 = (cocos2d::CCSprite *)((char *)v164 + 1); v84 = cocos2d::CCSprite::createWithSpriteFrameName(v83, (const char *)(LOBYTE(v164[0]) << 31)); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1 + 232))(a1, v84, 3); v85 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v84 + 92); v86 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 332) + 96))(*(_DWORD *)(a1 + 332)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v154, 13.0, -0.5); cocos2d::CCPoint::operator+(v173, v86, v154); v85(v84, v173); v88 = (cocos2d::CCParticleSystem *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"keyEffect.plist", nullptr, v87); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v88 + 752))(v88, 8); v89 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD *))(*(_DWORD *)v88 + 680); memset(v173, 0, sizeof(v173)); v173[3] = 1065353216; v173[2] = 1065353216; v173[1] = 1061734601; v89(v88, v173); v90 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD *))(*(_DWORD *)v88 + 696); memset(v173, 0, sizeof(v173)); v173[3] = 1065353216; v173[2] = 1058444951; v90(v88, v173); v91 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD *))(*(_DWORD *)v88 + 688); memset(v173, 0, sizeof(v173)); v91(v88, v173); v92 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD *))(*(_DWORD *)v88 + 704); memset(v173, 0, sizeof(v173)); v92(v88, v173); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v88 + 488))(v88, 1065353216); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v88 + 496))(v88, 1045220557); v93 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD *))(*(_DWORD *)v88 + 480); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, 12.0, 10.0); v93(v88, v173); (*(void (__fastcall **)(int, cocos2d::CCParticleSystem *, int))(*(_DWORD *)a1 + 232))(a1, v88, 100); v94 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v88 + 92); v95 = (*(int (__fastcall **)(int))(*(_DWORD *)v84 + 96))(v84); v94(v88, v95); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v88 + 784))(v88, 2); v96 = (cocos2d::CCArray *)cocos2d::CCParticleSystem::resetSystem(v88); v138 = (GameStatsManager *)cocos2d::CCArray::create(v96); v97 = (cocos2d::CCArray *)GameStatsManager::sharedState(v138); v98 = *((cocos2d::CCArray **)v97 + 84); v133 = (GameManager *)cocos2d::CCArray::create(v97); v99 = (GameManager *)GameManager::sharedState(v133); UGV = GameManager::getUGV(v99, (char *)&a1i2r3e45s789g[9]); for ( i = 0; ; ++i ) { v102 = (cocos2d::CCDictionary *)cocos2d::CCArray::count(v98); if ( i >= (unsigned int)v102 ) break; v103 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v98, i); v104 = *(_DWORD *)(a1 + 340); if ( v104 == *((_DWORD *)v103 + 78) && (v104 != 1 || UGV || *((_DWORD *)v103 + 66) - *((_DWORD *)v103 + 67) != 20) ) cocos2d::CCArray::addObject(v133, v103); } v105 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v102); *(_DWORD *)(a1 + 336) = v105; cocos2d::CCObject::retain(v105); v107 = (cocos2d::CCArray *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"playerSquare_001.png", v106); v132 = 0; v139 = (cocos2d::CCArray *)cocos2d::CCArray::create(v107); while ( v132 < cocos2d::CCArray::count(v133) ) { v108 = (GameStatsManager *)cocos2d::CCArray::objectAtIndex(v133, v132); v109 = *((_DWORD *)v108 + 69) - *((_DWORD *)v108 + 70); v110 = *((_DWORD *)v108 + 72) - *((_DWORD *)v108 + 73); v166 = 0; v167 = 0; v168 = 0; v111 = (GameStatsManager *)GameStatsManager::sharedState(v108); isStoreItemUnlocked = GameStatsManager::isStoreItemUnlocked( v111, (const char *)(*((_DWORD *)v108 + 66) - *((_DWORD *)v108 + 67))); v114 = (unsigned int)(v110 - 8) > 1 && v110 != 1; v135 = v114; GJItemIcon::unlockedColorForType(a2, v112); StoreItem = GJItemIcon::createStoreItem(v110, v109, isStoreItemUnlocked); (*(void (__fastcall **)(int *, int))(*StoreItem + 80))(StoreItem, 1066192077); v154[1] = 0; v154[0] = GJShopLayer::onSelectItem; v116 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( (int)StoreItem, 0, a1, (int)GJShopLayer::onSelectItem, 0); CCMenuItemSpriteExtra::setSizeMult((int)v116, 2.0); cocos2d::CCArray::addObject(v138, v116); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v116 + 36))( v116, *((_DWORD *)v108 + 66) - *((_DWORD *)v108 + 67)); (*(void (__fastcall **)(int *, int))(*StoreItem + 36))(StoreItem, v110); if ( v135 ) cocos2d::CCArray::addObject(v139, v116); if ( isStoreItemUnlocked ) { (*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v116 + 528))(v116, 0); GJItemIcon::darkenStoreItem((int)StoreItem, *(GJItemIcon **)(a1 + 340)); } else { GameToolbox::pointsToString((GameToolbox *)v169, *((_DWORD *)v108 + 75) - *((_DWORD *)v108 + 76)); if ( (v169[0] & 1) != 0 ) v117 = v170; else v117 = (cocos2d::CCLabelBMFont *)((char *)v169 + 1); v118 = cocos2d::CCLabelBMFont::create(v117, "bigFont.fnt", (const char *)(LOBYTE(v169[0]) << 31)); (*(void (__fastcall **)(int *, int))(*StoreItem + 228))(StoreItem, v118); v136 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v118 + 92); v119 = (float *)(*(int (__fastcall **)(int *))(*StoreItem + 164))(StoreItem); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)(*v119 * 0.5) - 4.0, -6.5); v136(v118, v173); (*(void (__fastcall **)(int, int))(*(_DWORD *)v118 + 80))(v118, 1051931443); (*(void (__fastcall **)(int, int))(*(_DWORD *)v118 + 36))(v118, 1234); if ( a2 == (GJItemIcon *)byte_4 ) v120 = "currencyDiamondIcon_001.png"; else v120 = "currencyOrbIcon_001.png"; v171[0] = 0; v171[1] = 0; v172 = nullptr; v121 = strlen(v120); std::string::__init(v171, v120, v121); if ( (v171[0] & 1) != 0 ) v123 = v172; else v123 = (cocos2d::CCSprite *)((char *)v171 + 1); v124 = cocos2d::CCSprite::createWithSpriteFrameName(v123, v122); (*(void (__fastcall **)(int *, int))(*StoreItem + 228))(StoreItem, v124); v137 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v124 + 92); v140 = (*(int (__fastcall **)(int))(*(_DWORD *)v118 + 96))(v118); v125 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v118 + 164))(v118) * 0.5; v126 = (float)(v125 * COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v118 + 84))(v118))) + 6.0; v127 = 1.0; if ( a2 != (GJItemIcon *)byte_4 ) v127 = 0.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v126 + v127, -0.5); cocos2d::CCPoint::operator+(v173, v140, &v144); v137(v124, v173); (*(void (__fastcall **)(int, int))(*(_DWORD *)v124 + 80))(v124, 1056964608); (*(void (__fastcall **)(int, int))(*(_DWORD *)v124 + 36))(v124, 1234); std::string::~string((int)v171); std::string::~string((int)v169); } cocos2d::CCDictionary::setObject( *(cocos2d::CCDictionary **)(a1 + 336), v116, *((_DWORD *)v108 + 66) - *((_DWORD *)v108 + 67)); std::string::~string((int)&v166); ++v132; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v143, v141 * 0.5, 93.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (const cocos2d::CCPoint *)v143); v128 = ListButtonBar::create( v138, (const cocos2d::CCPoint *)v173, 4, 2, 25.0, 15.0, 60.0, 221.0, (_BYTE *)&dword_0 + 1); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1 + 232))(a1, v128, 100); v129 = *(_DWORD *)(v128 + 264); *(_BYTE *)(v128 + 276) = 1; *(_DWORD *)(v129 + 416) = 1058642330; (*(void (__fastcall **)(_DWORD))(**(_DWORD **)(v128 + 264) + 500))(*(_DWORD *)(v128 + 264)); ListButtonBar::goToPage((cocos2d::CCArray ***)v128, nullptr); *(_BYTE *)(*(_DWORD *)(v128 + 264) + 472) = 1; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v144, 406.0, 200.0); v130 = *(_DWORD *)(v128 + 264); cocos2d::CCRect::CCRect( (cocos2d::CCRect *)v173, v143[0] - (float)(v144 * 0.5), v143[1] - (float)(v145 * 0.5), v144, v145); cocos2d::CCRect::operator=(v130 + 476, v173); std::string::~string((int)v164); std::string::~string((int)v161); std::string::~string((int)v159); std::string::~string((int)v157); std::string::~string((int)v155); } return v134; }
GD Web Decomp Icon

GD Web Decomp

Raw Source