//
// EditorUI::updateScaleControl from 0x140202e80 to 0x140202fd7 (343 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407517f0
// > ??> @ 0x1408a3f88
// > ??> @ 0x1408a3fe0
// > ??> @ 0x14091af78
//
// This function is hookable on this platform (idp: pc, 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 11:28:14 +0000
//
__int64 __fastcall EditorUI::updateScaleControl(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rcx
char isTrigger; // bp
cocos2d::CCArray **v5; // r14
cocos2d::CCArray **v6; // rsi
unsigned int v7; // ebx
struct cocos2d::CCObject *v8; // rax
__int64 v9; // rax
__int64 v10; // rax
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 400) + 344LL))(*(_QWORD *)(a1 + 400));
if ( (_BYTE)result )
{
v3 = *(_QWORD *)(a1 + 1136);
isTrigger = 0;
if ( v3 )
{
isTrigger = GameObject::isTrigger(v3);
v5 = (cocos2d::CCArray **)(a1 + 512);
}
else
{
v6 = (cocos2d::CCArray **)(a1 + 512);
v5 = (cocos2d::CCArray **)(a1 + 512);
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 512)) )
{
isTrigger = 1;
v7 = 0;
if ( cocos2d::CCArray::count(*v6) )
{
while ( 1 )
{
v8 = cocos2d::CCArray::objectAtIndex(*v6, v7);
if ( !(unsigned __int8)GameObject::isTrigger(v8) )
break;
if ( ++v7 >= cocos2d::CCArray::count(*v6) )
goto LABEL_10;
}
isTrigger = 0;
}
}
}
LABEL_10:
v9 = *(_QWORD *)(a1 + 400);
if ( *(_BYTE *)(a1 + 307) )
{
*(_DWORD *)(v9 + 584) = 1082130432;
*(_DWORD *)(*(_QWORD *)(a1 + 400) + 588LL) = 1048576000;
}
else
{
*(_DWORD *)(v9 + 588) = 1056964608;
if ( isTrigger || (v10 = *(_QWORD *)(a1 + 1136)) != 0 && *(_DWORD *)(v10 + 1036) == 747 )
*(_DWORD *)(*(_QWORD *)(a1 + 400) + 584LL) = 1082130432;
else
*(_DWORD *)(*(_QWORD *)(a1 + 400) + 584LL) = 0x40000000;
}
return GJScaleControl::loadValues(*(_QWORD *)(a1 + 400), *(float **)(a1 + 1136), *v5, a1 + 32);
}
return result;
}