//
// SetTargetIDLayer::init from 0xa9886c to 0xa98c68 (1020 bytes)
//
// 2 xrefs:
// > SetTargetIDLayer::create @ 0xa98f24
// > ??> @ 0xde730
//
// 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:00:44 +0000
//
__int64 __fastcall SetTargetIDLayer::init(
__int64 *a1,
EffectGameObject *a2,
cocos2d::CCArray *a3,
char *a4,
__int64 a5,
int a6,
int a7,
int a8)
{
unsigned __int8 v12; // w0
unsigned int v13; // w21
__int64 v15; // x1
cocos2d::CCDirector *v16; // x0
cocos2d::CCDirector *v17; // x0
char v18; // w0
__int64 v19; // x0
__int64 v20; // x1
unsigned int v21; // w24
const char *v22; // x1
size_t v23; // x0
char v24; // w0
char *v27; // [xsp+78h] [xbp+68h]
__int64 v28; // [xsp+88h] [xbp+78h] BYREF
_BYTE v29[8]; // [xsp+90h] [xbp+80h] BYREF
_BYTE v30[8]; // [xsp+98h] [xbp+88h] BYREF
__int64 v31; // [xsp+A0h] [xbp+90h] BYREF
__int64 v32; // [xsp+A8h] [xbp+98h] BYREF
size_t v33; // [xsp+B0h] [xbp+A0h]
void *v34; // [xsp+B8h] [xbp+A8h]
__int64 v35[2]; // [xsp+C0h] [xbp+B0h] BYREF
void *v36; // [xsp+D0h] [xbp+C0h]
__int64 v37; // [xsp+D8h] [xbp+C8h] BYREF
size_t v38; // [xsp+E0h] [xbp+D0h]
void *v39; // [xsp+E8h] [xbp+D8h]
__int64 v40; // [xsp+F0h] [xbp+E0h] BYREF
__int64 v41; // [xsp+F8h] [xbp+E8h]
void *v42; // [xsp+100h] [xbp+F0h]
v12 = SetupTriggerPopup::init((SetupTriggerPopup *)a1, a2, a3, 300.0, 240.0, 1, 0.0);
v13 = v12;
if ( !v12 )
return v13;
v15 = *a1;
*((_DWORD *)a1 + 254) = a6;
*((_DWORD *)a1 + 255) = a7;
*((_DWORD *)a1 + 253) = a8;
v16 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(__int64 *))(v15 + 1360))(a1);
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);
cocos2d::CCDirector::getWinSize(&v28, v17);
v40 = 0;
v18 = *a4;
v41 = 0;
v42 = nullptr;
if ( (v18 & 1) != 0 )
{
std::string::__init(&v40, *((void **)a4 + 2), *((_QWORD *)a4 + 1));
}
else
{
v19 = *(_QWORD *)a4;
v20 = *((_QWORD *)a4 + 1);
v42 = *((void **)a4 + 2);
v40 = v19;
v41 = v20;
}
SetupTriggerPopup::addTitle(a1, &v40);
if ( (v40 & 1) != 0 )
operator delete(v42);
v40 = 0;
v41 = 0;
v42 = nullptr;
std::string::__init(&v40, "OK", 2u);
SetupTriggerPopup::addCloseButton(a1, &v40);
if ( (v40 & 1) != 0 )
{
operator delete(v42);
v32 = 0;
v33 = 0;
v34 = nullptr;
if ( a8 != 3662 )
goto LABEL_9;
}
else
{
v32 = 0;
v33 = 0;
v34 = nullptr;
if ( a8 != 3662 )
{
LABEL_9:
std::string::assign(&v32, "Stops an Area trigger using Effect ID.", 0x36u);
goto LABEL_10;
}
}
std::string::assign(
&v32,
"Ensures visibility of every object in Group ID. If one object in the group is visible, all object wi"
"ll be visible even if offscreen.\n"
"Processed at level load and cannot be disabled after.",
0xCAu);
LABEL_10:
v35[0] = 0;
v35[1] = 0;
v36 = nullptr;
std::string::__init(v35, "Help", 4u);
v37 = 0;
v38 = 0;
v39 = nullptr;
if ( (v32 & 1) != 0 )
{
std::string::__init(&v37, v34, v33);
}
else
{
v39 = v34;
v37 = v32;
v38 = v33;
}
SetupTriggerPopup::addHelpButton(a1, v35, &v37, 1.0);
if ( (v37 & 1) != 0 )
{
operator delete(v39);
if ( (v35[0] & 1) == 0 )
goto LABEL_14;
LABEL_26:
operator delete(v36);
goto LABEL_14;
}
if ( (v35[0] & 1) != 0 )
goto LABEL_26;
LABEL_14:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, *(float *)&v28 * 0.5, *((float *)&v28 + 1) * 0.5);
if ( a8 == 3024 )
v21 = 5;
else
v21 = 1;
v22 = (const char *)(a5 + 1);
if ( (*(_BYTE *)a5 & 1) != 0 )
v22 = *(const char **)(a5 + 16);
v27 = (char *)v22;
v40 = 0;
v41 = 0;
v42 = nullptr;
v23 = strlen(v22);
std::string::__init(&v40, v27, v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v31, v29);
IDNameInput::create(a1, a1 + 68, v21, 51, &v40, &v31, 6, 0, 1.0, 0, 0);
if ( (v40 & 1) != 0 )
operator delete(v42);
if ( a8 != 3662 )
SetupTriggerPopup::createMultiTriggerItemsDefault((SetupTriggerPopup *)a1);
(*(void (__fastcall **)(__int64 *))(*a1 + 1432))(a1);
v24 = v32;
*((_BYTE *)a1 + 744) = 0;
if ( (v24 & 1) != 0 )
operator delete(v34);
return v13;
}