// // RetryLevelLayer::customSetup from 0x7ede68 to 0x7ee628 (1984 bytes) // // 2 xrefs: // > @ 0xb8f20 // > @ 0x1186048 // // 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 RetryLevelLayer::customSetup(RetryLevelLayer *a1) { cocos2d::CCDirector *v2; // x0 cocos2d::CCLabelBMFont *v3; // x26 cocos2d::CCArray **p_m_pTargetArray; // x0 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float v6; // s0 float v7; // s1 GameManager *v8; // x0 cocos2d::CCString *v9; // x0 cocos2d::CCLabelBMFont *v10; // x26 int m_totalTime; // w4 __int64 v12; // x3 __int64 v13; // x2 cocos2d::CCString *v14; // x0 const char *CString; // x0 cocos2d::CCString *v16; // x0 cocos2d::CCLabelBMFont *v17; // x25 cocos2d::CCLabelBMFont *v18; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v20)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v21; // x28 cocos2d::CCMenu *v22; // x0 cocos2d::CCLayer *m_mainLayer; // x3 cocos2d::CCLayer *v24; // x26 cocos2d::CCMenu *m_mainMenu; // x25 cocos2d::CCSprite *v26; // x0 CCMenuItemSpriteExtra *v27; // x26 void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCSprite *v29; // x0 CCMenuItemSpriteExtra *v30; // x25 void (__fastcall *v31)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCArray **v32; // x19 cocos2d::CCSprite *v33; // x27 cocos2d::CCLayer *v34; // x28 const cocos2d::CCPoint *v35; // x0 void (__fastcall *v36)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCSprite *v37; // x26 cocos2d::CCLayer *v38; // x19 cocos2d::CCNode *v39; // x27 const cocos2d::CCPoint *v40; // x0 void (__fastcall *v41)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 unsigned int *v44; // x3 int v45; // w0 cocos2d::CCNode *v46; // [xsp+78h] [xbp+78h] float v47; // [xsp+88h] [xbp+88h] float v48; // [xsp+8Ch] [xbp+8Ch] cocos2d::CCPoint v49; // [xsp+90h] [xbp+90h] BYREF _BYTE v50[8]; // [xsp+98h] [xbp+98h] BYREF _BYTE v51[8]; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCPoint v52; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCLabelBMFont *v53; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v54; // 0:kr30_8.8 cocos2d::SEL_MenuHandler v55; // 0:x2.16 cocos2d::SEL_MenuHandler v56; // 0:x2.16 v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); GameManager::sharedState(); sub_D18D28(&v53); v3 = cocos2d::CCLabelBMFont::create(); p_m_pTargetArray = &v53[-1].m_pTargetArray; if ( &v53[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v53[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v53[-1].m_nExtraKerning; v53[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } setPosition = v3->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, v47 * 0.5, (float)((float)(v48 * 0.5) + 80.0) - 15.0); setPosition(v3, (const cocos2d::CCPoint *)&v53); a1->m_mainLayer->addChild(a1->m_mainLayer, v3); cocos2d::CCLabelBMFont::limitLabelWidth(v3, 320.0, 0.0, 0.0); RetryLevelLayer::setupLastProgress(a1); a1->m_mainLayer->removeChildByTag_0(a1->m_mainLayer, 0, 1); a1->m_mainLayer->removeChildByTag_0(a1->m_mainLayer, 1, 1); a1->m_buttonMenu->setVisible(a1->m_buttonMenu, 0); cocos2d::CCPoint::CCPoint(&v52, 0.0, 5.0); cocos2d::CCPoint::operator+(&v53, &a1->m_endPosition, &v52); cocos2d::CCPoint::operator=(&a1->m_endPosition, v6, v7); cocos2d::CCPoint::CCPoint(&v49, v47 * 0.5, (float)((float)(v48 * 0.5) + -10.0) - 15.0); v8 = GameManager::sharedState(); v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Jumps: %i", (const char *)(unsigned int)v8->m_playLayer->m_jumps); cocos2d::CCString::getCString(v9); v10 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v10, 3); v10->setPosition(v10, &v49); v10->setScale(v10, 0.8); m_totalTime = (int)GameManager::sharedState()->m_playLayer->m_gameState.m_totalTime; v12 = (unsigned int)(m_totalTime % 60); v13 = (unsigned int)(m_totalTime / 60 % 60); if ( m_totalTime / 3600 ) v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%02d:%02d:%02d", (const char *)(unsigned int)(m_totalTime / 3600), v13, v12); else v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%02d:%02d", (const char *)(unsigned int)v13, (unsigned int)v12); CString = cocos2d::CCString::getCString(v14); v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", CString); cocos2d::CCString::getCString(v16); v17 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v17, 3); v18 = v10; getPosition = v10->getPosition; v20 = v17->setPosition; v21 = (__int64)getPosition(v18); cocos2d::CCPoint::CCPoint(&v52, 0.0, -24.0); cocos2d::CCPoint::operator+(&v53, v21, &v52); v20(v17, (const cocos2d::CCPoint *)&v53); v17->setScale(v17, 0.8); v22 = cocos2d::CCMenu::create(); m_mainLayer = a1->m_mainLayer; a1->m_mainMenu = v22; m_mainLayer->addChild_0(m_mainLayer, v22, 1); v24 = a1->m_mainLayer; m_mainMenu = a1->m_mainMenu; cocos2d::CCPoint::CCPoint(&v52, v47 * 0.5, (float)((float)(v48 * 0.5) + -115.0) - 10.0); cocos2d::CCNode::convertToWorldSpace(v24, &v52); cocos2d::CCNode::convertToNodeSpace(m_mainMenu, (const cocos2d::CCPoint *)&v53); v26 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayBtn_001.png"); v55.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v55.adj = (size_t)RetryLevelLayer::onReplay; v27 = CCMenuItemSpriteExtra::create(v26, nullptr, v55); a1->m_mainMenu->addChild(a1->m_mainMenu, v27); v28 = v27->setPosition; cocos2d::CCPoint::CCPoint(&v52, -100.0, 0.0); cocos2d::CCPoint::operator+(&v53, v50, &v52); v28(v27, (const cocos2d::CCPoint *)&v53); v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_menuBtn_001.png"); v56.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v56.adj = (size_t)RetryLevelLayer::onMenu; v30 = CCMenuItemSpriteExtra::create(v29, nullptr, v56); a1->m_mainMenu->addChild(a1->m_mainMenu, v30); v31 = v30->setPosition; cocos2d::CCPoint::CCPoint(&v52, 100.0, 0.0); cocos2d::CCPoint::operator+(&v53, v50, &v52); v31(v30, (const cocos2d::CCPoint *)&v53); a1->m_mainLayer->setPosition(a1->m_mainLayer, &a1->m_endPosition); if ( PlatformToolbox::isControllerConnected() ) { v33 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v33, 10); v34 = a1->m_mainLayer; v46 = v27->getParent(v27); v35 = v27->getPosition(v27); cocos2d::CCNode::convertToWorldSpace(v46, v35); cocos2d::CCNode::convertToNodeSpace(v34, (const cocos2d::CCPoint *)&v53); v36 = v33->setPosition; cocos2d::CCPoint::CCPoint(&v52, 0.0, -25.0); cocos2d::CCPoint::operator+(&v53, v51, &v52); v36(v33, (const cocos2d::CCPoint *)&v53); v37 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v37, 10); v38 = a1->m_mainLayer; v39 = v30->getParent(v30); v40 = v30->getPosition(v30); cocos2d::CCNode::convertToWorldSpace(v39, v40); v54 = cocos2d::CCNode::convertToNodeSpace(v38, &v52); cocos2d::CCPoint::operator=(v51, v54.x, v54.y); v41 = v37->setPosition; cocos2d::CCPoint::CCPoint(&v52, 0.0, -25.0); cocos2d::CCPoint::operator+(&v53, v51, &v52); v41(v37, (const cocos2d::CCPoint *)&v53); v37->setScale(v37, 0.8); } sub_D153B8((int)&v53, "Geometry Dash"); PlatformToolbox::tryShowRateDialog(&v53); v32 = &v53[-1].m_pTargetArray; if ( &v53[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v44 = (unsigned int *)&v53[-1].m_nExtraKerning; do v45 = __ldaxr(v44); while ( __stlxr(v45 - 1, v44) ); } else { v45 = v53[-1].m_nExtraKerning; v53[-1].m_nExtraKerning = v45 - 1; } if ( v45 <= 0 ) operator delete(v32); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source