// // GJGarageLayer::init from 0x100301b48 to 0x100303174 (5676 bytes) // // 1 xrefs: // > @ 0x1007ebc00 // // 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 GJGarageLayer::init(GJGarageLayer *a1) { _BOOL4 v2; // w19 cocos2d::CCDirector *v3; // x0 float v4; // s10 cocos2d::CCSprite *v5; // x21 __n128 v6; // q0 __n128 v7; // q1 __n128 v8; // q0 __n128 v9; // q1 cocos2d::CCSprite *v10; // x22 __n128 v11; // q0 __n128 v12; // q1 cocos2d::CCDirector *v13; // x0 float v14; // s9 cocos2d::CCDirector *v15; // x0 __n128 v16; // q1 __n128 v17; // q0 cocos2d::CCSprite *v18; // x22 __n128 v19; // q0 __n128 v20; // q1 cocos2d::CCDirector *v21; // x0 float v22; // s9 cocos2d::CCDirector *v23; // x0 __n128 v24; // q1 __n128 v25; // q0 cocos2d::CCSprite *v26; // x21 __n128 v27; // q0 __n128 v28; // q1 cocos2d::CCDirector *v29; // x0 float v30; // s9 cocos2d::CCDirector *v31; // x0 __n128 v32; // q1 __n128 v33; // q0 GJAccountManager *v34; // x0 const char *v35; // x3 CCTextInputNode *v36; // x0 CCTextInputNode *m_usernameInput; // x21 float v38; // s9 cocos2d::CCDirector *v39; // x0 __n128 v40; // q1 __n128 v41; // q0 CCTextInputNode *v42; // x0 std::string *v43; // x21 GJAccountManager *v44; // x0 GameManager *v45; // x0 CCTextInputNode *v46; // x21 GJAccountManager *v47; // x0 bool v48; // w21 char *v49; // x1 cocos2d::CCSprite *v50; // x21 double *v51; // x0 double v52; // d0 float32x2_t *v53; // x22 __n128 v54; // q0 __n128 v55; // q1 double v56; // d0 CCTextInputNode *v57; // x21 GameManager *v58; // x0 char *v59; // x1 cocos2d::CCSprite *v60; // x21 float32x2_t *v61; // x22 __n128 v62; // q0 __n128 v63; // q1 double v64; // d0 cocos2d::CCSprite *v65; // x21 __n128 v66; // q0 __n128 v67; // q1 GameManager *v68; // x0 SimplePlayer *v69; // x0 SimplePlayer *m_playerObject; // x22 GameManager *v71; // x0 __n128 v72; // q0 SimplePlayer *v73; // x22 float32x2_t *v74; // x21 __n128 v75; // q0 __n128 v76; // q1 double v77; // d0 IconType m_playerIconType; // w8 SimplePlayer *v79; // x21 GameManager *v80; // x0 int v81; // w1 SimplePlayer *v82; // x0 IconType v83; // w2 SimplePlayer *v84; // x21 GameManager *v85; // x0 SimplePlayer *v86; // x21 GameManager *v87; // x0 SimplePlayer *v88; // x21 GameManager *v89; // x0 SimplePlayer *v90; // x21 GameManager *v91; // x0 GameManager *v92; // x0 GameManager *v93; // x0 SimplePlayer *v94; // x21 GameManager *v95; // x0 cocos2d::CCSprite *v96; // x0 CCMenuItemSpriteExtra *v97; // x21 __int64 v98; // x1 __int64 v99; // x2 __int64 v100; // x3 __int64 v101; // x4 __int64 v102; // x5 __int64 v103; // x6 __int64 v104; // x7 cocos2d::CCMenu *v105; // x22 cocos2d::CCDirector *v106; // x0 float v107; // s8 cocos2d::CCDirector *v108; // x0 __n128 v109; // q1 __n128 v110; // q0 cocos2d::CCSprite *v111; // x0 CCMenuItemSpriteExtra *v112; // x23 __n128 v113; // q0 __n128 v114; // q1 double v115; // d0 __n128 v116; // q0 __n128 v117; // q1 cocos2d::CCSprite *v118; // x0 CCMenuItemSpriteExtra *v119; // x23 __n128 v120; // q0 __n128 v121; // q1 cocos2d::CCSprite *v122; // x0 CCMenuItemSpriteExtra *v123; // x23 __n128 v124; // q0 __n128 v125; // q1 cocos2d::CCSprite *v126; // x25 cocos2d::CCDirector *v127; // x0 float v128; // s10 AppDelegate *v129; // x0 float v130; // s0 float v131; // s9 cocos2d::CCDirector *v132; // x0 __n128 v133; // q1 __n128 v134; // q0 GameStatsManager *v135; // x0 int Stat; // w0 cocos2d::CCString *v137; // x0 const char *CString; // x0 cocos2d::CCLabelBMFont *v139; // x26 __n128 v140; // q0 __n128 v141; // q1 float32x2_t *v142; // x27 __n128 v143; // q0 __n128 v144; // q1 double v145; // d0 cocos2d::CCSprite *v146; // x26 float32x2_t *v147; // x25 __n128 v148; // q0 __n128 v149; // q1 double v150; // d0 GameStatsManager *v151; // x0 int v152; // w0 cocos2d::CCString *v153; // x0 const char *v154; // x0 cocos2d::CCLabelBMFont *v155; // x25 __n128 v156; // q0 __n128 v157; // q1 float32x2_t *v158; // x27 __n128 v159; // q0 __n128 v160; // q1 double v161; // d0 cocos2d::CCSprite *v162; // x25 float32x2_t *v163; // x26 __n128 v164; // q0 __n128 v165; // q1 double v166; // d0 GameStatsManager *v167; // x0 int v168; // w0 cocos2d::CCString *v169; // x0 const char *v170; // x0 cocos2d::CCLabelBMFont *v171; // x26 __n128 v172; // q0 __n128 v173; // q1 float32x2_t *v174; // x27 __n128 v175; // q0 __n128 v176; // q1 double v177; // d0 cocos2d::CCSprite *v178; // x26 float32x2_t *v179; // x25 __n128 v180; // q0 __n128 v181; // q1 double v182; // d0 GameStatsManager *v183; // x0 int v184; // w0 cocos2d::CCString *v185; // x0 const char *v186; // x0 cocos2d::CCLabelBMFont *v187; // x25 __n128 v188; // q0 __n128 v189; // q1 float32x2_t *v190; // x27 __n128 v191; // q0 __n128 v192; // q1 double v193; // d0 cocos2d::CCSprite *v194; // x25 float32x2_t *v195; // x26 __n128 v196; // q0 __n128 v197; // q1 double v198; // d0 GameStatsManager *v199; // x0 int v200; // w0 cocos2d::CCString *v201; // x0 const char *v202; // x0 cocos2d::CCLabelBMFont *v203; // x26 __n128 v204; // q0 __n128 v205; // q1 float32x2_t *v206; // x27 __n128 v207; // q0 __n128 v208; // q1 double v209; // d0 cocos2d::CCSprite *v210; // x26 float32x2_t *v211; // x25 __n128 v212; // q0 __n128 v213; // q1 double v214; // d0 GameStatsManager *v215; // x0 int v216; // w0 cocos2d::CCString *v217; // x0 const char *v218; // x0 cocos2d::CCLabelBMFont *v219; // x25 __n128 v220; // q0 __n128 v221; // q1 float32x2_t *v222; // x27 __n128 v223; // q0 __n128 v224; // q1 double v225; // d0 cocos2d::CCSprite *v226; // x25 float32x2_t *v227; // x26 __n128 v228; // q0 __n128 v229; // q1 double v230; // d0 GameStatsManager *v231; // x0 int v232; // w0 cocos2d::CCString *v233; // x0 const char *v234; // x0 cocos2d::CCLabelBMFont *v235; // x23 __n128 v236; // q0 __n128 v237; // q1 float32x2_t *v238; // x24 __n128 v239; // q0 __n128 v240; // q1 double v241; // d0 GameManager *v242; // x0 cocos2d::CCSprite *v243; // x23 CCMenuItemSpriteExtra *v244; // x23 cocos2d::CCDirector *v245; // x0 float v246; // s8 cocos2d::CCDirector *v247; // x0 __n128 v248; // q1 __n128 v249; // q0 void *v251[2]; // [xsp+8h] [xbp-118h] BYREF char v252; // [xsp+1Fh] [xbp-101h] void *v253[2]; // [xsp+20h] [xbp-100h] BYREF char v254; // [xsp+37h] [xbp-E9h] float32x2_t v255; // [xsp+38h] [xbp-E8h] BYREF void *__dst[2]; // [xsp+40h] [xbp-E0h] BYREF char *longStorage; // [xsp+50h] [xbp-D0h] void *v258[2]; // [xsp+60h] [xbp-C0h] BYREF char v259; // [xsp+77h] [xbp-A9h] std::string __p; // [xsp+78h] [xbp-A8h] BYREF float v261; // [xsp+90h] [xbp-90h] float v262; // [xsp+94h] [xbp-8Ch] cocos2d::CCPoint v263; // 0:kr08_8.8 cocos2d::CCPoint v264; // 0:kr10_8.8 cocos2d::CCPoint v265; // 0:kr18_8.8 cocos2d::CCPoint v266; // 0:kr20_8.8 cocos2d::SEL_MenuHandler v267; // 0:x3.16 cocos2d::SEL_MenuHandler v268; // 0:x3.16 cocos2d::SEL_MenuHandler v269; // 0:x3.16 cocos2d::SEL_MenuHandler v270; // 0:x3.16 cocos2d::SEL_MenuHandler v271; // 0:x3.16 v2 = cocos2d::CCLayer::init(a1); if ( !v2 ) return v2; GameManager::sharedState()->m_inMenuLayer = 1; GameManager::sharedState()->m_sceneEnum = 0; ((void (__fastcall *)(GJGarageLayer *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(GJGarageLayer *, __int64))a1->setKeyboardEnabled)(a1, 1); v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v3); v4 = v262; v5 = cocos2d::CCSprite::create("GJ_gradientBG.png"); v6.n128_u32[0] = 0; v7.n128_u32[0] = 0; sub_100022980(v6, v7, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v5->setAnchorPoint)(v5, __dst); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v5, 4294967294LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v5->setScaleX)(v5, (float)(v261 + 10.0) / v5->m_obRect.size.width); v8 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v5->setScaleY)( v5, (float)(v262 + 10.0) / v5->m_obRect.size.height); v8.n128_u32[0] = -5.0; v9.n128_u32[0] = -5.0; sub_100022980(v8, v9, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v5->setPosition)(v5, __dst); BYTE2(__dst[0]) = -106; LOWORD(__dst[0]) = -26986; ((void (__fastcall *)(cocos2d::CCSprite *, void **))v5->setColor)(v5, __dst); v10 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v11.n128_u32[0] = 0; v12.n128_u32[0] = 1.0; sub_100022980(v11, v12, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v10->setAnchorPoint)(v10, __dst); v13 = cocos2d::CCDirector::sharedDirector(); v14 = sub_1001768D8((__int64)v13) + -1.0; v15 = cocos2d::CCDirector::sharedDirector(); v16.n128_f32[0] = sub_1001768C8((__int64)v15) + 1.0; v17.n128_f32[0] = v14; sub_100022980(v17, v16, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v10->setPosition)(v10, __dst); cocos2d::CCSprite::setFlipY(v10, 1); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v10, 0xFFFFFFFFLL); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v19.n128_u32[0] = 0; v20.n128_u32[0] = 0; sub_100022980(v19, v20, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v18->setAnchorPoint)(v18, __dst); v21 = cocos2d::CCDirector::sharedDirector(); v22 = sub_1001768D8((__int64)v21) + -1.0; v23 = cocos2d::CCDirector::sharedDirector(); v24.n128_f32[0] = sub_1001768D0((__int64)v23) + -1.0; v25.n128_f32[0] = v22; sub_100022980(v25, v24, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v18->setPosition)(v18, __dst); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v18, 1); v26 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v27.n128_u32[0] = 1.0; v28.n128_u32[0] = 0; sub_100022980(v27, v28, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v26->setAnchorPoint)(v26, __dst); v29 = cocos2d::CCDirector::sharedDirector(); v30 = sub_1001768E0((__int64)v29) + 1.0; v31 = cocos2d::CCDirector::sharedDirector(); v32.n128_f32[0] = sub_1001768D0((__int64)v31) + -1.0; v33.n128_f32[0] = v30; sub_100022980(v33, v32, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v26->setPosition)(v26, __dst); cocos2d::CCSprite::setFlipX(v26, 1); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v26, 1); v34 = GJAccountManager::sharedState(); if ( v34->m_accountID == v34->m_unkInt1 ) v35 = "bigFont.fnt"; else v35 = "goldFont.fnt"; v36 = CCTextInputNode::create(180.0, 50.0, "Player", "Thonburi", 24, v35); a1->m_usernameInput = v36; ((void (__fastcall *)(GJGarageLayer *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v36, 20); m_usernameInput = a1->m_usernameInput; m_usernameInput->m_delegate = &a1->TextInputDelegate; v38 = v261 * 0.5; v39 = cocos2d::CCDirector::sharedDirector(); v40.n128_f32[0] = sub_1001768C8((__int64)v39) + -34.0; v41.n128_f32[0] = v38; sub_100022980(v41, v40, __dst); ((void (__fastcall *)(CCTextInputNode *, void **))m_usernameInput->setPosition)(m_usernameInput, __dst); ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))a1->m_usernameInput->m_textField->setVisible)( a1->m_usernameInput->m_textField, 0); v42 = a1->m_usernameInput; v42->m_maxLabelLength = 15; CCTextInputNode::setLabelPlaceholderColor(v42, (cocos2d::ccColor3B)-1004936); CCTextInputNode::setLabelPlaceholderScale(a1->m_usernameInput, 0.7); v43 = (std::string *)a1->m_usernameInput; sub_100009900(&__p, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars(v43, &__p); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v44 = GJAccountManager::sharedState(); if ( v44->m_accountID == v44->m_unkInt1 ) { v45 = GameManager::sharedState(); if ( v45->m_playerName.m_data.m_short.shortStorage.__elems_[22] < 0 ) { sub_1000097D0(__dst, (void *)v45->m_playerName.m_data.m_long.capacitym1, v45->m_playerName.m_data.m_long.size); } else { *(_OWORD *)__dst = *(_OWORD *)&v45->m_playerName.m_data.m_short.sizex2; longStorage = v45->m_playerName.m_data.m_long.longStorage; } sub_100009900(v253, ""); v48 = sub_1000045BC(__dst, v253); if ( v254 < 0 ) operator delete(v253[0]); if ( SHIBYTE(longStorage) < 0 ) { operator delete(__dst[0]); if ( v48 ) goto LABEL_38; } else if ( v48 ) { LABEL_38: if ( !GameManager::sharedState()->m_clickedName ) { v60 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_nameTxt_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v60); v61 = (float32x2_t *)((__int64 (__fastcall *)(CCTextInputNode *))a1->m_usernameInput->getPosition)(a1->m_usernameInput); v62.n128_u32[0] = 1122369536; v63.n128_u32[0] = 10.0; sub_100022980(v62, v63, v253); *(float32x2_t *)&v64 = sub_1000229DC(v61, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v60->setPosition)(v60, __dst, v64); } goto LABEL_40; } v57 = a1->m_usernameInput; v58 = GameManager::sharedState(); if ( v58->m_playerName.m_data.m_short.shortStorage.__elems_[22] < 0 ) { sub_1000097D0(__dst, (void *)v58->m_playerName.m_data.m_long.capacitym1, v58->m_playerName.m_data.m_long.size); } else { *(_OWORD *)__dst = *(_OWORD *)&v58->m_playerName.m_data.m_short.sizex2; longStorage = v58->m_playerName.m_data.m_long.longStorage; } if ( SHIBYTE(longStorage) >= 0 ) v59 = (char *)__dst; else v59 = (char *)__dst[0]; sub_100009900(v251, v59); CCTextInputNode::setString(v57, (__int64 **)v251); if ( v252 < 0 ) operator delete(v251[0]); if ( SHIBYTE(longStorage) < 0 ) operator delete(__dst[0]); goto LABEL_38; } v46 = a1->m_usernameInput; v47 = GJAccountManager::sharedState(); if ( v47->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 ) { sub_1000097D0(__dst, (void *)v47->m_username.m_data.m_long.capacitym1, v47->m_username.m_data.m_long.size); } else { *(_OWORD *)__dst = *(_OWORD *)&v47->m_username.m_data.m_short.sizex2; longStorage = v47->m_username.m_data.m_long.longStorage; } if ( SHIBYTE(longStorage) >= 0 ) v49 = (char *)__dst; else v49 = (char *)__dst[0]; sub_100009900(v258, v49); CCTextInputNode::setString(v46, (__int64 **)v258); if ( v259 < 0 ) operator delete(v258[0]); if ( SHIBYTE(longStorage) < 0 ) operator delete(__dst[0]); ((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_usernameInput->setTouchEnabled)(a1->m_usernameInput, 0); v50 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lockGray_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v50, 2); v51 = (double *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_usernameInput->m_textLabel->getContentSize)(a1->m_usernameInput->m_textLabel); v52 = sub_100022AFC(__dst, v51); v53 = (float32x2_t *)((__int64 (__fastcall *)(CCTextInputNode *, double))a1->m_usernameInput->getPosition)( a1->m_usernameInput, v52); v54.n128_f32[0] = (float)(*(float *)__dst * 0.5) + 8.0; v55.n128_u32[0] = 10.0; sub_100022980(v54, v55, &v255); *(float32x2_t *)&v56 = sub_1000229DC(v53, &v255, (float32x2_t *)v253); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v50->setPosition)(v50, v253, v56); ((void (__fastcall *)(cocos2d::CCSprite *, float))v50->setScale)(v50, 0.6); LABEL_40: v65 = cocos2d::CCSprite::createWithSpriteFrameName("floorLine_001.png"); v66 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *, _QWORD))a1->addChild_0)(a1, v65, 0); v66.n128_f32[0] = v261 * 0.5; v67.n128_f32[0] = (float)(v4 * 0.5) + 50.0; sub_100022980(v66, v67, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v65->setPosition)(v65, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v65->setBlendFunc)(v65, 0x100000302LL); v68 = GameManager::sharedState(); v69 = SimplePlayer::create(v68->m_playerFrame.random - v68->m_playerFrame.seed); a1->m_playerObject = v69; ((void (__fastcall *)(GJGarageLayer *, SimplePlayer *, _QWORD))a1->addChild_0)(a1, v69, 0); SimplePlayer::createRobotSprite(a1->m_playerObject, 1); SimplePlayer::createSpiderSprite(a1->m_playerObject, 1); m_playerObject = a1->m_playerObject; v71 = GameManager::sharedState(); v72.n128_u32[0] = 1.5; if ( v71->m_playerIconType != Jetpack ) v72.n128_f32[0] = 1.6; ((void (__fastcall *)(SimplePlayer *, __n128))m_playerObject->setScale)(m_playerObject, v72); v73 = a1->m_playerObject; v74 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v65->getPosition)(v65); v75.n128_f64[0] = ((double (__fastcall *)(SimplePlayer *))a1->m_playerObject->getScale)(a1->m_playerObject); v76.n128_f32[0] = (float)((float)(v75.n128_f32[0] * 30.0) * 0.5) + 1.0; v75.n128_u32[0] = 0; sub_100022980(v75, v76, v253); *(float32x2_t *)&v77 = sub_1000229DC(v74, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(SimplePlayer *, void **, double))v73->setPosition)(v73, __dst, v77); GJGarageLayer::updatePlayerColors(a1); m_playerIconType = GameManager::sharedState()->m_playerIconType; if ( m_playerIconType > Wave ) { if ( m_playerIconType <= Spider ) { v84 = a1->m_playerObject; if ( m_playerIconType == Robot ) { v92 = GameManager::sharedState(); v81 = v92->m_playerRobot.random - v92->m_playerRobot.seed; v82 = v84; v83 = Robot; } else { v85 = GameManager::sharedState(); v81 = v85->m_playerSpider.random - v85->m_playerSpider.seed; v82 = v84; v83 = Spider; } goto LABEL_59; } if ( m_playerIconType == Swing ) { v94 = a1->m_playerObject; v95 = GameManager::sharedState(); v81 = v95->m_playerSwing.random - v95->m_playerSwing.seed; v82 = v94; v83 = Swing; goto LABEL_59; } if ( m_playerIconType == Jetpack ) { v88 = a1->m_playerObject; v89 = GameManager::sharedState(); v81 = v89->m_playerJetpack.random - v89->m_playerJetpack.seed; v82 = v88; v83 = Jetpack; goto LABEL_59; } } else { if ( m_playerIconType > Ball ) { v86 = a1->m_playerObject; if ( m_playerIconType == Ufo ) { v93 = GameManager::sharedState(); v81 = v93->m_playerBird.random - v93->m_playerBird.seed; v82 = v86; v83 = Ufo; } else { v87 = GameManager::sharedState(); v81 = v87->m_playerDart.random - v87->m_playerDart.seed; v82 = v86; v83 = Wave; } goto LABEL_59; } if ( m_playerIconType == Ship ) { v90 = a1->m_playerObject; v91 = GameManager::sharedState(); v81 = v91->m_playerShip.random - v91->m_playerShip.seed; v82 = v90; v83 = Ship; goto LABEL_59; } if ( m_playerIconType == Ball ) { v79 = a1->m_playerObject; v80 = GameManager::sharedState(); v81 = v80->m_playerBall.random - v80->m_playerBall.seed; v82 = v79; v83 = Ball; LABEL_59: SimplePlayer::updatePlayerFrame(v82, v81, v83); } } GJGarageLayer::setupIconSelect(a1); v96 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); v267.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onBack; v267.adj = 0; v97 = CCMenuItemSpriteExtra::create(v96, nullptr, a1, v267); CCMenuItemSpriteExtra::setSizeMult(v97, 1.6); v105 = sub_1001D7ED0(v97, v98, v99, v100, v101, v102, v103, v104, 0); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v105, 1); v106 = cocos2d::CCDirector::sharedDirector(); v107 = sub_1001768D8((__int64)v106) + 24.0; v108 = cocos2d::CCDirector::sharedDirector(); v109.n128_f32[0] = sub_1001768C8((__int64)v108) + -23.0; v110.n128_f32[0] = v107; sub_100022980(v110, v109, __dst); ((void (__fastcall *)(cocos2d::CCMenu *, void **))v105->setPosition)(v105, __dst); v111 = cocos2d::CCSprite::createWithSpriteFrameName("shopRope_001.png"); v268.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onShop; v268.adj = 0; v112 = CCMenuItemSpriteExtra::create(v111, nullptr, a1, v268); CCMenuItemSpriteExtra::useAnimationType(v112, Move); v113.n128_u32[0] = 0; v114.n128_u32[0] = -15.0; sub_100022980(v113, v114, __dst); v115 = sub_1000229D0(&v112->m_offset, (double *)__dst); *(_QWORD *)&v112->m_duration = 0x3E99999A3E99999ALL; v116 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *, double))v105->addChild)(v105, v112, v115); v116.n128_f32[0] = (float)(v261 * 0.5) + -135.0; v117.n128_f32[0] = v262 + -25.0; sub_100022980(v116, v117, v253); v263 = cocos2d::CCNode::convertToNodeSpace(v105, (const cocos2d::CCPoint *)v253); ((void (__fastcall *)(CCMenuItemSpriteExtra *, void **, float, float))v112->setPosition)(v112, __dst, v263.x, v263.y); v118 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_shardsBtn_001.png"); v269.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onShards; v269.adj = 0; v119 = CCMenuItemSpriteExtra::create(v118, nullptr, a1, v269); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v105->addChild)(v105, v119); if ( AppDelegate::get()->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] ) v120.n128_f32[0] = 55.0; else v120.n128_f32[0] = 30.0; v121.n128_f32[0] = v262 + -80.0; sub_100022980(v120, v121, v253); v264 = cocos2d::CCNode::convertToNodeSpace(v105, (const cocos2d::CCPoint *)v253); ((void (__fastcall *)(CCMenuItemSpriteExtra *, void **, float, float))v119->setPosition)(v119, __dst, v264.x, v264.y); v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_paintBtn_001.png"); v270.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onPaint; v270.adj = 0; v123 = CCMenuItemSpriteExtra::create(v122, nullptr, a1, v270); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v105->addChild)(v105, v123); if ( AppDelegate::get()->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] ) v124.n128_f32[0] = 55.0; else v124.n128_f32[0] = 30.0; v125.n128_f32[0] = v262 + -120.0; sub_100022980(v124, v125, v253); v265 = cocos2d::CCNode::convertToNodeSpace(v105, (const cocos2d::CCPoint *)v253); ((void (__fastcall *)(CCMenuItemSpriteExtra *, void **, float, float))v123->setPosition)(v123, __dst, v265.x, v265.y); v126 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v126->setScale)(v126, 0.54); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v126); v127 = cocos2d::CCDirector::sharedDirector(); v128 = sub_1001768E0((__int64)v127) + -18.0; v129 = AppDelegate::get(); v130 = 25.0; if ( !v129->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] ) v130 = 0.0; v131 = v128 - v130; v132 = cocos2d::CCDirector::sharedDirector(); v133.n128_f32[0] = sub_1001768C8((__int64)v132) + -12.0; v134.n128_f32[0] = v131; sub_100022980(v134, v133, __dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **))v126->setPosition)(v126, __dst); v135 = GameStatsManager::sharedState(); Stat = GameStatsManager::getStat(v135, "6"); v137 = (cocos2d::CCString *)sub_100268F4C("%i", Stat); CString = cocos2d::CCString::getCString(v137); v139 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt"); v140 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v139); v140.n128_u32[0] = 1.0; v141.n128_u32[0] = 0.5; sub_100022980(v140, v141, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v139->setAnchorPoint)(v139, __dst); v142 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v126->getPosition)(v126); v143.n128_u32[0] = -12.0; v144.n128_u32[0] = 0.5; sub_100022980(v143, v144, v253); *(float32x2_t *)&v145 = sub_1000229DC(v142, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v139->setPosition)(v139, __dst, v145); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v139->setScale)(v139, 0.34); v146 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_moonsIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v146->setScale)(v146, 0.54); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v146); v147 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v126->getPosition)(v126); v148.n128_u32[0] = 0; v149.n128_u32[0] = -15.0; sub_100022980(v148, v149, v253); *(float32x2_t *)&v150 = sub_1000229DC(v147, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v146->setPosition)(v146, __dst, v150); v151 = GameStatsManager::sharedState(); v152 = GameStatsManager::getStat(v151, "28"); v153 = (cocos2d::CCString *)sub_100268F4C("%i", v152); v154 = cocos2d::CCString::getCString(v153); v155 = cocos2d::CCLabelBMFont::create_1(v154, "bigFont.fnt"); v156 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v155); v156.n128_u32[0] = 1.0; v157.n128_u32[0] = 0.5; sub_100022980(v156, v157, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v155->setAnchorPoint)(v155, __dst); v158 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v146->getPosition)(v146); v159.n128_u32[0] = -12.0; v160.n128_u32[0] = 0.5; sub_100022980(v159, v160, v253); *(float32x2_t *)&v161 = sub_1000229DC(v158, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v155->setPosition)(v155, __dst, v161); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v155->setScale)(v155, 0.34); v162 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v162); v163 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v146->getPosition)(v146); v164.n128_u32[0] = 0; v165.n128_u32[0] = -15.0; sub_100022980(v164, v165, v253); *(float32x2_t *)&v166 = sub_1000229DC(v163, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v162->setPosition)(v162, __dst, v166); ((void (__fastcall *)(cocos2d::CCSprite *, float))v162->setScale)(v162, 0.51); v167 = GameStatsManager::sharedState(); v168 = GameStatsManager::getStat(v167, "8"); v169 = (cocos2d::CCString *)sub_100268F4C("%i", v168); v170 = cocos2d::CCString::getCString(v169); v171 = cocos2d::CCLabelBMFont::create_1(v170, "bigFont.fnt"); v172 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v171); v172.n128_u32[0] = 1.0; v173.n128_u32[0] = 0.5; sub_100022980(v172, v173, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v171->setAnchorPoint)(v171, __dst); v174 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v162->getPosition)(v162); v175.n128_u32[0] = -12.0; v176.n128_u32[0] = 0.5; sub_100022980(v175, v176, v253); *(float32x2_t *)&v177 = sub_1000229DC(v174, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v171->setPosition)(v171, __dst, v177); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v171->setScale)(v171, 0.34); v178 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon2_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v178); v179 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v162->getPosition)(v162); v180.n128_u32[0] = 0; v181.n128_u32[0] = -15.0; sub_100022980(v180, v181, v253); *(float32x2_t *)&v182 = sub_1000229DC(v179, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v178->setPosition)(v178, __dst, v182); ((void (__fastcall *)(cocos2d::CCSprite *, float))v178->setScale)(v178, 0.51); v183 = GameStatsManager::sharedState(); v184 = GameStatsManager::getStat(v183, "12"); v185 = (cocos2d::CCString *)sub_100268F4C("%i", v184); v186 = cocos2d::CCString::getCString(v185); v187 = cocos2d::CCLabelBMFont::create_1(v186, "bigFont.fnt"); v188 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v187); v188.n128_u32[0] = 1.0; v189.n128_u32[0] = 0.5; sub_100022980(v188, v189, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v187->setAnchorPoint)(v187, __dst); v190 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v178->getPosition)(v178); v191.n128_u32[0] = -12.0; v192.n128_u32[0] = 0.5; sub_100022980(v191, v192, v253); *(float32x2_t *)&v193 = sub_1000229DC(v190, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v187->setPosition)(v187, __dst, v193); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v187->setScale)(v187, 0.34); v194 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v194); ((void (__fastcall *)(cocos2d::CCSprite *, float))v194->setScale)(v194, 0.54); v195 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v178->getPosition)(v178); v196.n128_u32[0] = 0; v197.n128_u32[0] = -15.0; sub_100022980(v196, v197, v253); *(float32x2_t *)&v198 = sub_1000229DC(v195, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v194->setPosition)(v194, __dst, v198); v199 = GameStatsManager::sharedState(); v200 = GameStatsManager::getStat(v199, "14"); v201 = (cocos2d::CCString *)sub_100268F4C("%i", v200); v202 = cocos2d::CCString::getCString(v201); v203 = cocos2d::CCLabelBMFont::create_1(v202, "bigFont.fnt"); v204 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v203); v204.n128_u32[0] = 1.0; v205.n128_u32[0] = 0.5; sub_100022980(v204, v205, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v203->setAnchorPoint)(v203, __dst); v206 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v194->getPosition)(v194); v207.n128_u32[0] = -12.0; v208.n128_u32[0] = 0.5; sub_100022980(v207, v208, v253); *(float32x2_t *)&v209 = sub_1000229DC(v206, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v203->setPosition)(v203, __dst, v209); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v203->setScale)(v203, 0.34); v210 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_diamondsIcon_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v210); ((void (__fastcall *)(cocos2d::CCSprite *, float))v210->setScale)(v210, 0.6); v211 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v194->getPosition)(v194); v212.n128_u32[0] = 0; v213.n128_u32[0] = -15.0; sub_100022980(v212, v213, v253); *(float32x2_t *)&v214 = sub_1000229DC(v211, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v210->setPosition)(v210, __dst, v214); v215 = GameStatsManager::sharedState(); v216 = GameStatsManager::getStat(v215, "13"); v217 = (cocos2d::CCString *)sub_100268F4C("%i", v216); v218 = cocos2d::CCString::getCString(v217); v219 = cocos2d::CCLabelBMFont::create_1(v218, "bigFont.fnt"); v220 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v219); v220.n128_u32[0] = 1.0; v221.n128_u32[0] = 0.5; sub_100022980(v220, v221, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v219->setAnchorPoint)(v219, __dst); v222 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v210->getPosition)(v210); v223.n128_u32[0] = -12.0; v224.n128_u32[0] = 0.5; sub_100022980(v223, v224, v253); *(float32x2_t *)&v225 = sub_1000229DC(v222, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v219->setPosition)(v219, __dst, v225); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v219->setScale)(v219, 0.34); v226 = cocos2d::CCSprite::createWithSpriteFrameName("currencyDiamondIcon_001.png"); ((void (__fastcall *)(GJGarageLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v226); ((void (__fastcall *)(cocos2d::CCSprite *, float))v226->setScale)(v226, 0.54); v227 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v210->getPosition)(v210); v228.n128_u32[0] = 0; v229.n128_u32[0] = -15.0; sub_100022980(v228, v229, v253); *(float32x2_t *)&v230 = sub_1000229DC(v227, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCSprite *, void **, double))v226->setPosition)(v226, __dst, v230); v231 = GameStatsManager::sharedState(); v232 = GameStatsManager::getStat(v231, "29"); v233 = (cocos2d::CCString *)sub_100268F4C("%i", v232); v234 = cocos2d::CCString::getCString(v233); v235 = cocos2d::CCLabelBMFont::create_1(v234, "bigFont.fnt"); v236 = ((__n128 (__fastcall *)(GJGarageLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v235); v236.n128_u32[0] = 1.0; v237.n128_u32[0] = 0.5; sub_100022980(v236, v237, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v235->setAnchorPoint)(v235, __dst); v238 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v226->getPosition)(v226); v239.n128_u32[0] = -12.0; v240.n128_u32[0] = 0.5; sub_100022980(v239, v240, v253); *(float32x2_t *)&v241 = sub_1000229DC(v238, (float32x2_t *)v253, (float32x2_t *)__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v235->setPosition)(v235, __dst, v241); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v235->setScale)(v235, 0.34); v242 = GameManager::sharedState(); if ( v242->m_playerUserID.random != v242->m_playerUserID.seed ) { v243 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v243->setScale)(v243, 0.8); v271.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJGarageLayer::onInfo; v271.adj = 0; v244 = CCMenuItemSpriteExtra::create(v243, nullptr, a1, v271); CCMenuItemSpriteExtra::setSizeMult(v244, 2.0); v245 = cocos2d::CCDirector::sharedDirector(); v246 = sub_1001768E0((__int64)v245) + -15.0; v247 = cocos2d::CCDirector::sharedDirector(); v248.n128_f32[0] = sub_1001768C8((__int64)v247) + -15.0; v249.n128_f32[0] = v246; sub_100022980(v249, v248, v253); v266 = cocos2d::CCNode::convertToNodeSpace(v105, (const cocos2d::CCPoint *)v253); ((void (__fastcall *)(CCMenuItemSpriteExtra *, void **, float, float))v244->setPosition)( v244, __dst, v266.x, v266.y); } if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v97); return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source