//
// SetupGameplayOffsetPopup::init from 0x680094 to 0x680518 (1156 bytes)
//
// 1 xrefs:
// > SetupGameplayOffsetPopup::create @ 0x68058e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:56:01 +0000
//
GameManager *__fastcall SetupGameplayOffsetPopup::init(
const cocos2d::CCPoint **this,
EffectGameObject *a2,
cocos2d::CCArray *a3)
{
GameManager *v4; // r11
cocos2d::CCDirector *MultiTriggerItemsDefault; // r0
float v6; // r0
int v7; // s15
ButtonSprite *v8; // r0
int v9; // r7
const cocos2d::CCPoint *v10; // r9
void (__fastcall *v11)(int, _BYTE *); // r8
bool v13; // [sp+4h] [bp-80h]
float v14; // [sp+3Ch] [bp-48h] BYREF
float v15; // [sp+40h] [bp-44h]
_BYTE v16[8]; // [sp+44h] [bp-40h] BYREF
_BYTE v17[8]; // [sp+4Ch] [bp-38h] BYREF
_BYTE v18[8]; // [sp+54h] [bp-30h] BYREF
_DWORD v19[2]; // [sp+5Ch] [bp-28h] BYREF
int v20[3]; // [sp+64h] [bp-20h] BYREF
int v21; // [sp+70h] [bp-14h] BYREF
int v22; // [sp+74h] [bp-10h]
int v23; // [sp+78h] [bp-Ch]
v4 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 380.0, 240.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v4 )
{
SetupTriggerPopup::preSetup((SetupTriggerPopup *)this);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Gameplay Offset", 0xFu);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v21);
std::string::~string((int)&v21);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v21);
std::string::~string((int)&v21);
memset(v20, 0, sizeof(v20));
std::string::__init(v20, "Help", 4u);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(
&v21,
"Change the offset between the player and the camera center. 0 = player will be placed in the center of the camera.",
0x72u);
SetupTriggerPopup::addHelpButton((int)this, (int)v20, (int)&v21, 1065353216);
std::string::~string((int)&v21);
std::string::~string((int)v20);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault((SetupTriggerPopup *)this);
cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (float)(v14 * 0.5) - 80.0, (float)(v15 * 0.5) + 55.0);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Offset X:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 0.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createValueControlAdvanced(
this,
28,
(unsigned __int8 *)&v21,
(int)v19,
1061997773,
0,
2,
10,
0,
-1027080192,
1120403456,
0,
28,
0,
2,
0);
std::string::~string((int)&v21);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Offset Y:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, -60.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createValueControlAdvanced(
this,
29,
(unsigned __int8 *)&v21,
(int)v19,
1061997773,
0,
2,
10,
0,
-1027080192,
1120403456,
0,
29,
0,
2,
0);
std::string::~string((int)&v21);
v6 = (*((float (__fastcall **)(const cocos2d::CCPoint **, int))*this + 183))(this, 101);
v21 = 0;
v22 = 0;
v23 = 0;
v7 = (int)v6;
std::string::__init(&v21, "X\nOnly", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 105.0, -8.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
1,
v7 == 1,
1,
(int)&v21,
(const cocos2d::CCPoint *)v19,
0,
0,
0);
std::string::~string((int)&v21);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Y\nOnly", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 105.0, -68.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
2,
v7 == 2,
1,
(int)&v21,
(const cocos2d::CCPoint *)v19,
0,
0,
0);
std::string::~string((int)&v21);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Dont\nZoom", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 180.0, -8.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 58, (int)&v21, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)&v21);
v21 = 0;
v22 = 0;
v23 = 0;
std::string::__init(&v21, "Dont\nZoom", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 180.0, -68.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 59, (int)&v21, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)&v21);
v8 = ButtonSprite::create((ButtonSprite *)"Default", (const char *)&dword_58 + 2, 0, 0.4, 0.0, v13);
v19[0] = SetupGameplayOffsetPopup::onDefaultValues;
v19[1] = 0;
v9 = CCMenuItemSpriteExtra::create((int)v8, 0, (int)this, (int)SetupGameplayOffsetPopup::onDefaultValues, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v9);
v10 = *(this + 111);
v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v17,
(float)((float)(*((float *)this + 139) * 0.5) + (float)(v14 * 0.5)) - 40.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v15 * 0.5)) - 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v18, v10);
v11(v9, v18);
SetupTriggerPopup::postSetup((SetupTriggerPopup *)this);
}
return v4;
}