// // SetupGameplayOffsetPopup::init from 0x549f4c to 0x54a360 (1044 bytes) // // 1 xrefs: // > SetupGameplayOffsetPopup::create @ 0x54a3d6 // // 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 SetupGameplayOffsetPopup::init(SetupGameplayOffsetPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { _BOOL4 v4; // r11 cocos2d::CCDirector *v5; // r0 int v6; // s17 ButtonSprite *v7; // r0 CCMenuItemSpriteExtra *v8; // r5 cocos2d::CCMenu *m_buttonMenu; // r9 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 bool v12; // [sp+4h] [bp-68h] cocos2d::CCSize v13; // [sp+3Ch] [bp-30h] BYREF cocos2d::CCPoint v14; // [sp+44h] [bp-28h] BYREF cocos2d::CCPoint v15; // [sp+4Ch] [bp-20h] BYREF cocos2d::CCPoint v16; // [sp+54h] [bp-18h] BYREF cocos2d::CCPoint v17; // [sp+5Ch] [bp-10h] BYREF v4 = SetupTriggerPopup::init(a1, a2, a3, 380.0, 240.0, 1); if ( v4 ) { SetupTriggerPopup::preSetup(a1); sub_776584((int)&v17, "Gameplay Offset"); SetupTriggerPopup::addTitle((int)a1); sub_774008(&v17); sub_776584((int)&v17, "OK"); SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v17); sub_774008(&v17); sub_776584((int)&v16, "Help"); sub_776584( (int)&v17, "Change the offset between the player and the camera center. 0 = player will be placed in the center of the camera."); SetupTriggerPopup::addHelpButton((int)a1, (int)&v16, (int)&v17, 1065353216); sub_774008(&v17); sub_774008(&v16); SetupTriggerPopup::createMultiTriggerItemsDefault(a1); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v13, v5); cocos2d::CCPoint::CCPoint(&v14, (float)(v13.width * 0.5) - 80.0, (float)(v13.height * 0.5) + 55.0); sub_776584((int)&v15, "Offset X:"); cocos2d::CCPoint::CCPoint(&v16, 0.0, 0.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 28, (int)&v15, &v17, (cocos2d::CCZone *)0x3F4CCCCD, 0, Int, 10, 0, (cocos2d::CCFloat *)0xC2C80000, 100.0, 0, 28, 0, 2, 0); sub_774008(&v15); sub_776584((int)&v15, "Offset Y:"); cocos2d::CCPoint::CCPoint(&v16, 0.0, -60.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 29, (int)&v15, &v17, (cocos2d::CCZone *)0x3F4CCCCD, 0, Int, 10, 0, (cocos2d::CCFloat *)0xC2C80000, 100.0, 0, 29, 0, 2, 0); sub_774008(&v15); v6 = (int)COERCE_FLOAT(((int (__fastcall *)(SetupGameplayOffsetPopup *, int))a1->getValue)(a1, 101)); sub_776584((int)&v15, "X\nOnly"); cocos2d::CCPoint::CCPoint(&v16, 105.0, -8.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createCustomToggleValueControl( a1, 1, v6 == 1, 1, (std::string)&v15, (cocos2d::CCPoint)(unsigned int)&v17, 0, 0); sub_774008(&v15); sub_776584((int)&v15, "Y\nOnly"); cocos2d::CCPoint::CCPoint(&v16, 105.0, -68.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createCustomToggleValueControl( a1, 2, v6 == 2, 1, (std::string)&v15, (cocos2d::CCPoint)(unsigned int)&v17, 0, 0); sub_774008(&v15); sub_776584((int)&v15, "Dont\nZoom"); cocos2d::CCPoint::CCPoint(&v16, 180.0, -8.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createToggleValueControl(a1, 58, (int)&v15, &v17, 0, 0, 0, 1.0); sub_774008(&v15); sub_776584((int)&v15, "Dont\nZoom"); cocos2d::CCPoint::CCPoint(&v16, 180.0, -68.0); cocos2d::CCPoint::operator+(&v17, &v14, &v16); SetupTriggerPopup::createToggleValueControl(a1, 59, (int)&v15, &v17, 0, 0, 0, 1.0); sub_774008(&v15); v7 = ButtonSprite::create((ButtonSprite *)"Default", (const char *)&dword_58 + 2, 0, 0.4, 0.0, v12); LODWORD(v17.x) = SetupGameplayOffsetPopup::onDefaultValues; v17.y = 0.0; v8 = CCMenuItemSpriteExtra::create( v7, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetupGameplayOffsetPopup::onDefaultValues, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v8); m_buttonMenu = a1->m_buttonMenu; setPosition = v8->setPosition; cocos2d::CCPoint::CCPoint( &v15, (float)((float)(a1->m_width * 0.5) + (float)(v13.width * 0.5)) - 40.0, (float)((float)(a1->m_height * 0.5) + (float)(v13.height * 0.5)) - 25.0); cocos2d::CCNode::convertToNodeSpace(&v16, m_buttonMenu, &v15); setPosition(v8, &v16); SetupTriggerPopup::postSetup(a1); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source