//
// SetupObjectControlPopup::init from 0xb77edc to 0xb781b8 (732 bytes)
//
// 2 xrefs:
// > SetupObjectControlPopup::create @ 0xb783e0
// > ??> @ 0xcbba8
//
// 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 SetupObjectControlPopup::init(
SetupObjectControlPopup *this,
ObjectControlGameObject *a2,
cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w22
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *MultiTriggerItemsDefault; // x0
cocos2d::CCDirector *v13; // x0
__int64 v14; // [xsp+60h] [xbp+50h] BYREF
_BYTE v15[8]; // [xsp+68h] [xbp+58h] BYREF
__int64 v16; // [xsp+70h] [xbp+60h] BYREF
_BYTE v17[8]; // [xsp+78h] [xbp+68h] BYREF
__int64 v18; // [xsp+80h] [xbp+70h] BYREF
__int64 v19[2]; // [xsp+88h] [xbp+78h] BYREF
void *v20; // [xsp+98h] [xbp+88h]
__int64 v21; // [xsp+A0h] [xbp+90h] BYREF
__int64 v22; // [xsp+A8h] [xbp+98h]
void *v23; // [xsp+B0h] [xbp+A0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 320.0, 220.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Object Control", 0xEu);
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] = 0;
v19[1] = 0;
v20 = nullptr;
std::string::__init(v19, "Help", 4u);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Control help", 0xCu);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v19, (char *)&v21, 1.0);
if ( (v21 & 1) != 0 )
operator delete(v23);
if ( (v19[0] & 1) != 0 )
operator delete(v20);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize(&v14, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, *(float *)&v14 * 0.5, *((float *)&v14 + 1) * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, -20.0, 40.0);
cocos2d::CCPoint::operator+(&v16, v15);
v21 = 0;
v22 = 0;
v23 = nullptr;
std::string::__init(&v21, "Target ID", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v18, v15);
IDNameInput::create(this, (char *)this + 544, 1, 51, &v21, &v18, 6, 0, 0.8, 1, 0);
if ( (v21 & 1) != 0 )
operator delete(v23);
SetupTriggerPopup::postSetup(this);
}
return v5;
}