// // GJShopLayer::init from 0x100323040 to 0x1003244cc (5260 bytes) // // 2 xrefs: // > GJShopLayer::scene @ 0x100322ee1 // > GJShopLayer::create @ 0x100323006 // // 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 __fastcall GJShopLayer::init(GJShopLayer *a1, ShopType a2) { bool result; // al cocos2d::CCDirector *v3; // rax cocos2d::CCTouchDispatcher *v4; // rax double v5; // xmm0_8 const std::string::value_type *v6; // rsi cocos2d::CCTextureCache *v7; // rax unsigned int sizex2; // r13d size_t size; // r14 unsigned __int64 v10; // rbx __int8 *v11; // r15 const char *v12; // r12 std::array *longStorage; // rsi size_t v14; // r12 GJShopLayer *v15; // rbx cocos2d::CCTextureCache *v16; // rax unsigned int v17; // r13d size_t v18; // r14 unsigned __int64 v19; // rbx __int8 *v20; // r15 const char *v21; // r12 std::array *p_shortStorage; // rsi size_t v23; // r12 GJShopLayer *v24; // r13 const char *data; // rbx size_t v26; // rax size_t v27; // r14 __int8 *v28; // r15 CCSpriteWithHue *v29; // r15 size_t v30; // r12 const char *v31; // rdi cocos2d::CCSprite *v32; // rbx AnimatedShopKeeper *v33; // rax AnimatedShopKeeper *m_shopKeeper; // rbx cocos2d::CCNode *v35; // rbx unsigned int v36; // r14d unsigned int v37; // eax int v38; // ecx int v39; // r8d int v40; // r9d cocos2d::CCAction *v41; // rax const char *v42; // rbx size_t v43; // rax size_t v44; // r14 __int8 *v45; // r12 CCSpriteWithHue *v46; // rbx size_t v47; // r13 cocos2d::CCSprite *v48; // r14 CCMenuItemSpriteExtra *v49; // rax cocos2d::CCMenu *v50; // r14 unsigned __int64 *v51; // rbx cocos2d::CCMenu *v52; // rbx cocos2d::CCSprite *v53; // rax CCMenuItemSpriteExtra *v54; // r14 cocos2d::CCSprite *v55; // rax CCMenuItemSpriteExtra *v56; // rbx int v57; // edx int v58; // ecx int v59; // r8d int v60; // r9d __int64 v61; // r14 cocos2d::CCDirector *v62; // rax cocos2d::CCDirector *v63; // rax double v64; // xmm0_8 float v65; // xmm1_4 double v66; // xmm0_8 FMODAudioEngine *v67; // rbx GameStatsManager *v68; // rax const char *v69; // rsi int Stat; // eax CCCounterLabel *v71; // rax CCCounterLabel *m_currencyLabel; // rbx CCCounterLabel *v73; // rbx ShopType m_type; // r14d size_t v75; // rbx size_t v76; // rdi _BYTE *v77; // rax const char *v78; // rsi _BYTE *v79; // r14 cocos2d::CCSprite *v80; // rbx unsigned __int64 *v81; // r14 cocos2d::CCParticleSystemQuad *v82; // r14 cocos2d::CCParticleSystemQuad_vtbl *v83; // rax __int64 v84; // rax cocos2d::CCArray *m_storeItemArray; // rbx GameManager *v86; // rax const char *v87; // rsi unsigned int v88; // r14d __int64 v89; // rax const char *v90; // rax ShopType v91; // ecx cocos2d::CCDictionary *v92; // rax char *v93; // rcx size_t v94; // rax unsigned int v95; // eax cocos2d::CCTextureCache *v96; // rax int v97; // r14d UnlockType v98; // r15d cocos2d::CCTextureCache *v99; // rbx GameStatsManager *v100; // rax bool isStoreItemUnlocked; // r12 GJItemIcon *StoreItem; // r13 CCMenuItemSpriteExtra *v103; // rbx int v104; // eax const char *v105; // rdi cocos2d::CCLabelBMFont *v106; // r12 float *v107; // rax _BYTE *v108; // rax size_t v109; // r15 _BYTE *v110; // r14 cocos2d::CCSprite *v111; // r15 unsigned __int64 *v112; // r13 float v113; // xmm0_4 float v114; // xmm4_4 ListButtonBar *v115; // rbx BoomScrollLayer *m_scrollLayer; // rdi BoomScrollLayer *v117; // rbx size_t __sz; // [rsp+0h] [rbp-150h] __int64 v119; // [rsp+8h] [rbp-148h] __int128 v120; // [rsp+10h] [rbp-140h] BYREF void *v121; // [rsp+20h] [rbp-130h] cocos2d::CCArray *v122; // [rsp+30h] [rbp-120h] void *v123; // [rsp+38h] [rbp-118h] size_t __n; // [rsp+40h] [rbp-110h] float v125; // [rsp+4Ch] [rbp-104h] __int64 v126; // [rsp+50h] [rbp-100h] void *v127; // [rsp+58h] [rbp-F8h] std::string v128; // [rsp+60h] [rbp-F0h] BYREF std::string v129; // [rsp+78h] [rbp-D8h] BYREF std::string v130; // [rsp+90h] [rbp-C0h] BYREF unsigned __int64 v131; // [rsp+A8h] [rbp-A8h] BYREF std::string __src; // [rsp+B0h] [rbp-A0h] BYREF __int64 v133; // [rsp+C8h] [rbp-88h] float v134; // [rsp+D4h] [rbp-7Ch] cocos2d::CCTextureCache *v135; // [rsp+D8h] [rbp-78h] float v136; // [rsp+E4h] [rbp-6Ch] BYREF float v137; // [rsp+E8h] [rbp-68h] unsigned __int64 v138; // [rsp+ECh] [rbp-64h] BYREF ShopType v139; // [rsp+F4h] [rbp-5Ch] GJShopLayer *v140; // [rsp+F8h] [rbp-58h] bool v141; // [rsp+107h] [rbp-49h] void *v142; // [rsp+108h] [rbp-48h] __m128 __dst; // [rsp+110h] [rbp-40h] BYREF void *__p; // [rsp+120h] [rbp-30h] cocos2d::ccColor3B v145; // 0:eax.3 double v146; // 0:xmm0_8.8 result = cocos2d::CCLayer::init(a1); if ( result ) { v141 = result; v3 = cocos2d::CCDirector::sharedDirector(); v4 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v3->getTouchDispatcher)(v3); cocos2d::CCTouchDispatcher::registerForcePrio(v4, a1, 2); v139 = a2; a1->m_type = a2; __src.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28; strcpy(__src.__r_.__value_.__s.__data_, "shopBG_001.png"); strcpy((char *)&v129, "\"storeDesk_001.png"); strcpy((char *)&v130, " shopSign_001.png"); v5 = *(double *)"shopSign_001.png"; std::string::assign((std::string *)&a1->m_sheetName, "GJ_ShopSheet01"); v128.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16; strcpy(v128.__r_.__value_.__s.__data_, "shop.mp3"); switch ( a1->m_type ) { case Secret: std::string::assign(&v130, "shopSign2_001.png"); v6 = "secretShop.mp3"; goto LABEL_7; case Community: std::string::assign(&v130, "shopSign3_001.png"); v6 = "shop3.ogg"; goto LABEL_7; case Mechanic: std::string::assign((std::string *)&a1->m_sheetName, "GJ_ShopSheet02"); std::string::assign(&__src, "shopBG_02_001.png"); std::string::assign(&v129, "storeDesk_02_001.png"); std::string::assign(&v130, "shopSign4_001.png"); v6 = "shop4.mp3"; goto LABEL_7; case Diamond: std::string::assign((std::string *)&a1->m_sheetName, "GJ_ShopSheet03"); std::string::assign(&__src, "shopBG_03_001.png"); std::string::assign(&v129, "storeDesk_03_001.png"); std::string::assign(&v130, "shopSign5_001.png"); v6 = "shop5.ogg"; LABEL_7: std::string::assign(&v128, v6); break; default: break; } v7 = cocos2d::CCTextureCache::sharedTextureCache(); sizex2 = a1->m_sheetName.m_data.m_short.sizex2; v140 = a1; if ( (sizex2 & 1) != 0 ) size = a1->m_sheetName.m_data.m_long.size; else size = sizex2 >> 1; v10 = size + 4; if ( size + 4 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(6.770094439104973e223); v135 = v7; if ( v10 >= 0x17 ) { v14 = 26; if ( (v10 | 7) != 0x17 ) v14 = (v10 | 7) + 1; v11 = (__int8 *)operator new(v14); __dst.i64[0] = v14 | 1; __p = v11; __dst.i64[1] = size + 4; v12 = &__dst.i8[1]; if ( (sizex2 & 1) != 0 ) { LABEL_15: longStorage = (std::array *)v140->m_sheetName.m_data.m_long.longStorage; LABEL_20: memmove(v11, longStorage, size); LABEL_21: strcpy(&v11[size], ".png"); if ( (__dst.i8[0] & 1) != 0 ) v12 = (const char *)__p; cocos2d::CCTextureCache::addImage(v135, v12, 0); v15 = v140; if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); v16 = (cocos2d::CCTextureCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v17 = v15->m_sheetName.m_data.m_short.sizex2; if ( (v17 & 1) != 0 ) v18 = v15->m_sheetName.m_data.m_long.size; else v18 = v17 >> 1; v19 = v18 + 6; if ( v18 + 6 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v5); v135 = v16; if ( v19 >= 0x17 ) { v23 = 26; if ( (v19 | 7) != 0x17 ) v23 = (v19 | 7) + 1; v20 = (__int8 *)operator new(v23); __dst.i64[0] = v23 | 1; __p = v20; __dst.i64[1] = v18 + 6; v21 = &__dst.i8[1]; if ( (v17 & 1) != 0 ) { LABEL_32: p_shortStorage = (std::array *)v140->m_sheetName.m_data.m_long.longStorage; LABEL_37: memmove(v20, p_shortStorage, v18); LABEL_38: strcpy(&v20[v18], ".plist"); if ( (__dst.i8[0] & 1) != 0 ) v21 = (const char *)__p; cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2((cocos2d::CCSpriteFrameCache *)v135, v21); v24 = v140; if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(GJShopLayer *, __int64))v24->setKeypadEnabled)(v24, 1); ((void (__fastcall *)(GJShopLayer *, __int64))v24->setKeyboardEnabled)(v24, 1); ((void (__fastcall *)(GJShopLayer *, __int64))v24->setTouchEnabled)(v24, 1); ((void (__fastcall *)(GJShopLayer *, __int64))v24->setMouseEnabled)(v24, 1); cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v146 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v136); data = __src.__r_.__value_.__s.__data_; if ( v24->m_type != Community ) { if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) data = __src.__r_.__value_.__l.__data_; v29 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName(data); LABEL_59: sub_10028CBE0(__dst.f32, 0.0, 0.0); ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v29->setAnchorPoint)(v29, &__dst); ((void (__fastcall *)(GJShopLayer *, CCSpriteWithHue *, __int64))v24->addChild_0)(v24, v29, 4294967294LL); ((void (__fastcall *)(CCSpriteWithHue *, float))v29->setScaleX)( v29, (float)(v136 + 5.0) / v29->m_obRect.size.width); ((void (__fastcall *)(CCSpriteWithHue *, float))v29->setScaleY)( v29, (float)(v137 + 5.0) / v29->m_obRect.size.height); sub_10028CBE0(__dst.f32, -2.5, -2.5); ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v29->setPosition)(v29, &__dst); if ( (*(_BYTE *)&v130.__r_.__value_.__s.0 & 1) != 0 ) v31 = v130.__r_.__value_.__l.__data_; else v31 = v130.__r_.__value_.__s.__data_; v32 = cocos2d::CCSprite::createWithSpriteFrameName(v31); sub_10028CBE0(__dst.f32, (float)(v136 * 0.5) + -70.0, v137 + -38.0); ((void (__fastcall *)(cocos2d::CCSprite *, __m128 *))v32->setPosition)(v32, &__dst); ((void (__fastcall *)(GJShopLayer *, cocos2d::CCSprite *))v24->addChild)(v24, v32); v33 = AnimatedShopKeeper::create(v139); v24->m_shopKeeper = v33; ((void (__fastcall *)(GJShopLayer *, AnimatedShopKeeper *, __int64))v24->addChild_0)(v24, v33, 3); m_shopKeeper = v24->m_shopKeeper; sub_10028CBE0(__dst.f32, (float)(v136 * 0.5) + 100.0, 230.0); ((void (__fastcall *)(AnimatedShopKeeper *, __m128 *))m_shopKeeper->setPosition)(m_shopKeeper, &__dst); v35 = v24->m_shopKeeper; v36 = (unsigned int)cocos2d::CCDelayTime::create(0.1); v37 = (unsigned int)cocos2d::CCCallFunc::create( v24->m_shopKeeper, (cocos2d::SEL_CallFunc)(unsigned __int64)AnimatedShopKeeper::startAnimating); v41 = (cocos2d::CCAction *)sub_1003B5760(v36, v37, 0, v38, v39, v40); cocos2d::CCNode::runAction(v35, v41); v42 = v129.__r_.__value_.__s.__data_; if ( v24->m_type != Community ) { if ( (*(_BYTE *)&v129.__r_.__value_.__s.0 & 1) != 0 ) v42 = v129.__r_.__value_.__l.__data_; v46 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName(v42); LABEL_79: ((void (__fastcall *)(GJShopLayer *, CCSpriteWithHue *, __int64))v24->addChild_0)(v24, v46, 1); sub_10028CBE0(__dst.f32, v136 * 0.5, 95.0); ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v46->setPosition)(v46, &__dst); ((void (__fastcall *)(CCSpriteWithHue *, float))v46->setScaleX)(v46, 0.95999998); switch ( v139 ) { case 0: v48 = cocos2d::CCSprite::createWithSpriteFrameName("plushies_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v48->setScale)(v48, 1.1); v49 = CCMenuItemSpriteExtra::create( v48, nullptr, v24, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJShopLayer::onPlushies); *(_WORD *)&v49->m_animationEnabled = 256; v50 = cocos2d::CCMenu::createWithItem(v49); ((void (__fastcall *)(GJShopLayer *, cocos2d::CCMenu *, _QWORD))v24->addChild_0)(v24, v50, 0); v51 = (unsigned __int64 *)((__int64 (__fastcall *)(CCSpriteWithHue *))v46->getPosition)(v46); sub_10028CBE0((float *)&v138, -130.0, 120.0); sub_10028CCE0((double *)__dst.i64, v51, &v138); ((void (__fastcall *)(cocos2d::CCMenu *, __m128 *))v50->setPosition)(v50, &__dst); ((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))v50->setEnabled)(v50, 0); break; case 1: __dst.i8[2] = -1; __dst.i16[0] = -256; ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v29->setColor)(v29, &__dst); __dst.i8[2] = -1; __dst.i16[0] = -256; ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v46->setColor)(v46, &__dst); break; case 2: v52 = cocos2d::CCMenu::create(); ((void (__fastcall *)(GJShopLayer *, cocos2d::CCMenu *, __int64))v24->addChild_0)( v24, v52, 0xFFFFFFFFLL); sub_10028CBE0(__dst.f32, v136 + -40.0, v137 + -60.0); ((void (__fastcall *)(cocos2d::CCMenu *, __m128 *))v52->setPosition)(v52, &__dst); v53 = cocos2d::CCSprite::createWithSpriteFrameName("communityCreditsBtn_001.png"); v54 = CCMenuItemSpriteExtra::create( v53, nullptr, v24, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJShopLayer::onCommunityCredits); CCMenuItemSpriteExtra::setSizeMult(v54, 1.2); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v52->addChild)(v52, v54); break; case 3: __dst.i8[2] = -81; __dst.i16[0] = -20561; ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v29->setColor)(v29, &__dst); break; default: break; } v55 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); v56 = CCMenuItemSpriteExtra::create( v55, nullptr, v24, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJShopLayer::onBack); CCMenuItemSpriteExtra::setSizeMult(v56, 1.6); v61 = sub_100792C50((_DWORD)v56, 0, v57, v58, v59, v60); ((void (__fastcall *)(GJShopLayer *, __int64, __int64))v24->addChild_0)(v24, v61, 1); v62 = cocos2d::CCDirector::sharedDirector(); LODWORD(v135) = sub_100484D90(v62); v63 = cocos2d::CCDirector::sharedDirector(); v64 = sub_100484D70(v63); v65 = *(float *)&v64; *(_QWORD *)&v66 = (unsigned int)v135; *(float *)&v66 = *(float *)&v135 + 24.0; sub_10028CBE0(__dst.f32, *(float *)&v135 + 24.0, v65 + -23.0); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v61 + 184LL))(v61, &__dst); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(v24, v56); v67 = FMODAudioEngine::sharedEngine(); if ( (*(_BYTE *)&v128.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v120, v128.__r_.__value_.__l.__data_, v128.__r_.__value_.__l.__size_, v66); } else { v121 = v128.__r_.__value_.__l.__data_; v120 = *(_OWORD *)&v128.__r_.__value_.__l.0; } FMODAudioEngine::playMusic(v67, &v120, 1, 0, 0.0); if ( (v120 & 1) != 0 ) operator delete(v121); if ( v24->m_type == Diamond ) { v68 = GameStatsManager::sharedState(); v69 = "29"; } else { v68 = GameStatsManager::sharedState(); v69 = "14"; } Stat = GameStatsManager::getStat(v68, v69); v71 = CCCounterLabel::create(Stat, "bigFont.fnt", Integer); v24->m_currencyLabel = v71; ((void (__fastcall *)(GJShopLayer *, CCCounterLabel *, __int64))v24->addChild_0)(v24, v71, 3); m_currencyLabel = v24->m_currencyLabel; sub_10028CBE0(__dst.f32, v136 + -34.0, v137 + -15.0); ((void (__fastcall *)(CCCounterLabel *, __m128 *))m_currencyLabel->setPosition)(m_currencyLabel, &__dst); v73 = v24->m_currencyLabel; sub_10028CBE0(__dst.f32, 1.0, 0.5); ((void (__fastcall *)(CCCounterLabel *, __m128 *))v73->setAnchorPoint)(v73, &__dst); ((void (__fastcall *)(CCCounterLabel *, float))v24->m_currencyLabel->setScale)( v24->m_currencyLabel, 0.60000002); m_type = v24->m_type; v75 = 4LL * (m_type == Diamond) + 23; v76 = 26; if ( (v75 | 7) != 0x17 ) v76 = (v75 | 7) + 1; v77 = operator new(v76); v78 = "currencyOrbIcon_001.png"; v127 = (void *)"currencyOrbIcon_001.png"; if ( m_type == Diamond ) v78 = "currencyDiamondIcon_001.png"; v79 = v77; memcpy(v77, v78, v75); v79[v75] = 0; v142 = v79; v80 = cocos2d::CCSprite::createWithSpriteFrameName(v79); ((void (__fastcall *)(GJShopLayer *, cocos2d::CCSprite *, __int64))v24->addChild_0)(v24, v80, 3); v81 = (unsigned __int64 *)((__int64 (__fastcall *)(CCCounterLabel *))v24->m_currencyLabel->getPosition)(v24->m_currencyLabel); sub_10028CBE0((float *)&v138, 13.0, -0.5); sub_10028CCE0((double *)__dst.i64, v81, &v138); ((void (__fastcall *)(cocos2d::CCSprite *, __m128 *))v80->setPosition)(v80, &__dst); v82 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v82->setTotalParticles)(v82, 8); __dst = (__m128)xmmword_1008179B0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v82->setStartColor)(v82, &__dst); __dst = _mm_loadh_ps((const double *)&qword_100819A30); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v82->setEndColor)(v82, &__dst); __dst = 0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v82->setStartColorVar)(v82, &__dst); __dst = 0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v82->setEndColorVar)(v82, &__dst); v83 = v82->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v134 = 1.0; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))v83->setLife)(v82); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v82->setLifeVar)(v82, 0.2); sub_10028CBE0(__dst.f32, 12.0, 10.0); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v82->setPosVar)(v82, &__dst); ((void (__fastcall *)(GJShopLayer *, cocos2d::CCParticleSystemQuad *, __int64))v24->addChild_0)( v24, v82, 100); v84 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v80->getPosition)(v80); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v82->setPosition)(v82, v84); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v82->setPositionType)(v82, 2); cocos2d::CCParticleSystem::resetSystem(v82); v122 = (cocos2d::CCArray *)sub_10071F9E0(v82, 2); m_storeItemArray = GameStatsManager::sharedState()->m_storeItemArray; v133 = sub_10071F9E0(v82, 2); v86 = GameManager::sharedState(); v87 = "7"; v88 = 0; if ( GameManager::getUGV(v86, "7") ) { while ( v88 < (unsigned int)sub_100720070(m_storeItemArray) ) { v87 = (const char *)v88; v89 = sub_1007200C0(m_storeItemArray, v88); if ( v24->m_type == *(_DWORD *)(v89 + 364) ) { v87 = (const char *)v89; sub_10071FCD0(v133, v89); } ++v88; } } else { while ( v88 < (unsigned int)sub_100720070(m_storeItemArray) ) { v87 = (const char *)v88; v90 = (const char *)sub_1007200C0(m_storeItemArray, v88); v91 = v24->m_type; if ( v91 == *((_DWORD *)v90 + 91) && (v91 != Secret || *((_DWORD *)v90 + 79) - *((_DWORD *)v90 + 80) != 20) ) { v87 = v90; sub_10071FCD0(v133, v90); } ++v88; } } v92 = cocos2d::CCDictionary::create(); v24->m_shopItems = v92; cocos2d::CCObject::retain(v92); cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v119 = sub_10071F9E0("playerSquare_001.png", v87); v93 = (char *)v127; if ( v139 == Diamond ) v93 = "currencyDiamondIcon_001.png"; v127 = v93; __n = 4LL * (v139 == Diamond) + 23; if ( v139 != Diamond ) v134 = 0.0; v94 = 26; if ( (__n | 7) != 0x17 ) v94 = (__n | 7) + 1; __sz = v94; v126 = 0; while ( 1 ) { v95 = sub_100720070(v133); if ( (unsigned int)v126 >= v95 ) break; v96 = (cocos2d::CCTextureCache *)sub_1007200C0(v133, v126); v97 = v96[4].m_unknown2 - v96[4].m_nZOrder; v98 = v96[4].m_unknown5 - LODWORD(v96[4].m_pTextures); v99 = v96; v100 = GameStatsManager::sharedState(); isStoreItemUnlocked = GameStatsManager::isStoreItemUnlocked( v100, v99[4].m_eObjType - v99[4].m_uIndexInArray); v135 = v99; v145 = GJItemIcon::unlockedColorForType(v139); StoreItem = GJItemIcon::createStoreItem(v98, v97, isStoreItemUnlocked, v145); ((void (__fastcall *)(GJItemIcon *, float))StoreItem->setScale)(StoreItem, 1.1); v103 = CCMenuItemSpriteExtra::create( StoreItem, nullptr, v140, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJShopLayer::onSelectItem); CCMenuItemSpriteExtra::setSizeMult(v103, 2.0); sub_10071FCD0(v122, v103); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v103->setTag)( v103, (unsigned int)(v135[4].m_eObjType - v135[4].m_uIndexInArray)); ((void (__fastcall *)(GJItemIcon *, _QWORD))StoreItem->setTag)(StoreItem, (unsigned int)v98); if ( (unsigned int)v98 > 9 || (v104 = 770, !_bittest(&v104, v98)) ) sub_10071FCD0(v119, v103); if ( isStoreItemUnlocked ) { ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v103->setEnabled)(v103, 0); GJItemIcon::darkenStoreItem_1(StoreItem, v140->m_type); } else { GameToolbox::pointsToString(&__dst); v105 = &__dst.i8[1]; if ( (__dst.i8[0] & 1) != 0 ) v105 = (const char *)__p; v106 = cocos2d::CCLabelBMFont::create_3(v105, "bigFont.fnt"); ((void (__fastcall *)(GJItemIcon *, cocos2d::CCLabelBMFont *))StoreItem->addChild)(StoreItem, v106); v107 = (float *)((__int64 (__fastcall *)(GJItemIcon *))StoreItem->getContentSize)(StoreItem); sub_10028CBE0((float *)&v138, (float)(*v107 * 0.5) + -4.0, -6.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v106->setPosition)(v106, &v138); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v106->setScale)(v106, 0.34999999); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v106->setTag)(v106, 1234); v108 = operator new(__sz); v109 = __n; v110 = v108; memcpy(v108, v127, __n); v110[v109] = 0; v123 = v110; v111 = cocos2d::CCSprite::createWithSpriteFrameName(v110); ((void (__fastcall *)(GJItemIcon *, cocos2d::CCSprite *))StoreItem->addChild)(StoreItem, v111); v112 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v106->getPosition)(v106); v125 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v106->getContentSize)(v106); v113 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v106->getScale)(v106); sub_10028CBE0((float *)&v131, (float)((float)((float)(v125 * 0.5) * v113) + 6.0) + v134, -0.5); sub_10028CCE0((double *)&v138, v112, &v131); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v111->setPosition)(v111, &v138); ((void (__fastcall *)(cocos2d::CCSprite *, float))v111->setScale)(v111, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v111->setTag)(v111, 1234); operator delete(v123); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); } cocos2d::CCDictionary::setObject( v140->m_shopItems, v103, (int)v135[4].m_eObjType - (__int64)v135[4].m_uIndexInArray); v126 = (unsigned int)(v126 + 1); v24 = v140; } sub_10028CBE0((float *)&v138, v136 * 0.5, 93.0); sub_10028CC60(&__dst, (double *)&v138); v115 = ListButtonBar::create( v122, (cocos2d::CCPoint)1103626240LL, (int)&__dst, 4, 15.0, 60.0, 221.0, v114, 2); ((void (__fastcall *)(GJShopLayer *, ListButtonBar *, __int64))v24->addChild_0)(v24, v115, 100); v115->m_useMoveAnimation = 1; m_scrollLayer = v115->m_scrollLayer; m_scrollLayer->m_unkFloat2 = 0.60000002; ((void (__fastcall *)(BoomScrollLayer *, __int64))m_scrollLayer->setTouchEnabled)(m_scrollLayer, 1); ListButtonBar::goToPage(v115, 0); v115->m_scrollLayer->m_doVisit = 1; sub_10028CBF0((float *)&v131, 406.0, 200.0); v117 = v115->m_scrollLayer; sub_10028CC00( (__int64)&__dst, *(float *)&v138 - (float)(*(float *)&v131 * 0.5), *((float *)&v138 + 1) - (float)(0.5 * *((float *)&v131 + 1)), (__m128)(unsigned int)v131, (__m128)HIDWORD(v131)); sub_10028D1A0((__m128 *)&v117->m_clippingRect, (unsigned __int64 *)&__dst); operator delete(v142); if ( (*(_BYTE *)&v128.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v128.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v130.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_131: if ( (*(_BYTE *)&v129.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_132; goto LABEL_138; } } else if ( (*(_BYTE *)&v130.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_131; } operator delete(v130.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v129.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_132: if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 ) return v141; LABEL_133: operator delete(__src.__r_.__value_.__l.__data_); return v141; } LABEL_138: operator delete(v129.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 ) return v141; goto LABEL_133; } if ( (*(_BYTE *)&v129.__r_.__value_.__s.0 & 1) != 0 ) v42 = v129.__r_.__value_.__l.__data_; v43 = strlen(v42); if ( v43 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(COERCE_DOUBLE(1036831949)); v44 = v43; if ( v43 >= 0x17 ) { v47 = 26; if ( (v43 | 7) != 0x17 ) v47 = (v43 | 7) + 1; v45 = (__int8 *)operator new(v47); __p = v45; __dst.i64[0] = v47 | 1; __dst.i64[1] = v44; v24 = v140; } else { __dst.i8[0] = 2 * v43; v45 = &__dst.i8[1]; if ( !v43 ) goto LABEL_76; } memmove(v45, v42, v44); LABEL_76: v45[v44] = 0; v46 = (CCSpriteWithHue *)CCSpriteWithHue::createWithSpriteFrameName(&__dst); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); CCSpriteWithHue::setHueDegrees(v46, -120.0); goto LABEL_79; } if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) data = __src.__r_.__value_.__l.__data_; v26 = strlen(data); if ( v26 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v146); v27 = v26; if ( v26 >= 0x17 ) { v30 = 26; if ( (v26 | 7) != 0x17 ) v30 = (v26 | 7) + 1; v28 = (__int8 *)operator new(v30); __p = v28; __dst.i64[0] = v30 | 1; __dst.i64[1] = v27; } else { __dst.i8[0] = 2 * v26; v28 = &__dst.i8[1]; if ( !v26 ) goto LABEL_56; } memmove(v28, data, v27); LABEL_56: v28[v27] = 0; v29 = (CCSpriteWithHue *)CCSpriteWithHue::createWithSpriteFrameName(&__dst); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); CCSpriteWithHue::setHueDegrees(v29, -110.0); __dst.i8[2] = -16; __dst.i16[0] = 240; ((void (__fastcall *)(CCSpriteWithHue *, __m128 *))v29->setColor)(v29, &__dst); goto LABEL_59; } } else { __dst = 0; __p = nullptr; __dst.i8[0] = 2 * v19; v20 = &__dst.i8[1]; v21 = &__dst.i8[1]; if ( !v18 ) goto LABEL_38; if ( (v17 & 1) != 0 ) goto LABEL_32; } p_shortStorage = &v140->m_sheetName.m_data.m_short.shortStorage; goto LABEL_37; } } else { v5 = 0.0; __dst = 0; __p = nullptr; __dst.i8[0] = 2 * v10; v11 = &__dst.i8[1]; v12 = &__dst.i8[1]; if ( !size ) goto LABEL_21; if ( (sizex2 & 1) != 0 ) goto LABEL_15; } longStorage = &v140->m_sheetName.m_data.m_short.shortStorage; goto LABEL_20; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source