// // GJOptionsLayer::init from 0x10029bd70 to 0x10029c083 (787 bytes) // // 10 xrefs: // > LevelOptionsLayer::create @ 0x10026e93e // > LevelOptionsLayer::init @ 0x10027141a // > LevelOptionsLayer2::init @ 0x100271dd2 // > GJOptionsLayer::create @ 0x10029bd35 // > EditorOptionsLayer::create @ 0x10029dcbf // > EditorOptionsLayer::init @ 0x10029dd1e // > GameOptionsLayer::create @ 0x1002b1058 // > GameOptionsLayer::init @ 0x1002b10da // > GameLevelOptionsLayer::create @ 0x1002b24d6 // > GameLevelOptionsLayer::init @ 0x1002b255a // // 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 // bool __fastcall GJOptionsLayer::init(GJOptionsLayer *a1, int a2) { bool result; // al cocos2d::CCDictionary *v3; // rax cocos2d::CCDictionary *v4; // rax cocos2d::CCMenu *v5; // rax cocos2d::CCSprite *v6; // r14 CCMenuItemSpriteExtra *v7; // r14 cocos2d::CCMenu *m_buttonMenu; // r15 cocos2d::CCSprite *v9; // rax CCMenuItemSpriteExtra *v10; // rax CCMenuItemSpriteExtra *m_prevButton; // r15 cocos2d::CCMenu *v12; // r12 cocos2d::CCDirector *v13; // rax cocos2d::CCSprite *v14; // r14 CCMenuItemSpriteExtra *v15; // rax CCMenuItemSpriteExtra *m_nextButton; // r14 cocos2d::CCMenu *v17; // r15 cocos2d::CCDirector *v18; // rax char v19; // [rsp+8h] [rbp-48h] BYREF float v20; // [rsp+10h] [rbp-40h] BYREF float v21; // [rsp+18h] [rbp-38h] BYREF float v22; // [rsp+1Ch] [rbp-34h] float v23; // [rsp+20h] [rbp-30h] bool v24; // [rsp+27h] [rbp-29h] double v25; // 0:xmm0_8.8 double v26; // 0:xmm0_8.8 double v27; // 0:xmm0_8.8 double v28; // 0:xmm0_8.8 result = SetupTriggerPopup::init(a1, nullptr, nullptr, 400.0, 280.0, a2); if ( result ) { a1->m_noElasticity = 1; v24 = result; cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v25 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v21); v3 = cocos2d::CCDictionary::create(); a1->m_variables = v3; cocos2d::CCObject::retain(v3); v4 = cocos2d::CCDictionary::create(); a1->m_values = v4; cocos2d::CCObject::retain(v4); v5 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v5; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64, double))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v5, 10, v25); ((void (__fastcall *)(GJOptionsLayer *))a1->setupOptions)(a1); v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScale)(v6, 0.80000001); v7 = CCMenuItemSpriteExtra::create(v6, nullptr, a1, (cocos2d::SEL_MenuHandler)0x529uLL); CCMenuItemSpriteExtra::setSizeMult(v7, 1.5); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v7); v23 = 0.5; m_buttonMenu = a1->m_buttonMenu; sub_10028CBE0( &v20, (float)((float)(v21 * 0.5) - (float)(a1->m_width * 0.5)) + 3.0, (float)((float)(a1->m_height * 0.5) + (float)(v22 * 0.5)) + -3.0); *(cocos2d::CCPoint *)&v26 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v19, (const cocos2d::CCPoint *)m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v7->setPosition)(v7, &v19, v26); v23 = v23 * v22; v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v10 = CCMenuItemSpriteExtra::create( v9, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJOptionsLayer::onPrevPage); a1->m_prevButton = v10; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v10); m_prevButton = a1->m_prevButton; v12 = a1->m_buttonMenu; v13 = cocos2d::CCDirector::sharedDirector(); *(float *)&v26 = sub_100484D90(v13); sub_10028CBE0(&v20, *(float *)&v26 + 20.0, v23); *(cocos2d::CCPoint *)&v27 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v19, (const cocos2d::CCPoint *)v12); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))m_prevButton->setPosition)(m_prevButton, &v19, v27); CCMenuItemSpriteExtra::setSizeMult(a1->m_prevButton, 1.5); v14 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v14, 1); v15 = CCMenuItemSpriteExtra::create( v14, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJOptionsLayer::onNextPage); a1->m_nextButton = v15; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v15); m_nextButton = a1->m_nextButton; v17 = a1->m_buttonMenu; v18 = cocos2d::CCDirector::sharedDirector(); *(float *)&v27 = sub_100484DA0(v18); sub_10028CBE0(&v20, *(float *)&v27 + -20.0, v23); *(cocos2d::CCPoint *)&v28 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v19, (const cocos2d::CCPoint *)v17); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))m_nextButton->setPosition)(m_nextButton, &v19, v28); CCMenuItemSpriteExtra::setSizeMult(a1->m_nextButton, 1.5); GJOptionsLayer::goToPage(a1, 0); return v24; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source