// // SecretRewardsLayer::init from 0x1006300a0 to 0x100631fcf (7983 bytes) // // 1 xrefs: // > SecretRewardsLayer::create @ 0x10063005b // // 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 SecretRewardsLayer::init(SecretRewardsLayer *a1, bool a2) { __m128 v2; // xmm0 bool result; // al cocos2d::CCTextureCache *v4; // rax cocos2d::CCSpriteFrameCache *v5; // rax SecretRewardsLayer_vtbl *v6; // rax GameManager *v7; // rax GameManager *v8; // rax GameManager *v9; // rax cocos2d::CCLayer *v10; // rax cocos2d::CCObject *v11; // r12 cocos2d::CCSprite *v12; // rbx cocos2d::CCObject_vtbl *v13; // rbx cocos2d::CCObject_vtbl *v14; // rdi cocos2d::CCSprite *v15; // r14 cocos2d::CCSprite *v16; // rbx cocos2d::CCSprite *v17; // rax CCMenuItemSpriteExtra *v18; // rbx int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d __int64 v23; // r14 cocos2d::CCDirector *v24; // rax cocos2d::CCDirector *v25; // rax float v26; // xmm1_4 GameStatsManager *v27; // rax cocos2d::CCString *v28; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v30; // r14 __int64 v31; // r14 cocos2d::CCSprite *v32; // rax __int64 v33; // r14 unsigned __int64 *v34; // r15 GameStatsManager *v35; // rax cocos2d::CCString *v36; // rax const char *v37; // rax cocos2d::CCLabelBMFont *v38; // rbx __int64 v39; // rax __int64 v40; // rbx cocos2d::CCSprite *v41; // rax __int64 v42; // rbx unsigned __int64 *v43; // r14 cocos2d::CCSprite *v44; // rbx cocos2d::CCSprite *v45; // rbx cocos2d::CCDictionary *v46; // rax const cocos2d::CCPoint *v47; // r14 __m128 v48; // xmm0 unsigned int v49; // ebx cocos2d::CCArray *v50; // r12 unsigned int v51; // eax cocos2d::CCLayer *v52; // r14 cocos2d::CCMenu *v53; // r15 cocos2d::CCLayer *v54; // rsi unsigned __int64 v55; // rcx unsigned __int8 v56; // r14 cocos2d::CCString *v57; // rax const char *v58; // rax cocos2d::CCSprite *v59; // rbx double v60; // xmm0_8 unsigned int v61; // ebx cocos2d::CCString *v62; // rax const char *v63; // r12 size_t v64; // rax std::string::size_type v65; // r15 char *data; // r13 size_t v67; // r14 _BYTE *v68; // rsi cocos2d::CCString *v69; // rax const char *v70; // r15 size_t v71; // rax std::string::size_type v72; // r12 char *v73; // r13 const cocos2d::CCPoint *v74; // rax bool isSpecialChestUnlocked; // r13 const cocos2d::CCPoint *v76; // r12 size_t v77; // r14 int v78; // r15d cocos2d::CCString *v79; // rax const char *v80; // rax GameStatsManager *v81; // rax void *v82; // rdi int v83; // xmm0_4 GameStatsManager *v84; // rax GameStatsManager *v85; // rax GJChestSprite *v86; // r15 CCMenuItemSpriteExtra *v87; // rbx __int64 v88; // rax GJChestSprite *v89; // r15 __int64 v90; // rax unsigned int *v91; // rax _QWORD *v92; // r14 unsigned __int64 v93; // r12 __int64 v94; // r15 cocos2d::CCSprite *v95; // r15 const char *v96; // rdi cocos2d::CCSprite *v97; // rbx unsigned __int64 *v98; // r15 GameStatsManager *v99; // rax int v100; // r15d GameStatsManager *v101; // rax int v102; // r13d cocos2d::CCString *v103; // rax const char *v104; // rax cocos2d::CCLabelBMFont *v105; // r12 unsigned __int64 *v106; // rbx int v107; // eax cocos2d::CCLabelBMFont *v108; // rax cocos2d::CCLabelBMFont *m_chestLabel; // rbx cocos2d::CCSprite *v110; // rbx const cocos2d::CCPoint *v111; // r14 cocos2d::CCLayer *v112; // rbx cocos2d::CCMenu *v113; // r15 GJChestSprite *v114; // r12 CCMenuItemSpriteExtra *v115; // r14 double v116; // xmm0_8 __int64 v117; // rax GameStatsManager *v118; // rax GJChestSprite *v119; // r15 __int64 v120; // rax unsigned int *v121; // rax _QWORD *v122; // r13 _QWORD *v123; // r15 __int64 v124; // r12 cocos2d::CCSprite *v125; // r14 cocos2d::CCSprite *v126; // r15 unsigned __int64 *v127; // r14 cocos2d::CCLabelBMFont *v128; // rax SecretRewardsLayer *v129; // r12 cocos2d::CCSprite *m_goldPriceSprite; // r14 cocos2d::CCLayer *v131; // rbx cocos2d::CCMenu *v132; // rsi cocos2d::CCLayer_vtbl *v133; // rax int v134; // r12d float v135; // xmm0_4 const std::string::value_type *v136; // rsi const char *v137; // rdi cocos2d::CCSprite *v138; // r15 CCMenuItemSpriteExtra *v139; // r14 float v140; // xmm0_4 const char *v141; // rdi cocos2d::CCSprite *v142; // r14 const char *v143; // rdi cocos2d::CCSprite *v144; // r14 const char *v145; // rdi cocos2d::CCSprite *v146; // r14 const char *v147; // rdi cocos2d::CCSprite *v148; // r14 const char *v149; // rdi cocos2d::CCSprite *v150; // r14 const char *v151; // rdi cocos2d::CCSprite *v152; // r14 BoomScrollLayer *v153; // rax cocos2d::CCObject *v154; // r15 BoomScrollLayer *v155; // rbx cocos2d::CCDirector *v156; // rax float v157; // xmm1_4 __m128 v158; // xmm0 __int64 v159; // rbx cocos2d::CCDirector *v160; // rax cocos2d::CCDirector *v161; // rax cocos2d::CCMenu *v162; // rbx cocos2d::CCSprite *v163; // rax CCMenuItemSpriteExtra *v164; // rax __int64 v165; // r12 cocos2d::CCDirector *v166; // rax cocos2d::CCSprite *v167; // r14 CCMenuItemSpriteExtra *v168; // rax __int64 v169; // r14 cocos2d::CCDirector *v170; // rax int TotalPages; // eax int v172; // ebx char v173; // [rsp+0h] [rbp-170h] char v174; // [rsp+0h] [rbp-170h] char v175; // [rsp+0h] [rbp-170h] char v176; // [rsp+0h] [rbp-170h] char v177; // [rsp+8h] [rbp-168h] BYREF char v178[15]; // [rsp+9h] [rbp-167h] BYREF void *v179; // [rsp+18h] [rbp-158h] char v180; // [rsp+20h] [rbp-150h] BYREF char v181[15]; // [rsp+21h] [rbp-14Fh] BYREF void *v182; // [rsp+30h] [rbp-140h] char v183; // [rsp+38h] [rbp-138h] BYREF char v184[15]; // [rsp+39h] [rbp-137h] BYREF void *v185; // [rsp+48h] [rbp-128h] std::string __str; // [rsp+50h] [rbp-120h] BYREF unsigned __int64 v187; // [rsp+68h] [rbp-108h] BYREF unsigned __int8 v188; // [rsp+70h] [rbp-100h] BYREF _BYTE v189[23]; // [rsp+71h] [rbp-FFh] BYREF std::string v190; // [rsp+88h] [rbp-E8h] BYREF __int64 v191; // [rsp+A0h] [rbp-D0h] _BOOL4 v192; // [rsp+ACh] [rbp-C4h] __int64 v193; // [rsp+B0h] [rbp-C0h] cocos2d::CCArray *v194; // [rsp+B8h] [rbp-B8h] unsigned __int64 v195; // [rsp+C0h] [rbp-B0h] BYREF intptr_t v196; // [rsp+C8h] [rbp-A8h] unsigned __int64 v197; // [rsp+D0h] [rbp-A0h] BYREF unsigned __int64 v198; // [rsp+D8h] [rbp-98h] BYREF __int64 v199; // [rsp+E0h] [rbp-90h] __int64 v200; // [rsp+E8h] [rbp-88h] std::string v201; // [rsp+F0h] [rbp-80h] BYREF SecretRewardsLayer *v202; // [rsp+108h] [rbp-68h] bool v203; // [rsp+117h] [rbp-59h] std::string __dst; // [rsp+118h] [rbp-58h] BYREF const cocos2d::CCPoint *v205; // [rsp+130h] [rbp-40h] unsigned __int64 v206; // [rsp+138h] [rbp-38h] BYREF float v207; // [rsp+140h] [rbp-30h] BYREF float v208; // [rsp+144h] [rbp-2Ch] double v209; // 0:xmm0_8.8 double v210; // 0:xmm0_8.8 double v211; // 0:xmm0_8.8 result = cocos2d::CCLayer::init(a1); if ( !result ) return result; v203 = result; a1->m_inMainLayer = 1; v4 = cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v4, "TreasureRoomSheet.png", 0); v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v5, "TreasureRoomSheet.plist"); ((void (__fastcall *)(SecretRewardsLayer *, __int64))a1->setKeypadEnabled)(a1, 1); v6 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v202 = a1; ((void (__fastcall *)(SecretRewardsLayer *, __int64))v6->setKeyboardEnabled)(a1, 1); cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)v2.f32 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v207); v7 = GameManager::sharedState(); if ( GameManager::getUGV(v7, "10") ) v202->m_scratchDialogIndex = 4; v8 = GameManager::sharedState(); if ( GameManager::getUGV(v8, "21") ) v202->m_potborDialogIndex = 3; v9 = GameManager::sharedState(); v188 = 28; strcpy(v189, "secretLoop.mp3"); GameManager::fadeInMusic(v2, (__int64)v9, &v188); v192 = a2; if ( (v188 & 1) != 0 ) operator delete(*(void **)&v189[15]); v10 = cocos2d::CCLayer::create(); v11 = v202; v202->m_mainLayer = v10; ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCLayer *, _QWORD))v11->__vftable[5].encodeWithCoder)(v11, v10, 0); v12 = cocos2d::CCSprite::create_1("GJ_gradientBG.png"); v11[10].__vftable = (cocos2d::CCObject_vtbl *)v12; sub_10028CBE0((float *)&__dst, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v12->setAnchorPoint)(v12, &__dst); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCObject_vtbl *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v11[10].__vftable, 4294967293LL); (*((void (__fastcall **)(cocos2d::CCObject_vtbl *, float))v11[10].copyWithZone + 16))( v11[10].__vftable, (float)(v207 + 10.0) / *(float *)&v11[10].__vftable[5].acceptVisitor); (*((void (__fastcall **)(cocos2d::CCObject_vtbl *, float))v11[10].copyWithZone + 18))( v11[10].__vftable, (float)(v208 + 10.0) / *((float *)&v11[10].__vftable[5].acceptVisitor + 1)); v13 = v11[10].__vftable; sub_10028CBE0((float *)&__dst, -5.0, -5.0); (*((void (__fastcall **)(cocos2d::CCObject_vtbl *, std::string *))v13->copyWithZone + 23))(v13, &__dst); v14 = v11[10].__vftable; __dst.__r_.__value_.__s.__data_[1] = 75; *(_WORD *)&__dst.__r_.__value_.__l.0 = 70; (*((void (__fastcall **)(cocos2d::CCObject_vtbl *, std::string *))v14->copyWithZone + 118))(v14, &__dst); v15 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomSpiderweb_001.png"); sub_10028CBE0((float *)&__dst, 1.0, 1.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v15->setAnchorPoint)(v15, &__dst); sub_10028CBE0((float *)&__dst, v207 + 5.0, v208 + 5.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v15->setPosition)(v15, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v15->setOpacity)(v15, 63); __dst.__r_.__value_.__s.__data_[1] = 0; *(_WORD *)&__dst.__r_.__value_.__l.0 = 0; ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v15->setColor)(v15, &__dst); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v15, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v15->setScale)(v15, 1.1); v16 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomSpiderweb_001.png"); sub_10028CBE0((float *)&__dst, 0.0, 1.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v16->setAnchorPoint)(v16, &__dst); sub_10028CBE0((float *)&__dst, -5.0, v208 + 5.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v16->setPosition)(v16, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v16->setOpacity)(v16, 63); cocos2d::CCSprite::setFlipX(v16, 1); __dst.__r_.__value_.__s.__data_[1] = 0; *(_WORD *)&__dst.__r_.__value_.__l.0 = 0; ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v16->setColor)(v16, &__dst); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v16, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v16->setScale)(v16, 1.1); v17 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); *(_QWORD *)&v11[9].m_uAutoReleaseCount = v17; v18 = CCMenuItemSpriteExtra::create( v17, nullptr, v11, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onBack); CCMenuItemSpriteExtra::setSizeMult(v18, 1.6); v23 = sub_100792C50((_DWORD)v18, 0, v19, v20, v21, v22); ((void (__fastcall *)(cocos2d::CCObject *, __int64, __int64))v11->__vftable[5].encodeWithCoder)(v11, v23, 1); v24 = cocos2d::CCDirector::sharedDirector(); *(float *)&v205 = sub_100484D90((__int64)v24) + 24.0; v25 = cocos2d::CCDirector::sharedDirector(); v26 = sub_100484D70((__int64)v25) + -23.0; sub_10028CBE0((float *)&__dst, *(float *)&v205, v26); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v23 + 184LL))(v23, &__dst); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton((cocos2d::CCLayer *)v11, v18); v27 = GameStatsManager::sharedState(); GameStatsManager::getStat(v27, "21"); v28 = (cocos2d::CCString *)sub_1007AB580("%i", v173); CString = cocos2d::CCString::getCString(v28); v30 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt"); *(_QWORD *)&v11[8].m_uAutoReleaseCount = v30; sub_10028CBE0((float *)&__dst, v207 + -55.0, v208 + -18.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v30->setPosition)(v30, &__dst); v31 = *(_QWORD *)&v11[8].m_uAutoReleaseCount; sub_10028CBE0((float *)&__dst, 1.0, 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v31 + 280LL))(v31, &__dst); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)&v11[8].m_uAutoReleaseCount + 160LL))( *(_QWORD *)&v11[8].m_uAutoReleaseCount, 0.60000002); ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v11->__vftable[5].update)( v11, *(_QWORD *)&v11[8].m_uAutoReleaseCount); v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigKey_001.png"); *(_QWORD *)&v11[8].m_unknown2 = v32; ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v32, 3); v33 = *(_QWORD *)&v11[8].m_unknown2; v34 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&v11[8].m_uAutoReleaseCount + 192LL))(*(_QWORD *)&v11[8].m_uAutoReleaseCount); sub_10028CBE0((float *)&v201, 25.0, -0.5); sub_10028CCE0((double *)&__dst, v34, (unsigned __int64 *)&v201); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v33 + 184LL))(v33, &__dst); v35 = GameStatsManager::sharedState(); GameStatsManager::getStat(v35, "43"); v36 = (cocos2d::CCString *)sub_1007AB580("%i", v174); v37 = cocos2d::CCString::getCString(v36); v38 = cocos2d::CCLabelBMFont::create_3(v37, "bigFont.fnt"); *(_QWORD *)&v11[8].m_uIndexInArray = v38; v39 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&v11[8].m_uAutoReleaseCount + 192LL))(*(_QWORD *)&v11[8].m_uAutoReleaseCount); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v38->setPosition)(v38, v39); v40 = *(_QWORD *)&v11[8].m_uIndexInArray; sub_10028CBE0((float *)&__dst, 1.0, 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v40 + 280LL))(v40, &__dst); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)&v11[8].m_uIndexInArray + 160LL))( *(_QWORD *)&v11[8].m_uIndexInArray, 0.60000002); ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v11->__vftable[5].update)(v11, *(_QWORD *)&v11[8].m_uIndexInArray); v41 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigGoldKey_001.png"); *(_QWORD *)&v11[8].m_uOrderOfArrival = v41; ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v41, 3); v42 = *(_QWORD *)&v11[8].m_uOrderOfArrival; v43 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&v11[8].m_uIndexInArray + 192LL))(*(_QWORD *)&v11[8].m_uIndexInArray); sub_10028CBE0((float *)&v201, 25.0, -0.5); sub_10028CCE0((double *)&__dst, v43, (unsigned __int64 *)&v201); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v42 + 184LL))(v42, &__dst); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&v11[8].m_uIndexInArray + 328LL))( *(_QWORD *)&v11[8].m_uIndexInArray, 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&v11[8].m_uOrderOfArrival + 328LL))( *(_QWORD *)&v11[8].m_uOrderOfArrival, 0); v44 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomLabel_001.png"); (*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)&v11[7].m_uIndexInArray + 448LL))( *(_QWORD *)&v11[7].m_uIndexInArray, v44, 2); sub_10028CBE0((float *)&__dst, v207 * 0.5, v208 + -42.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v44->setPosition)(v44, &__dst); v45 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomGround_001.png"); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))v11->__vftable[5].encodeWithCoder)( v11, v45, 2); sub_10028CBE0((float *)&__dst, 0.0, 1.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v45->setAnchorPoint)(v45, &__dst); sub_10028CBE0((float *)&__dst, -10.0, 35.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v45->setPosition)(v45, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v45->setBlendFunc)(v45, 0x100000302LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v45->setScale)(v45, (float)(v207 + 20.0) / v45->m_obRect.size.width); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v45->setOpacity)(v45, 150); v194 = (cocos2d::CCArray *)sub_10071F9E0(v45, 150); v191 = sub_10071F9E0(v45, 150); v46 = cocos2d::CCDictionary::create(); *(_QWORD *)&v11[8].m_nTag = v46; cocos2d::CCObject::retain(v46); v47 = nullptr; do { v48 = 0; v48.f32[0] = (float)(int)v47 / 3.0; *(float *)&v196 = _mm_round_ss(v48, v48, 9).f32[0]; v49 = (int)*(float *)&v196; v50 = v194; v51 = sub_100720070(v194); v205 = v47; if ( v51 < v49 + 1 ) { v52 = cocos2d::CCLayer::create(); v53 = cocos2d::CCMenu::create(); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *))v52->addChild)(v52, v53); v54 = v52; v47 = v205; sub_10071FCD0(v50, v54); sub_10071FCD0(v191, v53); } v199 = sub_1007200C0(v50, v49); v193 = sub_1007200C0(v191, v49); v55 = (unsigned __int64)v47; v56 = (unsigned __int8)v47 % 3u; if ( v56 == 0 && v55 < 6 ) { v57 = (cocos2d::CCString *)sub_1007AB580("tier%ilabel_001.png", v175); v58 = cocos2d::CCString::getCString(v57); v59 = cocos2d::CCSprite::createWithSpriteFrameName(v58); (*(void (__fastcall **)(__int64, cocos2d::CCSprite *, __int64))(*(_QWORD *)v199 + 448LL))(v199, v59, 2); sub_10028CBE0((float *)&__dst, v207 * 0.5, (float)(v208 * 0.5) + 70.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v59->setPosition)(v59, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, float))v59->setScale)(v59, 0.80000001); } HIDWORD(v60) = 0; *(float *)&v60 = (float)((float)(v56 - 1) * 100.0) + (float)(v207 * 0.5); sub_10028CBE0((float *)&v195, *(float *)&v60, (float)(v208 * 0.5) + 10.0); v196 = (intptr_t)v205 + 3; v61 = (_DWORD)v205 + 3; if ( (unsigned __int64)v205 >= 6 ) v61 = 2; v62 = (cocos2d::CCString *)sub_1007AB580("chest_0%i_price_001.png", v175); v63 = cocos2d::CCString::getCString(v62); v64 = strlen(v63); if ( v64 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v60); v65 = v64; v200 = v56; if ( v64 >= 0x17 ) { v67 = (v64 | 7) + 1; if ( (v64 | 7) == 0x17 ) v67 = 26; data = (char *)operator new(v67); __dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst.__r_.__value_.__r.__words[0] = v67 + 1; __dst.__r_.__value_.__l.__size_ = v65; LABEL_25: memmove(data, v63, v65); goto LABEL_26; } __dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v64); data = __dst.__r_.__value_.__s.__data_; if ( v64 ) goto LABEL_25; LABEL_26: data[v65] = 0; v68 = (_BYTE *)v61; v69 = (cocos2d::CCString *)sub_1007AB580("chest_0%i_02_001.png", v176); v70 = cocos2d::CCString::getCString(v69); v71 = strlen(v70); if ( v71 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v60); v72 = v71; if ( v71 >= 0x17 ) { v77 = (v71 | 7) + 1; if ( (v71 | 7) == 0x17 ) v77 = 26; v73 = (char *)operator new(v77); v201.__r_.__value_.__r.__words[2] = (std::string::size_type)v73; v201.__r_.__value_.__r.__words[0] = v77 | 1; v201.__r_.__value_.__l.__size_ = v72; } else { v201.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v71); v73 = v201.__r_.__value_.__s.__data_; if ( !v71 ) { v201.__r_.__value_.__s.__data_[0] = 0; v74 = v205; if ( (unsigned __int64)v205 <= 2 ) goto LABEL_30; goto LABEL_35; } } v68 = v70; memmove(v73, v70, v72); v73[v72] = 0; v74 = v205; if ( (unsigned __int64)v205 <= 2 ) { LABEL_30: BYTE2(v197) = -126; LOWORD(v197) = 14446; isSpecialChestUnlocked = 0; LODWORD(v200) = 1061997773; v76 = (const cocos2d::CCPoint *)v193; goto LABEL_48; } LABEL_35: memset(&v197, 100, 3); v76 = (const cocos2d::CCPoint *)v193; if ( (unsigned __int64)v74 >= 6 ) { BYTE2(v197) = -76; LOWORD(v197) = 100; v78 = v200; v79 = (cocos2d::CCString *)sub_1007AB580("chestSpecial_0%i_price_001.png", v175); v80 = cocos2d::CCString::getCString(v79); std::string::assign(&__dst, v80); if ( v78 ) { if ( v78 == 1 ) { v81 = GameStatsManager::sharedState(); v180 = 8; strcpy(v181, "0005"); v68 = &v180; isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((__int64)v81, (__int64)&v180, v60); if ( (v180 & 1) != 0 ) { v82 = v182; LABEL_45: operator delete(v82); } } else { v85 = GameStatsManager::sharedState(); v183 = 8; strcpy(v184, "0006"); v68 = &v183; isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((__int64)v85, (__int64)&v183, v60); if ( (v183 & 1) != 0 ) { v82 = v185; goto LABEL_45; } } } else { v84 = GameStatsManager::sharedState(); v177 = 8; strcpy(v178, "0004"); v68 = &v177; isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((__int64)v84, (__int64)&v177, v60); if ( (v177 & 1) != 0 ) { v82 = v179; goto LABEL_45; } } v83 = 1065353216; goto LABEL_47; } isSpecialChestUnlocked = 0; v83 = 1061997773; LABEL_47: LODWORD(v200) = v83; LABEL_48: v86 = GJChestSprite::create(v61); ((void (__fastcall *)(GJChestSprite *, _BYTE *, float))v86->setScale)(v86, v68, 0.60000002); v87 = CCMenuItemSpriteExtra::create( v86, nullptr, v202, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onChestType); __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28; strcpy(__str.__r_.__value_.__s.__data_, "chestClick.ogg"); std::string::operator=((std::string *)&v87->m_selectSound, &__str); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); sub_10028CBF0((float *)&v198, 60.000004, 48.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))v87->setContentSize)(v87, &v198); LODWORD(v193) = *(_DWORD *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v87->getContentSize)(v87); v88 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v87->getContentSize)(v87); sub_10028CBE0((float *)&v198, *(float *)&v193 * 0.5, *(float *)(v88 + 4) * 0.5); ((void (__fastcall *)(GJChestSprite *, unsigned __int64 *))v86->setPosition)(v86, &v198); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v76 + 440LL))(v76, v87); *(_WORD *)&v87->m_animationEnabled = 256; *(cocos2d::CCPoint *)&v209 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v198, v76); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v87->setPosition)(v87, &v198, v209); ((void (__fastcall *)(CCMenuItemSpriteExtra *, const cocos2d::CCPoint *))v87->setTag)(v87, v205); if ( isSpecialChestUnlocked ) { v89 = (GJChestSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v87->getNormalImage)(v87); GJChestSprite::switchToState(v89, Opened, 1); v90 = ((__int64 (__fastcall *)(GJChestSprite *))v89->getChildren)(v89); if ( v90 ) { v91 = *(unsigned int **)(v90 + 56); if ( *v91 ) { v92 = *((_QWORD **)v91 + 2); v93 = (unsigned __int64)&v92[*v91 - 1]; do { v94 = *v92; if ( !*v92 ) break; (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v94 + 896LL))(*v92, 100); BYTE2(v198) = -106; LOWORD(v198) = -26986; (*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v94 + 944LL))(v94, &v198); ++v92; } while ( (unsigned __int64)v92 <= v93 ); } } ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v87->setEnabled)(v87, 0); } v95 = cocos2d::CCSprite::createWithSpriteFrameName("chestPlatform_01_001.png"); (*(void (__fastcall **)(__int64, cocos2d::CCSprite *, __int64))(*(_QWORD *)v199 + 448LL))(v199, v95, 2); sub_10028CBE0((float *)&v206, 0.0, -34.0); sub_10028CCE0((double *)&v198, &v195, &v206); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v95->setPosition)(v95, &v198); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v95->setColor)(v95, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v95->setOpacity)(v95, 200); v96 = __dst.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) v96 = __dst.__r_.__value_.__l.__data_; v97 = cocos2d::CCSprite::createWithSpriteFrameName(v96); (*(void (__fastcall **)(__int64, cocos2d::CCSprite *, __int64))(*(_QWORD *)v199 + 448LL))(v199, v97, 2); v98 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v95->getPosition)(v95); sub_10028CBE0((float *)&v206, 0.0, -20.0); sub_10028CCE0((double *)&v198, v98, &v206); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v97->setPosition)(v97, &v198); ((void (__fastcall *)(cocos2d::CCSprite *, float))v97->setScale)(v97, *(float *)&v200); if ( (unsigned __int64)v205 > 5 ) { if ( v205 == (const cocos2d::CCPoint *)6 ) { sub_10028CBE0((float *)&v198, (float)(v207 * 0.5) + 10.0, (float)(v208 * 0.5) + 72.0); v108 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); v202->m_chestLabel = v108; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v108->setPosition)(v108, &v198); m_chestLabel = v202->m_chestLabel; sub_10028CBE0((float *)&v206, 1.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_chestLabel->setAnchorPoint)( m_chestLabel, &v206); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v202->m_chestLabel->setScale)(v202->m_chestLabel, 0.5); (*(void (__fastcall **)(__int64, cocos2d::CCLabelBMFont *))(*(_QWORD *)v199 + 440LL))(v199, v202->m_chestLabel); v110 = cocos2d::CCSprite::createWithSpriteFrameName("chest03_small_001.png"); (*(void (__fastcall **)(__int64, cocos2d::CCSprite *))(*(_QWORD *)v199 + 440LL))(v199, v110); sub_10028CBE0((float *)&v187, 22.0, 0.0); sub_10028CCE0((double *)&v206, &v198, &v187); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v110->setPosition)(v110, &v206); SecretRewardsLayer::updateUnlockedLabel(v202); } } else { v99 = GameStatsManager::sharedState(); v100 = GameStatsManager::countUnlockedSecretChests(v99, (GJRewardType)v196); v101 = GameStatsManager::sharedState(); v102 = GameStatsManager::countSecretChests(v101, (GJRewardType)v196); v103 = (cocos2d::CCString *)sub_1007AB580("%i / %i", v175); v104 = cocos2d::CCString::getCString(v103); v105 = cocos2d::CCLabelBMFont::create_3(v104, "bigFont.fnt"); (*(void (__fastcall **)(__int64, cocos2d::CCLabelBMFont *))(*(_QWORD *)v199 + 440LL))(v199, v105); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v105->setScale)(v105, 0.40000001); v106 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v97->getPosition)(v97); sub_10028CBE0((float *)&v206, 0.0, -35.0); sub_10028CCE0((double *)&v198, v106, &v206); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v105->setPosition)(v105, &v198); v107 = 65280; if ( v100 < v102 ) v107 = 7043771; LOWORD(v198) = v107; BYTE2(v198) = BYTE2(v107); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v105->setColor)(v105, &v198); cocos2d::CCDictionary::setObject(v202->m_chestCounters, v105, v196); } if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v201.__r_.__value_.__l.__data_); v111 = v205; if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_11; } else { v111 = v205; if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_11; } operator delete(__dst.__r_.__value_.__l.__data_); LABEL_11: v47 = (const cocos2d::CCPoint *)((char *)v111 + 1); } while ( v47 != (const cocos2d::CCPoint *)9 ); sub_10028CBE0((float *)&v195, v207 * 0.5, (float)(v208 * 0.5) + 12.0); v112 = cocos2d::CCLayer::create(); sub_10071FCD0(v194, v112); v113 = cocos2d::CCMenu::create(); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *))v112->addChild)(v112, v113); v114 = GJChestSprite::create(9); ((void (__fastcall *)(GJChestSprite *, float))v114->setScale)(v114, 0.72000003); v115 = CCMenuItemSpriteExtra::create( v114, nullptr, v202, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onGoldChest); v190.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28; strcpy(v190.__r_.__value_.__s.__data_, "chestClick.ogg"); std::string::operator=((std::string *)&v115->m_selectSound, &v190); if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v190.__r_.__value_.__l.__data_); *(float *)&v205 = ((float (__fastcall *)(GJChestSprite *))v114->getScale)(v114) * 100.0; v116 = ((double (__fastcall *)(GJChestSprite *))v114->getScale)(v114); sub_10028CBF0((float *)&__dst, *(float *)&v205, *(float *)&v116 * 80.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *))v115->setContentSize)(v115, &__dst); *(float *)&v205 = *(float *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v115->getContentSize)(v115) * 0.5; v117 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v115->getContentSize)(v115); sub_10028CBE0((float *)&__dst, *(float *)&v205, *(float *)(v117 + 4) * 0.5); ((void (__fastcall *)(GJChestSprite *, std::string *))v114->setPosition)(v114, &__dst); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v113->addChild)(v113, v115); *(_WORD *)&v115->m_animationEnabled = 256; *(cocos2d::CCPoint *)&v210 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&__dst, (const cocos2d::CCPoint *)v113); ((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v115->setPosition)(v115, &__dst, v210); v118 = GameStatsManager::sharedState(); if ( !GameStatsManager::getNextGoldChestID(v118) ) { v119 = (GJChestSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v115->getNormalImage)(v115); GJChestSprite::switchToState(v119, Opened, 1); v120 = ((__int64 (__fastcall *)(GJChestSprite *))v119->getChildren)(v119); if ( v120 ) { v121 = *(unsigned int **)(v120 + 56); if ( *v121 ) { v122 = *((_QWORD **)v121 + 2); v123 = &v122[*v121 - 1]; do { v124 = *v122; if ( !*v122 ) break; (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v124 + 896LL))(*v122, 100); __dst.__r_.__value_.__s.__data_[1] = -106; *(_WORD *)&__dst.__r_.__value_.__l.0 = -26986; (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v124 + 944LL))(v124, &__dst); ++v122; } while ( v122 <= v123 ); } } ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v115->setEnabled)(v115, 0); } v125 = cocos2d::CCSprite::createWithSpriteFrameName("chestPlatform_01_001.png"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v112->addChild_0)(v112, v125, 2); sub_10028CBE0((float *)&v201, 0.0, -40.800003); sub_10028CCE0((double *)&__dst, &v195, (unsigned __int64 *)&v201); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v125->setPosition)(v125, &__dst); qmemcpy(&__dst, "\\Pg", 3); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v125->setColor)(v125, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v125->setOpacity)(v125, 200); ((void (__fastcall *)(cocos2d::CCSprite *, float))v125->setScale)(v125, 1.2); v126 = cocos2d::CCSprite::createWithSpriteFrameName("chest_09_price_001.png"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v112->addChild_0)(v112, v126, 2); v127 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v125->getPosition)(v125); sub_10028CBE0((float *)&v201, 0.0, -24.0); sub_10028CCE0((double *)&__dst, v127, (unsigned __int64 *)&v201); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v126->setPosition)(v126, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, float))v126->setScale)(v126, 0.96000004); sub_10028CBE0((float *)&v198, v207 * 0.5, (float)(v208 * 0.5) + 72.0); v128 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); v129 = v202; v202->m_goldPriceSprite = (cocos2d::CCSprite *)v128; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v128->setPosition)(v128, &v198); m_goldPriceSprite = v129->m_goldPriceSprite; sub_10028CBE0((float *)&__dst, 0.5, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))m_goldPriceSprite->setAnchorPoint)( m_goldPriceSprite, &__dst); ((void (__fastcall *)(cocos2d::CCSprite *, float))v129->m_goldPriceSprite->setScale)(v129->m_goldPriceSprite, 0.5); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v112->addChild)(v112, v129->m_goldPriceSprite); SecretRewardsLayer::updateUnlockedGoldLabel(v129); v131 = cocos2d::CCLayer::create(); sub_10071FCD0(v194, v131); v132 = cocos2d::CCMenu::create(); v133 = v131->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v205 = (const cocos2d::CCPoint *)v132; ((void (__fastcall *)(cocos2d::CCLayer *))v133->addChild)(v131); v134 = 0; while ( 2 ) { v135 = (float)v134++; *(float *)&v199 = (float)(v135 * 70.0) + -105.0; strcpy((char *)&__dst, "\"shopRope2_001.png"); strcpy((char *)&v201, "&shopRope2_2_001.png"); switch ( v134 ) { case 4: std::string::assign(&__dst, "shopRope5_001.png"); v136 = "shopRope5_2_001.png"; goto LABEL_87; case 3: std::string::assign(&__dst, "shopRope4_001.png"); v136 = "shopRope4_2_001.png"; LABEL_87: std::string::assign(&v201, v136); break; case 2: std::string::assign(&__dst, "shopRope3_001.png"); v136 = "shopRope3_2_001.png"; goto LABEL_87; } v137 = __dst.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) v137 = __dst.__r_.__value_.__l.__data_; v138 = cocos2d::CCSprite::createWithSpriteFrameName(v137); v139 = CCMenuItemSpriteExtra::create( v138, nullptr, v202, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onShop); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v139->setTag)(v139, (unsigned int)v134); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v205 + 440LL))(v205, v139); CCMenuItemSpriteExtra::setSizeMult(v139, 1.5); sub_10028CBE0((float *)&v187, *(float *)&v199 + (float)(v207 * 0.5), v208 + -100.0); *(cocos2d::CCPoint *)&v211 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v206, v205); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v139->setPosition)(v139, &v206, v211); CCMenuItemSpriteExtra::useAnimationType(v139, Move); sub_10028CBE0((float *)&v206, 0.0, -15.0); sub_10028CC90(&v139->m_offset, (double *)&v206); *(_QWORD *)&v139->m_duration = 0x3E99999A3E99999ALL; sub_10028CBE0((float *)&v206, 25.0, 76.0); if ( v134 == 3 ) { v140 = *(float *)&v206 + -3.5; LABEL_94: *(float *)&v206 = v140; } else if ( v134 == 2 ) { v140 = *(float *)&v206 + -2.25; goto LABEL_94; } v141 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v141 = v201.__r_.__value_.__l.__data_; v142 = cocos2d::CCSprite::createWithSpriteFrameName(v141); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v142); sub_10028CBE0((float *)&v197, 0.0, 0.0); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v142->setPosition)(v142, &v187); v143 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v143 = v201.__r_.__value_.__l.__data_; v144 = cocos2d::CCSprite::createWithSpriteFrameName(v143); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v144); sub_10028CBE0((float *)&v197, 0.0, 20.5); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v144->setPosition)(v144, &v187); v145 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v145 = v201.__r_.__value_.__l.__data_; v146 = cocos2d::CCSprite::createWithSpriteFrameName(v145); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v146); sub_10028CBE0((float *)&v197, 0.0, 41.0); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v146->setPosition)(v146, &v187); v147 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v147 = v201.__r_.__value_.__l.__data_; v148 = cocos2d::CCSprite::createWithSpriteFrameName(v147); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v148); sub_10028CBE0((float *)&v197, 0.0, 61.5); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v148->setPosition)(v148, &v187); v149 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v149 = v201.__r_.__value_.__l.__data_; v150 = cocos2d::CCSprite::createWithSpriteFrameName(v149); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v150); sub_10028CBE0((float *)&v197, 0.0, 82.0); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v150->setPosition)(v150, &v187); v151 = v201.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) v151 = v201.__r_.__value_.__l.__data_; v152 = cocos2d::CCSprite::createWithSpriteFrameName(v151); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v138->addChild)(v138, v152); sub_10028CBE0((float *)&v197, 0.0, 102.5); sub_10028CCE0((double *)&v187, &v206, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v152->setPosition)(v152, &v187); if ( (*(_BYTE *)&v201.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v201.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_111; } else if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_111: operator delete(__dst.__r_.__value_.__l.__data_); } if ( v134 != 4 ) continue; break; } v153 = BoomScrollLayer::create(v194, 0, 1, nullptr, nullptr); v154 = v202; v202->m_mainScrollLayer = v153; (*(void (__fastcall **)(_QWORD, BoomScrollLayer *))(**(_QWORD **)&v154[7].m_uIndexInArray + 440LL))( *(_QWORD *)&v154[7].m_uIndexInArray, v153); v155 = *(BoomScrollLayer **)&v154[9].m_unknown2; *(float *)&v205 = v207 * 0.5; v156 = cocos2d::CCDirector::sharedDirector(); v157 = sub_100484D80((__int64)v156) + 10.0; v158 = (__m128)(unsigned int)v205; sub_10028CBE0((float *)&__dst, *(float *)&v205, v157); BoomScrollLayer::setPagesIndicatorPosition(v155, *(cocos2d::CCPoint *)v158.f32); v159 = *(_QWORD *)&v154[9].m_unknown2; *(_DWORD *)(v159 + 532) = 1063675494; *(_BYTE *)(v159 + 600) = 1; v160 = cocos2d::CCDirector::sharedDirector(); LODWORD(v205) = sub_100484DA0((__int64)v160); v161 = cocos2d::CCDirector::sharedDirector(); v158.f32[0] = sub_100484D70((__int64)v161); sub_10028CC00((__int64)&__dst, 0.0, 0.0, (__m128)(unsigned int)v205, v158); sub_10028D1A0((__m128 *)(v159 + 604), (unsigned __int64 *)&__dst); *(_QWORD *)(*(_QWORD *)(*(_QWORD *)&v154[9].m_unknown2 + 496LL) + 408LL) = (char *)v154 + 416; v162 = cocos2d::CCMenu::create(); ((void (__fastcall *)(cocos2d::CCMenu *, __int64))v162->setTouchPriority)(v162, 4294967167LL); *(float *)&v205 = (float)(0.5 * v208) + -30.0; v163 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v164 = CCMenuItemSpriteExtra::create( v163, nullptr, v154, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onSwitchPage); *(_QWORD *)&v154[9].m_uID = v164; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v162->addChild)(v162, v164); v165 = *(_QWORD *)&v154[9].m_uID; v166 = cocos2d::CCDirector::sharedDirector(); v158.f32[0] = sub_100484D90((__int64)v166); sub_10028CBE0((float *)&v201, v158.f32[0] + 24.0, *(float *)&v205); *(cocos2d::CCPoint *)v158.f32 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&__dst, (const cocos2d::CCPoint *)v162); (*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v165 + 184LL))(v165, &__dst, *(double *)v158.i64); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&v154[9].m_uID + 72LL))(*(_QWORD *)&v154[9].m_uID, 0); CCMenuItemSpriteExtra::setSizeMult(*(CCMenuItemSpriteExtra **)&v154[9].m_uID, 2.0); v167 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v167, 1); v168 = CCMenuItemSpriteExtra::create( v167, nullptr, v154, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretRewardsLayer::onSwitchPage); *(_QWORD *)&v154[9].m_nTag = v168; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v162->addChild)(v162, v168); v169 = *(_QWORD *)&v154[9].m_nTag; v170 = cocos2d::CCDirector::sharedDirector(); v158.f32[0] = sub_100484DA0((__int64)v170); sub_10028CBE0((float *)&v201, v158.f32[0] + -24.0, *(float *)&v205); *(cocos2d::CCPoint *)v158.f32 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&__dst, (const cocos2d::CCPoint *)v162); (*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v169 + 184LL))(v169, &__dst, *(double *)v158.i64); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)&v154[9].m_nTag + 72LL))(*(_QWORD *)&v154[9].m_nTag, 1); CCMenuItemSpriteExtra::setSizeMult(*(CCMenuItemSpriteExtra **)&v154[9].m_nTag, 2.0); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCMenu *, __int64))v154->__vftable[5].encodeWithCoder)( v154, v162, 10); if ( v192 ) { TotalPages = BoomScrollLayer::getTotalPages(*(BoomScrollLayer **)&v154[9].m_unknown2); v172 = TotalPages - 1; BoomScrollLayer::instantMoveToPage(*(BoomScrollLayer **)&v154[9].m_unknown2, TotalPages - 2); BoomScrollLayer::instantMoveToPage(*(BoomScrollLayer **)&v154[9].m_unknown2, v172); } return v203; }
GD Web Decomp Icon

GD Web Decomp

Raw Source