//
// SetupForceBlockPopup::init from 0xb7763c to 0xb77c30 (1524 bytes)
//
// 2 xrefs:
// > SetupForceBlockPopup::create @ 0xb77e68
// > ??> @ 0xf9e68
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:02:23 +0000
//
__int64 __fastcall SetupForceBlockPopup::init(
SetupForceBlockPopup *this,
ForceBlockGameObject *a2,
cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w23
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *v12; // x0
cocos2d::CCDirector *v13; // x0
float v14; // s0
_BOOL4 v15; // w20
__int64 v16; // [xsp+80h] [xbp+50h] BYREF
_BYTE v17[8]; // [xsp+88h] [xbp+58h] BYREF
_BYTE v18[8]; // [xsp+90h] [xbp+60h] BYREF
cocos2d::CCDirector *v19[2]; // [xsp+98h] [xbp+68h] BYREF
void *v20; // [xsp+A8h] [xbp+78h]
__int64 v21; // [xsp+B0h] [xbp+80h] BYREF
__int64 v22; // [xsp+B8h] [xbp+88h]
void *v23; // [xsp+C0h] [xbp+90h]
v4 = SetupTriggerPopup::init(this, a2, a3, 380.0, 270.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Setup Force Block", 0x11u);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v21);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v21, v7, v8, v9, v10, v11);
if ( (v21 & 1) != 0 )
operator delete(v23);
v19[0] = nullptr;
v19[1] = nullptr;
v20 = nullptr;
std::string::__init((__int64 *)v19, "Help", 4u);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(
&v21,
"Force is how much force is applied upon player collision.\n"
"Blocks with the same Force ID do not stack.\n"
"Relative makes force direction based on angle between player and object center.\n"
"UseRange lets you set a range to apply force from based on player position. Range calculation is based on block radius.",
0x14Du);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v19, (char *)&v21, 1.0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v12 = (cocos2d::CCDirector *)LOBYTE(v19[0]);
if ( ((__int64)v19[0] & 1) != 0 )
operator delete(v20);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(&v16, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, *(float *)&v16 * 0.5, (float)(*((float *)&v16 + 1) * 0.5) + 30.0);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Force:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, *(float *)&v16 * 0.5, (float)(*((float *)&v16 + 1) * 0.5) + 80.0);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
149,
(char *)&v21,
(__int64)v18,
0,
1,
4,
0,
0.8,
0.0,
5.0,
0,
149,
0,
3,
0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "MinForce:", 9u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
(float)(*(float *)&v16 * 0.5) + -80.0,
(float)(*((float *)&v16 + 1) * 0.5) + 80.0);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
526,
(char *)&v21,
(__int64)v18,
0,
1,
4,
0,
0.8,
0.0,
5.0,
0,
529,
0,
3,
0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "MaxForce:", 9u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
(float)(*(float *)&v16 * 0.5) + 80.0,
(float)(*((float *)&v16 + 1) * 0.5) + 80.0);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
527,
(char *)&v21,
(__int64)v18,
0,
1,
4,
0,
0.8,
0.0,
5.0,
0,
529,
0,
3,
0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Relative", 8u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
(float)(*(float *)&v16 * 0.5) + -80.0,
(float)(*((float *)&v16 + 1) * 0.5) + 15.0);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x210u,
&v21,
(const cocos2d::CCPoint *)v18,
0,
0,
0,
1.0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Range", 5u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
(float)(*(float *)&v16 * 0.5) + 50.0,
(float)(*((float *)&v16 + 1) * 0.5) + 15.0);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x211u,
&v21,
(const cocos2d::CCPoint *)v18,
0,
0,
0,
1.0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "ForceID", 7u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v18,
*(float *)&v16 * 0.5,
(float)(*((float *)&v16 + 1) * 0.5) + -55.0);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
530,
(char *)&v21,
(__int64)v18,
1,
2,
10,
1,
0.8,
0.0,
9999.0,
0,
0,
0,
0,
0);
if ( (v21 & 1) != 0 )
operator delete(v23);
v14 = (*(float (__fastcall **)(SetupForceBlockPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 529);
v15 = v14 != 0.0;
(*(void (__fastcall **)(SetupForceBlockPopup *, __int64, bool))(*(_QWORD *)this + 1352LL))(this, 529, v14 != 0.0);
(*(void (__fastcall **)(SetupForceBlockPopup *, __int64, bool))(*(_QWORD *)this + 1352LL))(this, 149, !v15);
SetupTriggerPopup::postSetup(this);
}
return v5;
}