//
// LevelEditorLayer::getLastObjectX from 0x6604fc to 0x6605a4 (168 bytes)
//
// 3 xrefs:
// > EditorPauseLayer::init @ 0x78b640
// > EditorPauseLayer::saveLevel @ 0x78e2cc
// > ??> @ 0x961c8
//
// 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
//
float LevelEditorLayer::getLastObjectX(LevelEditorLayer *a1)
{
unsigned int v1; // w19
float v2; // s8
cocos2d::CCArray *AllObjects; // x21
bool v4; // cf
unsigned int v5; // w1
cocos2d::CCArray *v6; // x0
__int64 v7; // x20
v1 = 0;
v2 = 0.0;
AllObjects = LevelEditorLayer::getAllObjects(a1);
while ( 1 )
{
v4 = v1 >= (unsigned int)cocos2d::CCArray::count(AllObjects);
v5 = v1;
v6 = AllObjects;
++v1;
if ( v4 )
break;
while ( 1 )
{
v7 = cocos2d::CCArray::objectAtIndex(v6, v5);
if ( v2 >= *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7) )
break;
v2 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7);
v4 = v1 >= (unsigned int)cocos2d::CCArray::count(AllObjects);
v5 = v1;
v6 = AllObjects;
++v1;
if ( v4 )
return v2;
}
}
return v2;
}