// // AchievementsLayer::customSetup from 0x100421df8 to 0x10042209c (676 bytes) // // 1 xrefs: // > @ 0x100825b38 // // 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 __fastcall AchievementsLayer::customSetup(AchievementsLayer *a1) { cocos2d::CCDirector *v2; // x0 _BOOL4 isControllerConnected; // w20 cocos2d::CCMenu *v4; // x21 unsigned __int32 v5; // s8 float v6; // s9 const char *v7; // x0 const char *v8; // x22 cocos2d::CCSprite *v9; // x0 CCMenuItemSpriteExtra *v10; // x0 CCMenuItemSpriteExtra *m_prevPageButton; // x23 cocos2d::CCDirector *v12; // x0 __n128 v13; // q0 __n128 v14; // q1 cocos2d::CCSprite *v15; // x0 cocos2d::CCNode *v16; // x22 CCMenuItemSpriteExtra *v17; // x0 CCMenuItemSpriteExtra *m_nextPageButton; // x22 cocos2d::CCDirector *v19; // x0 __n128 v20; // q0 __n128 v21; // q1 cocos2d::CCLabelBMFont *v22; // x0 cocos2d::CCLabelBMFont *m_pageLabel; // x21 cocos2d::CCDirector *v24; // x0 float v25; // s8 AppDelegate *v26; // x0 float v27; // s0 float v28; // s8 cocos2d::CCDirector *v29; // x0 __n128 v30; // q1 __n128 v31; // q0 __n128 v32; // q0 cocos2d::CCLabelBMFont *v33; // x21 __n128 v34; // q1 cocos2d::CCPoint v35; // [xsp+8h] [xbp-58h] BYREF _DWORD v36[4]; // [xsp+10h] [xbp-50h] BYREF cocos2d::CCPoint v37; // 0:kr08_8.8 cocos2d::CCPoint v38; // 0:kr10_8.8 cocos2d::SEL_MenuHandler v39; // 0:x3.16 cocos2d::SEL_MenuHandler v40; // 0:x3.16 v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); isControllerConnected = PlatformToolbox::isControllerConnected(); v4 = cocos2d::CCMenu::create(); *(float *)&v5 = *(float *)&v36[3] * 0.5; if ( AppDelegate::get()->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] ) v6 = 49.0; else v6 = 24.0; if ( isControllerConnected ) v7 = "controllerBtn_DPad_Left_001.png"; else v7 = "GJ_arrow_01_001.png"; if ( isControllerConnected ) v8 = "controllerBtn_DPad_Right_001.png"; else v8 = "GJ_arrow_01_001.png"; v9 = cocos2d::CCSprite::createWithSpriteFrameName(v7); v39.ptr = (void (__cdecl *)(cocos2d::CCObject *))AchievementsLayer::onPrevPage; v39.adj = 0; v10 = CCMenuItemSpriteExtra::create(v9, nullptr, a1, v39); a1->m_prevPageButton = v10; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v4->addChild)(v4, v10); m_prevPageButton = a1->m_prevPageButton; v12 = cocos2d::CCDirector::sharedDirector(); v13.n128_f32[0] = v6 + sub_1001768D8((__int64)v12); v14.n128_u32[0] = v5; sub_100022980(v13, v14, &v35); v37 = cocos2d::CCNode::convertToNodeSpace(v4, &v35); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _DWORD *, float, float))m_prevPageButton->setPosition)( m_prevPageButton, v36, v37.x, v37.y); v15 = cocos2d::CCSprite::createWithSpriteFrameName(v8); v16 = v15; if ( !isControllerConnected ) cocos2d::CCSprite::setFlipX(v15, 1); v40.ptr = (void (__cdecl *)(cocos2d::CCObject *))AchievementsLayer::onNextPage; v40.adj = 0; v17 = CCMenuItemSpriteExtra::create(v16, nullptr, a1, v40); a1->m_nextPageButton = v17; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v4->addChild)(v4, v17); m_nextPageButton = a1->m_nextPageButton; v19 = cocos2d::CCDirector::sharedDirector(); v20.n128_f32[0] = sub_1001768E0((__int64)v19) - v6; v21.n128_u32[0] = v5; sub_100022980(v20, v21, &v35); v38 = cocos2d::CCNode::convertToNodeSpace(v4, &v35); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _DWORD *, float, float))m_nextPageButton->setPosition)( m_nextPageButton, v36, v38.x, v38.y); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v4, 10); v22 = cocos2d::CCLabelBMFont::create_1(" ", "goldFont.fnt"); a1->m_pageLabel = v22; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v22); m_pageLabel = a1->m_pageLabel; v24 = cocos2d::CCDirector::sharedDirector(); v25 = sub_1001768E0((__int64)v24) + -7.0; v26 = AppDelegate::get(); v27 = 0.0; if ( v26->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] ) v27 = 10.0; v28 = v25 - v27; v29 = cocos2d::CCDirector::sharedDirector(); v30.n128_f32[0] = sub_1001768C8((__int64)v29) + -4.0; v31.n128_f32[0] = v28; sub_100022980(v31, v30, v36); v32 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD *))m_pageLabel->setPosition)(m_pageLabel, v36); v33 = a1->m_pageLabel; v32.n128_u32[0] = 1.0; v34.n128_u32[0] = 1.0; sub_100022980(v32, v34, v36); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD *))v33->setAnchorPoint)(v33, v36); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_pageLabel->setScale)(a1->m_pageLabel, 0.6); AchievementsLayer::loadPage(a1, 0); if ( isControllerConnected ) GameToolbox::addRThumbScrollButton(a1->m_mainLayer); }
GD Web Decomp Icon

GD Web Decomp

Raw Source