// // AchievementsLayer::customSetup from 0x140082000 to 0x1400822ad (685 bytes) // // 3 xrefs: // > @ 0x14053c390 // > @ 0x1406c69fc // > @ 0x1406c6a08 // // 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 AchievementsLayer::customSetup(AchievementsLayer *a1) { cocos2d::CCDirector *v2; // rax __int64 v3; // rdx __int64 v4; // rcx char v5; // bp __int64 v6; // rcx const char *v7; // rdi float v8; // xmm6_4 cocos2d::CCNode *v9; // r14 const char *v10; // rcx struct cocos2d::CCSprite *v11; // rax CCMenuItemSpriteExtra *v12; // rax CCMenuItemSpriteExtra_vtbl *v13; // rbx __int64 v14; // rcx cocos2d::CCDirector *v15; // rax float v16; // xmm0_4 struct cocos2d::CCPoint v17; // rax cocos2d::CCSprite *v18; // rax cocos2d::CCNode *v19; // rbx CCMenuItemSpriteExtra *v20; // rax CCMenuItemSpriteExtra_vtbl *v21; // rbx __int64 v22; // rcx cocos2d::CCDirector *v23; // rax float v24; // xmm0_4 struct cocos2d::CCPoint v25; // rax cocos2d::CCLabelBMFont *v26; // rax cocos2d::CCLayer *m_mainLayer; // rcx cocos2d::CCLabelBMFont_vtbl *v28; // rbx __int64 v29; // rcx cocos2d::CCDirector *v30; // rax float v31; // xmm6_4 __int64 v32; // rcx cocos2d::CCDirector *v33; // rax float v34; // xmm0_4 const cocos2d::CCPoint *v35; // rax cocos2d::CCLabelBMFont_vtbl *v36; // rbx const cocos2d::CCPoint *v37; // rax float v38; // [rsp+64h] [rbp+Ch] cocos2d::CCPoint v39; // [rsp+68h] [rbp+10h] BYREF struct cocos2d::CCPoint v40; // [rsp+70h] [rbp+18h] BYREF v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2); v5 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v4, v3) + 197); v7 = "GJ_arrow_01_001.png"; v8 = v38 * 0.5; v9 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v6); v10 = "GJ_arrow_01_001.png"; if ( v5 ) v10 = "controllerBtn_DPad_Left_001.png"; v11 = cocos2d::CCSprite::createWithSpriteFrameName(v10); v12 = CCMenuItemSpriteExtra::create(v11, nullptr, a1, (cocos2d::SEL_MenuHandler *)AchievementsLayer::onPrevPage); a1->m_prevPageButton = v12; v9->addChild_1(v9, v12); v13 = a1->m_prevPageButton->__vftable; v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14); v16 = cocos2d::CCDirector::getScreenLeft(v15) + 24.0; cocos2d::CCPoint::CCPoint(&v39, v16, v8); v17 = cocos2d::CCNode::convertToNodeSpace(v9, &v40); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v13->setPosition_0)(a1->m_prevPageButton, v17); if ( v5 ) v7 = "controllerBtn_DPad_Right_001.png"; v18 = cocos2d::CCSprite::createWithSpriteFrameName(v7); v19 = v18; if ( !v5 ) cocos2d::CCSprite::setFlipX(v18, 1); v20 = CCMenuItemSpriteExtra::create(v19, nullptr, a1, (cocos2d::SEL_MenuHandler *)AchievementsLayer::onNextPage); a1->m_nextPageButton = v20; v9->addChild_1(v9, v20); v21 = a1->m_nextPageButton->__vftable; v23 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22); v24 = cocos2d::CCDirector::getScreenRight(v23) - 24.0; cocos2d::CCPoint::CCPoint(&v39, v24, v8); v25 = cocos2d::CCNode::convertToNodeSpace(v9, &v40); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v21->setPosition_0)(a1->m_nextPageButton, v25); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v9, 10); v26 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt"); m_mainLayer = a1->m_mainLayer; a1->m_pageLabel = v26; m_mainLayer->addChild_1(m_mainLayer, v26); v28 = a1->m_pageLabel->__vftable; v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29); v31 = cocos2d::CCDirector::getScreenTop(v30) - 4.0; v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32); v34 = (float)(cocos2d::CCDirector::getScreenRight(v33) - 7.0) - 0.0; cocos2d::CCPoint::CCPoint(&v39, v34, v31); v28->setPosition_0(a1->m_pageLabel, v35); v36 = a1->m_pageLabel->__vftable; cocos2d::CCPoint::CCPoint(&v39, 1.0, 1.0); v36->setAnchorPoint(a1->m_pageLabel, v37); ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_pageLabel->setScale_0)(a1->m_pageLabel); AchievementsLayer::loadPage(a1, 0); if ( v5 ) GameToolbox::addRThumbScrollButton(a1->m_mainLayer); }