//
// EditorUI::scaleObjects from 0x70f744 to 0x70f9ae (618 bytes)
//
// 3 xrefs:
// > EditorUI::scaleXChanged @ 0x70fa24
// > EditorUI::scaleYChanged @ 0x70fab4
// > EditorUI::scaleXYChanged @ 0x70fb48
//
// 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:57:43 +0000
//
unsigned int __fastcall EditorUI::scaleObjects(
cocos2d::CCArray *a1,
cocos2d::CCArray *this,
float a3,
float a4,
cocos2d::CCPoint *a5,
int a6,
char a7)
{
unsigned int v9; // r7
int v12; // r11
float v13; // s16
float v14; // s20
unsigned int result; // r0
float v16; // s15
float v17; // s15
unsigned int i; // r7
GameObject *v19; // r11
float *v20; // r0
float v21; // s16
float v22; // s17
int v23; // r0
float v24; // s16
float v25; // s17
int v26; // r0
int v27; // [sp+Ch] [bp-28h]
float v28; // [sp+14h] [bp-20h] BYREF
float v29; // [sp+18h] [bp-1Ch]
_BYTE v30[8]; // [sp+1Ch] [bp-18h] BYREF
unsigned int v31[2]; // [sp+24h] [bp-10h] BYREF
v9 = 0;
v27 = (int)a1 + 344;
while ( v9 < cocos2d::CCArray::count(this) )
{
v12 = cocos2d::CCArray::objectAtIndex(this, v9);
v31[0] = *(_DWORD *)(v12 + 780);
std::unordered_map::operator[](v27, v31);
if ( *((_BYTE *)a1 + 511) )
{
v13 = 4.0;
v14 = 0.25;
}
else
{
v13 = 4.0;
v14 = 0.5;
if ( !GameObject::isTrigger((GameObject *)v12) )
v13 = 2.0;
}
if ( a6 == 2 )
goto LABEL_9;
result = lroundf();
v17 = (float)(int)result / 100.0;
if ( v17 < v14 || v17 > v13 || (float)(v17 * *(float *)(v12 + 1132)) == *(float *)(v12 + 1008) )
return result;
if ( a6 != 1 )
{
LABEL_9:
result = lroundf();
v16 = (float)(int)result / 100.0;
if ( v16 < v14 || v16 > v13 || (float)(v16 * *(float *)(v12 + 1136)) == *(float *)(v12 + 1012) )
return result;
}
++v9;
}
if ( cocos2d::CCPoint::equals(a5, (const cocos2d::CCPoint *)&unk_D2DBE0) )
{
EditorUI::getGroupCenter((EditorUI *)v31, a1, this, 0);
cocos2d::CCPoint::operator=(a5, v31);
}
for ( i = 0; ; ++i )
{
result = cocos2d::CCArray::count(this);
if ( i >= result )
break;
v19 = (GameObject *)cocos2d::CCArray::objectAtIndex(this, i);
v31[0] = *((_DWORD *)v19 + 195);
v20 = (float *)std::unordered_map::operator[]((int)a1 + 344, v31);
v21 = v20[2] * *((float *)v19 + 283);
v22 = v20[3] * *((float *)v19 + 284);
v23 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v19 + 96))(v19);
v24 = v21 * a3;
v25 = v22 * a4;
cocos2d::CCPoint::operator-(&v28, v23, a5);
if ( a6 == 2 || (v28 = v28 * (float)(v24 / *((float *)v19 + 252)), a6 != 1) )
v29 = v29 * (float)(v25 / *((float *)v19 + 253));
cocos2d::CCPoint::operator+(v30, a5, &v28);
if ( a6 == 2 || (GameObject::updateCustomScaleX(v19, v24), a6 != 1) )
GameObject::updateCustomScaleY(v19, v25);
if ( !a7 )
{
v26 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v19 + 96))(v19);
cocos2d::CCPoint::operator-(v31, v30, v26);
EditorUI::moveObject((int)a1, v19, (int)v31);
}
}
return result;
}