// // PauseLayer::customSetup from 0x3a8484 to 0x3a8d1c (2200 bytes) // // 0 xrefs: // // 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 // void PauseLayer::customSetup(PauseLayer *a1) { cocos2d::CCDirector *v2; // r0 cocos2d::CCDirector *v3; // r0 float v4; // s19 cocos2d::CCDirector *v5; // r0 float v6; // s19 cocos2d::CCDirector *v7; // r0 float v8; // s16 cocos2d::CCDirector *v9; // r0 float v10; // s17 cocos2d::CCNode *v11; // r8 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 GameManager *v13; // r0 cocos2d::CCLabelBMFont *v14; // r7 float v15; // s17 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCMenu *v17; // r8 cocos2d::CCSprite *v18; // r9 GameManager *v19; // r0 cocos2d::CCSprite *v20; // r0 CCMenuItemSpriteExtra *v21; // r0 bool *p_m_isPracticeMode; // r3 _BOOL4 v23; // r7 cocos2d::CCSprite *v24; // r0 cocos2d::CCObject *v25; // r1 cocos2d::SEL_MenuHandler v26; // r2 CCMenuItemSpriteExtra *v27; // r7 cocos2d::CCSprite *v28; // r0 CCMenuItemSpriteExtra *v29; // r10 cocos2d::CCSprite *v30; // r0 CCMenuItemSpriteExtra *v31; // r0 float v32; // r1 void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float *v34; // r0 cocos2d::CCSprite *v35; // r5 CCMenuItemSpriteExtra *v36; // r5 Slider *v37; // r8 FMODAudioEngine *v38; // r0 float BackgroundMusicVolume; // r0 Slider *v40; // r9 void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 FMODAudioEngine *v42; // r0 float EffectsVolume; // r0 cocos2d::CCLabelBMFont *v44; // r11 int v45; // r8 cocos2d::CCLabelBMFont *v46; // r11 void (__fastcall *v47)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 int v48; // r9 cocos2d::CCSprite *v49; // r9 cocos2d::CCNode *v50; // r8 const cocos2d::CCPoint *v51; // r0 void (__fastcall *v52)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v53; // r9 cocos2d::CCNode *v54; // r11 const cocos2d::CCPoint *v55; // r0 int v56; // r2 bool v57; // r3 void (__fastcall *v58)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v59; // r9 cocos2d::CCNode *v60; // r10 const cocos2d::CCPoint *v61; // r0 int v62; // r2 bool v63; // r3 void (__fastcall *v64)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r4 cocos2d::CCSprite *v65; // r7 void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // r10 float width; // s18 float *v68; // r0 CCMenuItemSpriteExtra *v69; // r0 cocos2d::CCSprite *v70; // r11 void (__fastcall *v71)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 float v72; // r2 float v73; // r3 CCMenuItemSpriteExtra *v74; // [sp+Ch] [bp-90h] void (__fastcall *v75)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+10h] [bp-8Ch] char *v76; // [sp+18h] [bp-84h] char *v77; // [sp+18h] [bp-84h] cocos2d::CCSize v78; // [sp+24h] [bp-78h] BYREF cocos2d::CCSize v79; // [sp+2Ch] [bp-70h] BYREF cocos2d::CCPoint v80; // [sp+34h] [bp-68h] BYREF cocos2d::CCPoint v81; // [sp+3Ch] [bp-60h] BYREF cocos2d::CCPoint v82; // [sp+44h] [bp-58h] BYREF cocos2d::CCPoint v83; // [sp+4Ch] [bp-50h] BYREF void (*v84)(PauseLayer *, cocos2d::CCObject *); // [sp+54h] [bp-48h] int v85; // [sp+58h] [bp-44h] void (*v86)(PauseLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-40h] int v87; // [sp+60h] [bp-3Ch] void (*v88)(PauseLayer *, cocos2d::CCObject *); // [sp+64h] [bp-38h] _BOOL4 v89; // [sp+68h] [bp-34h] void (*v90)(PauseLayer *, cocos2d::CCObject *); // [sp+6Ch] [bp-30h] int v91; // [sp+70h] [bp-2Ch] void (*v92)(PauseLayer *, cocos2d::CCObject *); // [sp+74h] [bp-28h] int v93; // [sp+78h] [bp-24h] void (*v94)(PauseLayer *, cocos2d::CCObject *); // [sp+7Ch] [bp-20h] int v95; // [sp+80h] [bp-1Ch] void (*v96)(PauseLayer *, cocos2d::CCObject *); // [sp+84h] [bp-18h] int v97; // [sp+88h] [bp-14h] void (*v98)(PauseLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-10h] int v99; // [sp+90h] [bp-Ch] cocos2d::CCPoint v100; // [sp+94h] [bp-8h] BYREF cocos2d::CCRect v101; // [sp+9Ch] [bp+0h] BYREF cocos2d::CCRect v102; // [sp+ACh] [bp+10h] BYREF cocos2d::CCSize v103; // 0:^0.8 cocos2d::CCRect v104; // 0:kr00_16.16 a1->setColor(a1, (const cocos2d::ccColor3B *)&unk_9AA8D3); a1->setOpacity(a1, 75); v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v78, v2); cocos2d::CCRect::CCRect(&v101, 0.0, 0.0, 80.0, 80.0); v3 = cocos2d::CCDirector::sharedDirector(); v4 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v3)); v5 = cocos2d::CCDirector::sharedDirector(); v6 = (float)(v4 - 20.0) - COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v5)); v7 = cocos2d::CCDirector::sharedDirector(); v8 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v7)); v9 = cocos2d::CCDirector::sharedDirector(); v10 = (float)(v8 - 20.0) - COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v9)); cocos2d::CCRect::CCRect(&v102, &v101); v104.origin.x = v72; v104.origin.y = v73; v104.size = v103; v11 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square04_001.png", (const char *)&v102, v104); ((void (__fastcall *)(cocos2d::CCNode *, int))v11->__vftable[1].~CCNode_0)(v11, 175); cocos2d::CCSize::CCSize(&v79, v6, v10); v11->setContentSize(v11, &v79); a1->addChild_0(a1, v11, -1); setPosition = v11->setPosition; cocos2d::CCPoint::CCPoint(&v102.origin, v78.width * 0.5, v78.height * 0.5); setPosition(v11, &v102.origin); ((void (__fastcall *)(cocos2d::CCNode *, void *))v11->__vftable[1].getTag)(v11, &unk_9AA8D3); v13 = GameManager::sharedState(); sub_775C20(&v102, &v13->m_playLayer->m_level->m_levelName); v14 = cocos2d::CCLabelBMFont::create(); sub_774008(&v102); v15 = v10 * 0.5; v16 = v14->setPosition; cocos2d::CCPoint::CCPoint(&v102.origin, v78.width * 0.5, (float)(v15 + (float)(v78.height * 0.5)) - 20.0); v16(v14, &v102.origin); a1->addChild(a1, v14); v14->setVisible(v14, 1); PauseLayer::setupProgressBars(a1); v17 = cocos2d::CCMenu::create(); a1->addChild(a1, v17); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_menuBtn_001.png"); if ( GameManager::sharedState()->m_playLayer->m_level->m_levelType == Editor || (v19 = GameManager::sharedState(), v19->m_hasRP.random - v19->m_hasRP.seed > 0) ) { v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); setScale = v65->setScale; width = v18->getContentSize(v18)->width; v68 = (float *)v65->getContentSize(v65); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScale)(v65, width / *v68); v85 = 0; v84 = PauseLayer::onTryEdit; v69 = CCMenuItemSpriteExtra::create( v65, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::onTryEdit, (unsigned int)a1)); v17->addChild(v17, v69); } if ( GameManager::sharedState()->m_playLayer->m_levelSettings->m_platformerMode ) { v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayFullBtn_001.png"); v87 = 0; v86 = PauseLayer::onRestartFull; v21 = CCMenuItemSpriteExtra::create( v20, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::onRestartFull, (unsigned int)a1)); v17->addChild(v17, v21); } p_m_isPracticeMode = &GameManager::sharedState()->m_playLayer->m_isPracticeMode; v23 = *p_m_isPracticeMode; if ( *p_m_isPracticeMode ) { v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_normalBtn_001.png"); v25 = nullptr; v26.adj = (size_t)PauseLayer::onNormalMode; v91 = 0; v90 = PauseLayer::onNormalMode; } else { v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_practiceBtn_001.png"); v25 = (cocos2d::CCObject *)v23; v26.adj = (size_t)PauseLayer::onPracticeMode; v89 = v23; v88 = PauseLayer::onPracticeMode; } v26.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v27 = CCMenuItemSpriteExtra::create(v24, v25, v26); v17->addChild(v17, v27); v28 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v93 = 0; v92 = PauseLayer::onResume; v74 = CCMenuItemSpriteExtra::create( v28, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::onResume, (unsigned int)a1)); v17->addChild(v17, v74); v95 = 0; v94 = PauseLayer::tryQuit; v29 = CCMenuItemSpriteExtra::create( v18, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::tryQuit, (unsigned int)a1)); v17->addChild(v17, v29); v30 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayBtn_001.png"); v97 = 0; v96 = PauseLayer::onRestart; v31 = CCMenuItemSpriteExtra::create( v30, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::onRestart, (unsigned int)a1)); v17->addChild(v17, v31); if ( GameManager::sharedState()->m_playLayer->m_level->m_levelType == Editor ) v32 = 10.0; else v32 = 15.0; cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v17, v32); v33 = v17->setPosition; v34 = (float *)v17->getPosition(v17); cocos2d::CCPoint::CCPoint(&v102.origin, *v34, (float)(v78.height * 0.5) - 30.0); v33(v17, &v102.origin); if ( !GameManager::sharedState()->m_clickedPractice && GameManager::sharedState()->m_playLayer->m_level->m_levelType != Editor && !GameManager::sharedState()->m_playLayer->m_levelSettings->m_platformerMode ) { v70 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_practiceTxt_001.png"); a1->addChild(a1, v70); v71 = v70->setPosition; cocos2d::CCPoint::CCPoint(&v102.origin, (float)(v78.width * 0.5) - 190.0, (float)(v78.height * 0.5) - 12.0); v71(v70, &v102.origin); } v35 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v35->setScale)(v35, 1058642330); v99 = 0; v98 = PauseLayer::onSettings; v36 = CCMenuItemSpriteExtra::create( v35, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(PauseLayer::onSettings, (unsigned int)a1)); v17->addChild(v17, v36); v76 = (char *)v36->setPosition; cocos2d::CCPoint::CCPoint( &v100, (float)((float)(v6 * 0.5) + (float)(v78.width * 0.5)) - 26.0, (float)(v15 + (float)(v78.height * 0.5)) - 26.0); cocos2d::CCNode::convertToNodeSpace(&v102.origin, v17, &v100); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v76)(v36, &v102); cocos2d::CCPoint::CCPoint(&v80, v78.width * 0.5, (float)(v78.height * 0.5) - 105.0); v100.y = 0.0; LODWORD(v100.x) = PauseLayer::musicSliderChanged; v37 = (Slider *)Slider::create(a1, (unsigned int)PauseLayer::musicSliderChanged, 0, 0.8); Slider::setBarVisibility(v37, 1); a1->addChild(a1, v37); v77 = (char *)v37->setPosition; cocos2d::CCPoint::CCPoint(&v83, -100.0, 0.0); cocos2d::CCPoint::operator+(&v102, &v80, &v83); ((void (__fastcall *)(Slider *, cocos2d::CCRect *))v77)(v37, &v102); v38 = FMODAudioEngine::sharedEngine(); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v38); Slider::setValue(v37, BackgroundMusicVolume); v102.origin.y = 0.0; LODWORD(v102.origin.x) = PauseLayer::sfxSliderChanged; v40 = (Slider *)Slider::create(a1, (unsigned int)PauseLayer::sfxSliderChanged, 0, 0.8); Slider::setBarVisibility(v40, 1); a1->addChild(a1, v40); v41 = v40->setPosition; cocos2d::CCPoint::CCPoint(&v82, 100.0, 0.0); cocos2d::CCPoint::operator+(&v83, &v80, &v82); v41(v40, &v83); v42 = FMODAudioEngine::sharedEngine(); EffectsVolume = FMODAudioEngine::getEffectsVolume(v42); Slider::setValue(v40, EffectsVolume); v44 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v44, 1); v75 = v44->setPosition; v45 = (int)v37->getPosition(v37); cocos2d::CCPoint::CCPoint(&v82, 0.0, 20.0); cocos2d::CCPoint::operator+(&v83, v45, &v82); v75(v44, &v83); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v44->setScale)(v44, 1056964608); v46 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v46, 1); v47 = v46->setPosition; v48 = (int)v40->getPosition(v40); cocos2d::CCPoint::CCPoint(&v82, 0.0, 20.0); cocos2d::CCPoint::operator+(&v83, v48, &v82); v47(v46, &v83); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v46->setScale)(v46, 1056964608); if ( PlatformToolbox::isControllerConnected() ) { v49 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); a1->addChild(a1, v49); v50 = v74->getParent(v74); v51 = v74->getPosition(v74); cocos2d::CCNode::convertToWorldSpace(&v83, v50, v51); cocos2d::CCNode::convertToNodeSpace(&v81, a1, &v83); v52 = v49->setPosition; cocos2d::CCPoint::CCPoint(&v82, 0.0, -40.0); cocos2d::CCPoint::operator+(&v83, &v81, &v82); v52(v49, &v83); v53 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); a1->addChild(a1, v53); v54 = v29->getParent(v29); v55 = v29->getPosition(v29); cocos2d::CCNode::convertToWorldSpace(&v82, v54, v55); cocos2d::CCNode::convertToNodeSpace(&v83, a1, &v82); cocos2d::CCPoint::operator=((PlayerObject *)&v81, COERCE_FLOAT(&v83), v56, v57); v58 = v53->setPosition; cocos2d::CCPoint::CCPoint(&v82, 0.0, -30.0); cocos2d::CCPoint::operator+(&v83, &v81, &v82); v58(v53, &v83); ((void (__fastcall *)(cocos2d::CCSprite *, int))v53->setScale)(v53, 1061997773); v59 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png"); a1->addChild(a1, v59); v60 = v27->getParent(v27); v61 = v27->getPosition(v27); cocos2d::CCNode::convertToWorldSpace(&v82, v60, v61); cocos2d::CCNode::convertToNodeSpace(&v83, a1, &v82); cocos2d::CCPoint::operator=((PlayerObject *)&v81, COERCE_FLOAT(&v83), v62, v63); v64 = v59->setPosition; cocos2d::CCPoint::CCPoint(&v82, 0.0, -30.0); cocos2d::CCPoint::operator+(&v83, &v81, &v82); v64(v59, &v83); ((void (__fastcall *)(cocos2d::CCSprite *, int))v59->setScale)(v59, 1061997773); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source