// // PauseLayer::customSetup from 0x6c793c to 0x6c8498 (2908 bytes) // // 2 xrefs: // > @ 0x90900 // > @ 0x11587f8 // // 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; // x0 cocos2d::CCDirector *v3; // x0 float v4; // s0 float v5; // s10 cocos2d::CCDirector *v6; // x0 float v7; // s0 float v8; // s10 cocos2d::CCDirector *v9; // x0 float v10; // s0 float v11; // s8 cocos2d::CCDirector *v12; // x0 float v13; // s0 float v14; // s8 cocos2d::CCNode *v15; // x25 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 GameManager *v17; // x0 cocos2d::CCLabelBMFont *v18; // x21 void *v19; // x0 float v20; // s8 void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCMenu *v22; // x21 cocos2d::CCSprite *v23; // x25 GameManager *v24; // x0 cocos2d::CCSprite *v25; // x26 void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // x27 float width; // s9 float *v28; // x0 CCMenuItemSpriteExtra *v29; // x0 cocos2d::CCSprite *v30; // x0 CCMenuItemSpriteExtra *v32; // x26 cocos2d::CCSprite *v33; // x0 CCMenuItemSpriteExtra *v34; // x27 CCMenuItemSpriteExtra *v35; // x25 cocos2d::CCSprite *v36; // x0 CCMenuItemSpriteExtra *v37; // x0 float v38; // s0 float *v39; // x0 cocos2d::CCSprite *v40; // x28 CCMenuItemSpriteExtra *v41; // x28 void (__fastcall *v42)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 Slider *v43; // x28 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 FMODAudioEngine *v45; // x0 float BackgroundMusicVolume; // s0 Slider *v47; // x21 FMODAudioEngine *v48; // x0 float EffectsVolume; // s0 cocos2d::CCLabelBMFont *v50; // x23 Slider *v51; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v53)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v54; // x23 Slider *v55; // x0 const cocos2d::CCPoint *(__fastcall *v56)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v57)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 __int64 v58; // x28 cocos2d::CCSprite *v59; // x23 cocos2d::CCNode *v60; // x28 const cocos2d::CCPoint *v61; // x0 void (__fastcall *v62)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v63; // x23 cocos2d::CCNode *v64; // x27 const cocos2d::CCPoint *v65; // x0 void (__fastcall *v66)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCSprite *v67; // x23 cocos2d::CCNode *v68; // x25 const cocos2d::CCPoint *v69; // x0 void (__fastcall *v70)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19 void (__fastcall *v71)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCSprite *v72; // x0 CCMenuItemSpriteExtra *v73; // x0 unsigned int *v74; // x2 int v75; // w1 cocos2d::CCPoint *v76; // [xsp+80h] [xbp+80h] cocos2d::CCPoint *v77; // [xsp+80h] [xbp+80h] cocos2d::CCRect *v78; // [xsp+88h] [xbp+88h] cocos2d::CCSprite *v79; // [xsp+88h] [xbp+88h] float v80; // [xsp+90h] [xbp+90h] float v81; // [xsp+94h] [xbp+94h] cocos2d::CCSize v82; // [xsp+98h] [xbp+98h] BYREF cocos2d::CCPoint v83; // [xsp+A0h] [xbp+A0h] BYREF _BYTE v84[8]; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCPoint v85; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCRect v86; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCRect v87; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCPoint v88; // 0:kr08_8.8 cocos2d::CCPoint v89; // 0:kr28_8.8 cocos2d::CCPoint v90; // 0:kr38_8.8 cocos2d::SEL_MenuHandler v91; // 0:x2.16 cocos2d::SEL_MenuHandler v92; // 0:x2.16 cocos2d::SEL_MenuHandler v93; // 0:x2.16 cocos2d::SEL_MenuHandler v94; // 0:x2.16 cocos2d::SEL_MenuHandler v95; // 0:x2.16 cocos2d::SEL_MenuHandler v96; // 0:x2.16 cocos2d::SEL_MenuHandler v97; // 0:x2.16 cocos2d::CCRect v98; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 a1->setColor(a1, (const cocos2d::ccColor3B *)&unk_EC7638); a1->setOpacity(a1, 75); v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); cocos2d::CCRect::CCRect(&v86, 0.0, 0.0, 80.0, 80.0); v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v3); v5 = v4; v6 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v6); v8 = (float)(v5 - 20.0) - v7; v9 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v9); v11 = v10; v12 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v12); v14 = (float)(v11 - 20.0) - v13; cocos2d::CCRect::CCRect(&v87, &v86); v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square04_001.png", (const char *)&v87, v98); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v15->__vftable[1].~CCNode_0)(v15, 4294967215LL); cocos2d::CCSize::CCSize(&v82, v8, v14); v15->setContentSize(v15, &v82); a1->addChild_0(a1, v15, -1); setPosition = v15->setPosition; cocos2d::CCPoint::CCPoint(&v87.origin, v80 * 0.5, v81 * 0.5); setPosition(v15, &v87.origin); ((void (__fastcall *)(cocos2d::CCNode *, void *))v15->__vftable[1].getTag)(v15, &unk_EC7638); v17 = GameManager::sharedState(); sub_D18D28(&v87, &v17->m_playLayer->m_level->m_levelName); v18 = cocos2d::CCLabelBMFont::create(); v19 = (void *)(*(_QWORD *)&v87.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v87.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v74 = (unsigned int *)(*(_QWORD *)&v87.origin - 8LL); do v75 = __ldaxr(v74); while ( __stlxr(v75 - 1, v74) ); } else { v75 = *(_DWORD *)(*(_QWORD *)&v87.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v87.origin - 8LL) = v75 - 1; } if ( v75 <= 0 ) operator delete(v19); } v20 = v14 * 0.5; v21 = v18->setPosition; cocos2d::CCPoint::CCPoint(&v87.origin, v80 * 0.5, (float)(v20 + (float)(v81 * 0.5)) - 20.0); v21(v18, &v87.origin); a1->addChild(a1, v18); v18->setVisible(v18, 1); PauseLayer::setupProgressBars(a1); v22 = cocos2d::CCMenu::create(); a1->addChild(a1, v22); v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_menuBtn_001.png"); if ( GameManager::sharedState()->m_playLayer->m_level->m_levelType == Editor || (v24 = GameManager::sharedState(), v24->m_hasRP.random - v24->m_hasRP.seed > 0) ) { v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); setScale = v25->setScale; width = v23->getContentSize(v23)->width; v28 = (float *)v25->getContentSize(v25); setScale(v25, width / *v28); v91.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v91.adj = (size_t)PauseLayer::onTryEdit; v29 = CCMenuItemSpriteExtra::create(v25, nullptr, v91); v22->addChild(v22, v29); } if ( GameManager::sharedState()->m_playLayer->m_levelSettings->m_platformerMode ) { v72 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayFullBtn_001.png"); v97.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v97.adj = (size_t)PauseLayer::onRestartFull; v73 = CCMenuItemSpriteExtra::create(v72, nullptr, v97); v22->addChild(v22, v73); } if ( GameManager::sharedState()->m_playLayer->m_isPracticeMode ) { v30 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_normalBtn_001.png"); v92.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v92.adj = (size_t)PauseLayer::onNormalMode; } else { v30 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_practiceBtn_001.png"); v92.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v92.adj = (size_t)PauseLayer::onPracticeMode; } v32 = CCMenuItemSpriteExtra::create(v30, nullptr, v92); v22->addChild(v22, v32); v33 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v93.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v93.adj = (size_t)PauseLayer::onResume; v34 = CCMenuItemSpriteExtra::create(v33, nullptr, v93); v22->addChild(v22, v34); v94.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v94.adj = (size_t)PauseLayer::tryQuit; v35 = CCMenuItemSpriteExtra::create(v23, nullptr, v94); v22->addChild(v22, v35); v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayBtn_001.png"); v95.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v95.adj = (size_t)PauseLayer::onRestart; v37 = CCMenuItemSpriteExtra::create(v36, nullptr, v95); v22->addChild(v22, v37); if ( GameManager::sharedState()->m_playLayer->m_level->m_levelType == Editor ) v38 = 10.0; else v38 = 15.0; cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v22, v38); v78 = (cocos2d::CCRect *)v22->setPosition; v39 = (float *)v22->getPosition(v22); cocos2d::CCPoint::CCPoint(&v87.origin, *v39, (float)(v81 * 0.5) + -30.0); ((void (__fastcall *)(cocos2d::CCMenu *, cocos2d::CCRect *))v78)(v22, &v87); if ( !GameManager::sharedState()->m_clickedPractice && GameManager::sharedState()->m_playLayer->m_level->m_levelType != Editor && !GameManager::sharedState()->m_playLayer->m_levelSettings->m_platformerMode ) { v79 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_practiceTxt_001.png"); a1->addChild(a1, v79); v71 = v79->setPosition; cocos2d::CCPoint::CCPoint(&v87.origin, (float)(v80 * 0.5) + -190.0, (float)(v81 * 0.5) + -12.0); v71(v79, &v87.origin); } v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); v40->setScale(v40, 0.6); v96.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v96.adj = (size_t)PauseLayer::onSettings; v41 = CCMenuItemSpriteExtra::create(v40, nullptr, v96); v22->addChild(v22, v41); v42 = v41->setPosition; cocos2d::CCPoint::CCPoint( &v85, (float)((float)(v8 * 0.5) + (float)(v80 * 0.5)) - 26.0, (float)(v20 + (float)(v81 * 0.5)) - 26.0); v88 = cocos2d::CCNode::convertToNodeSpace(v22, &v85); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v42)(v41, &v87, v88.x, v88.y); cocos2d::CCPoint::CCPoint(&v83, v80 * 0.5, (float)(v81 * 0.5) + -105.0); v43 = (Slider *)Slider::create(a1, (void (__cdecl *)(cocos2d::CCObject *))PauseLayer::musicSliderChanged, 0, 0.8); Slider::setBarVisibility(v43, 1); a1->addChild(a1, v43); v44 = v43->setPosition; cocos2d::CCPoint::CCPoint(&v85, -100.0, 0.0); cocos2d::CCPoint::operator+(&v87, &v83, &v85); v44(v43, &v87.origin); v45 = FMODAudioEngine::sharedEngine(); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v45); Slider::setValue(v43, BackgroundMusicVolume); v47 = (Slider *)Slider::create(a1, (void (__cdecl *)(cocos2d::CCObject *))PauseLayer::sfxSliderChanged, 0, 0.8); Slider::setBarVisibility(v47, 1); a1->addChild(a1, v47); v76 = (cocos2d::CCPoint *)v47->setPosition; cocos2d::CCPoint::CCPoint(&v85, 100.0, 0.0); cocos2d::CCPoint::operator+(&v87, &v83, &v85); ((void (__fastcall *)(Slider *, cocos2d::CCRect *))v76)(v47, &v87); v48 = FMODAudioEngine::sharedEngine(); EffectsVolume = FMODAudioEngine::getEffectsVolume(v48); Slider::setValue(v47, EffectsVolume); v50 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v50, 1); v51 = v43; getPosition = v43->getPosition; v53 = v50->setPosition; v77 = (cocos2d::CCPoint *)getPosition(v51); cocos2d::CCPoint::CCPoint(&v85, 0.0, 20.0); cocos2d::CCPoint::operator+(&v87, v77, &v85); v53(v50, &v87.origin); v50->setScale(v50, 0.5); v54 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v54, 1); v55 = v47; v56 = v47->getPosition; v57 = v54->setPosition; v58 = (__int64)v56(v55); cocos2d::CCPoint::CCPoint(&v85, 0.0, 20.0); cocos2d::CCPoint::operator+(&v87, v58, &v85); v57(v54, &v87.origin); v54->setScale(v54, 0.5); if ( PlatformToolbox::isControllerConnected() ) { v59 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); a1->addChild(a1, v59); v60 = v34->getParent(v34); v61 = v34->getPosition(v34); cocos2d::CCNode::convertToWorldSpace(v60, v61); cocos2d::CCNode::convertToNodeSpace(a1, &v87.origin); v62 = v59->setPosition; cocos2d::CCPoint::CCPoint(&v85, 0.0, -40.0); cocos2d::CCPoint::operator+(&v87, v84, &v85); v62(v59, &v87.origin); v63 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); a1->addChild(a1, v63); v64 = v35->getParent(v35); v65 = v35->getPosition(v35); cocos2d::CCNode::convertToWorldSpace(v64, v65); v89 = cocos2d::CCNode::convertToNodeSpace(a1, &v85); cocos2d::CCPoint::operator=(v84, v89.x, v89.y); v66 = v63->setPosition; cocos2d::CCPoint::CCPoint(&v85, 0.0, -30.0); cocos2d::CCPoint::operator+(&v87, v84, &v85); v66(v63, &v87.origin); v63->setScale(v63, 0.8); v67 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png"); a1->addChild(a1, v67); v68 = v32->getParent(v32); v69 = v32->getPosition(v32); cocos2d::CCNode::convertToWorldSpace(v68, v69); v90 = cocos2d::CCNode::convertToNodeSpace(a1, &v85); cocos2d::CCPoint::operator=(v84, v90.x, v90.y); v70 = v67->setPosition; cocos2d::CCPoint::CCPoint(&v85, 0.0, -30.0); cocos2d::CCPoint::operator+(&v87, v84, &v85); v70(v67, &v87.origin); v67->setScale(v67, 0.8); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source