//
// SetupTransformPopup::init from 0x524594 to 0x524ab4 (1312 bytes)
//
// 1 xrefs:
// > SetupTransformPopup::create @ 0x524c42
//
// 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 SetupTransformPopup::init(SetupTransformPopup *a1, TransformTriggerGameObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
cocos2d::CCPoint v6; // r1
int v8; // [sp+4h] [bp-60h]
_BYTE v9[4]; // [sp+38h] [bp-2Ch] BYREF
cocos2d::CCSize v10; // [sp+3Ch] [bp-28h] BYREF
cocos2d::CCPoint v11; // [sp+44h] [bp-20h] BYREF
cocos2d::CCPoint v12; // [sp+4Ch] [bp-18h] BYREF
_BYTE v13[8]; // [sp+54h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 440.0, 310.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v10, v5);
cocos2d::CCPoint::CCPoint(&v11, v10.width * 0.5, v10.height * 0.5);
sub_776584((int)v13, "Setup Scale Command");
SetupTriggerPopup::addTitle(a1, (std::string)v13);
sub_774008(v13);
sub_776584((int)v13, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)v13);
sub_774008(v13);
SetupTriggerPopup::createMultiTriggerItemsCorner(a1);
sub_776584((int)&v12, "Help");
sub_776584(
(int)v13,
"Scales a specific Target Group ID.\n"
"Center Group ID specifies a target object to use as the center. If none is set, all objects use their own "
"center.\n"
"Duration specifies how long the scaling lasts.\n"
"Div by Value X/Y divides the current scale by the values.\n"
"Only Move makes the objects move as if they were scaled.\n"
"Relative Rotation rotates the X- and Y-axis too.\n"
"Relative Scale bases scaling on the reference object.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v12, (std::string)v13, 1.0);
sub_774008(v13);
sub_774008(&v12);
sub_776584((int)v9, "Only\nMove");
cocos2d::CCPoint::CCPoint(&v12, 110.0 - (float)(a1->m_width * 0.5), 50.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createToggleValueControl((int)a1, 133, (int)v9, (int)v13, 0, 0, 0, 1.0);
sub_774008(v9);
sub_776584((int)v9, "ScaleX:");
cocos2d::CCPoint::CCPoint(&v12, -100.0, 105.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
150,
(int)v9,
(int)v13,
0.9,
0,
1,
10,
0,
COERCE_COCOS2D_CCFLOAT_(0.5),
2.0,
0,
0,
0,
3,
0);
sub_774008(v9);
sub_776584((int)v9, "ScaleY:");
cocos2d::CCPoint::CCPoint(&v12, 105.0, 105.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
151,
(int)v9,
(int)v13,
0.9,
0,
1,
10,
0,
COERCE_COCOS2D_CCFLOAT_(0.5),
2.0,
0,
0,
0,
3,
0);
sub_774008(v9);
sub_776584((int)v9, "Div by Value X");
cocos2d::CCPoint::CCPoint(&v12, -150.0, 50.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createToggleValueControl((int)a1, 153, (int)v9, (int)v13, 0, 0, 0, 1.0);
sub_774008(v9);
sub_776584((int)v9, "Div by Value Y");
cocos2d::CCPoint::CCPoint(&v12, 55.0, 50.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createToggleValueControl((int)a1, 154, (int)v9, (int)v13, 0, 0, 0, 1.0);
sub_774008(v9);
cocos2d::CCPoint::CCPoint(&v12, -100.0, 20.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
LODWORD(v6.x) = v13;
v6.y = 0.8;
SetupTriggerPopup::createEasingControls(a1, v6, 0.0, 0, v8);
sub_776584((int)v9, "Duration:");
cocos2d::CCPoint::CCPoint(&v12, -100.0, -45.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
10,
(int)v9,
(int)v13,
0.9,
0,
1,
10,
0,
nullptr,
10.0,
0,
0,
0,
2,
0);
sub_774008(v9);
sub_776584((int)v9, "Center Group ID:");
cocos2d::CCPoint::CCPoint(&v12, 115.0, -20.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
71,
(int)v9,
(int)v13,
0.9,
1,
2,
10,
1,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
0,
0,
0);
sub_774008(v9);
sub_776584((int)v9, "Target Group ID:");
cocos2d::CCPoint::CCPoint(&v12, 115.0, -90.0);
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
51,
(int)v9,
(int)v13,
0.9,
1,
2,
10,
1,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
0,
0,
0);
sub_774008(v9);
sub_776584((int)v9, "Relative\nScale");
cocos2d::CCPoint::CCPoint(&v12, 50.0, 20.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createToggleValueControl((int)a1, 577, (int)v9, (int)v13, 0, 0, 0, 1.0);
sub_774008(v9);
sub_776584((int)v9, "Relative\nRotation");
cocos2d::CCPoint::CCPoint(&v12, (float)(a1->m_width * 0.5) - 85.0, 20.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(v13, &v11, &v12);
SetupTriggerPopup::createToggleValueControl((int)a1, 452, (int)v9, (int)v13, 0, 0, 0, 1.0);
sub_774008(v9);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}