//
// EditorUI::updateObjectInfoLabel from 0x3a0674 to 0x3a0f8c (2328 bytes)
//
// 14 xrefs:
// > EditorUI::toggleObjectInfoLabel @ 0x3a1040
// > EditorUI::deselectAll @ 0x3a2cf0
// > EditorUI::updateSpecialUIElements @ 0x3a42f4
// > EditorUI::selectAll @ 0x3a5acc
// > EditorUI::selectAllWithDirection @ 0x3a5bc6
// > EditorUI::onPasteState @ 0x3a5c0e
// > EditorUI::onPasteColor @ 0x3a5c42
// > EditorUI::assignNewGroups @ 0x3a5cca
// > EditorUI::onAssignNewGroupID @ 0x3a5dde
// > EditorUI::doPasteObjects @ 0x3a5ec6
// > EditorUI::doPasteInPlace @ 0x3a5fb4
// > EditorUI::onDuplicate @ 0x3a69be
// > CustomizeObjectLayer::onClose @ 0x46130e
// > SetGroupIDLayer::onClose @ 0x5089ee
//
// 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
//
void EditorUI::updateObjectInfoLabel(EditorUI *a1)
{
GameManager *v2; // r0
cocos2d::CCArray *m_selectedObjects; // r0
int v4; // r4
unsigned int v5; // r11
int v6; // r9
int v7; // r8
GameObject *v8; // r0
GameObject *v9; // r5
GJSpriteColor *RelativeSpriteColor; // r0
int ColorMode; // r0
int v12; // r8
GJSpriteColor *v13; // r0
int v14; // r0
ZLayer ObjectZLayer; // r4
int ObjectZOrder; // r0
int m_editorLayer; // r3
int v18; // r1
int m_editorLayer2; // r3
int v20; // r1
GameObject *m_selectedObject; // r0
GJSpriteColor *v22; // r0
GJSpriteColor *v23; // r0
int v24; // r0
GameObject *v25; // r3
cocos2d::CCObject *v26; // r1
cocos2d::CCArray *v27; // r0
GameObject *v28; // r0
unsigned int num; // r3
unsigned int v30; // r11
const char *CString; // r0
int v32; // r2
cocos2d::CCString *v33; // r0
const char *v34; // r7
const char *v35; // r0
cocos2d::CCString *v36; // r0
const char *v37; // r6
const char *v38; // r5
cocos2d::CCString *v39; // r0
cocos2d::CCString *v40; // r0
char *v41; // r1
char *v42; // r1
cocos2d::CCString *v43; // r0
cocos2d::CCString *v44; // r0
char *v45; // r0
int v46; // r9
_DWORD *j; // r4
const char *v48; // r6
unsigned int v49; // r7
_BOOL4 v50; // r8
_DWORD *v51; // r3
_DWORD **v52; // r2
_DWORD *v53; // r1
char *v54; // r1
char *v55; // r0
cocos2d::CCString *v56; // r0
char *v57; // r0
cocos2d::CCString *v58; // r0
char *v59; // r0
cocos2d::CCString *v60; // r0
char *v61; // r0
cocos2d::CCString *v62; // r0
char *v63; // r0
int v64; // r6
_DWORD *k; // r7
unsigned int v66; // r5
_BOOL4 v67; // r5
GameObject *v68; // r5
double v69; // d8
float y; // s20
const cocos2d::CCPoint *p_colors; // r5
double v72; // d9
const char *v73; // r1
cocos2d::CCString *v74; // r0
char *v75; // r0
cocos2d::CCString *v76; // r0
char *v77; // r0
cocos2d::ccArray *data; // r2
char *arr; // r2
int v80; // r2
int v81; // r5
int v82; // r2
_DWORD *v83; // r0
GameManager *v84; // r0
_DWORD *v85; // r3
_DWORD *v86; // r6
float x; // r1
_DWORD *v88; // r0
_DWORD *v89; // r7
int v90; // r0
_BOOL4 v91; // r6
int v92; // r0
_DWORD *v93; // r0
cocos2d::CCString *v94; // r0
char *v95; // r0
char *v96; // [sp+18h] [bp-9Ch]
char *v97; // [sp+18h] [bp-9Ch]
char *v98; // [sp+1Ch] [bp-98h]
int v99; // [sp+20h] [bp-94h]
cocos2d::CCArray *v100; // [sp+20h] [bp-94h]
ZLayer v101; // [sp+24h] [bp-90h]
char *v102; // [sp+24h] [bp-90h]
unsigned int i; // [sp+28h] [bp-8Ch]
char *v104; // [sp+2Ch] [bp-88h]
char *v105; // [sp+30h] [bp-84h]
char *v106; // [sp+34h] [bp-80h]
float v107; // [sp+40h] [bp-74h]
char v108[4]; // [sp+48h] [bp-6Ch] BYREF
const unsigned __int8 *v109; // [sp+4Ch] [bp-68h] BYREF
char *v110; // [sp+50h] [bp-64h] BYREF
cocos2d::CCPoint v111; // [sp+54h] [bp-60h] BYREF
cocos2d::CCPoint v112; // [sp+5Ch] [bp-58h] BYREF
int v113; // [sp+64h] [bp-50h] BYREF
_DWORD *v114[4]; // [sp+68h] [bp-4Ch] BYREF
unsigned int v115; // [sp+78h] [bp-3Ch]
char v116[4]; // [sp+7Ch] [bp-38h] BYREF
_DWORD *v117[4]; // [sp+80h] [bp-34h] BYREF
int v118; // [sp+90h] [bp-24h]
int v119; // [sp+94h] [bp-20h] BYREF
_DWORD *v120[4]; // [sp+98h] [bp-1Ch] BYREF
unsigned int v121; // [sp+A8h] [bp-Ch]
v2 = GameManager::sharedState();
if ( GameManager::getGameVariable(v2, "0041") )
{
sub_776584((int)v108, (char *)&unk_939830);
m_selectedObjects = a1->m_selectedObjects;
if ( m_selectedObjects && cocos2d::CCArray::count(m_selectedObjects) )
{
v4 = -2;
v5 = 0;
v6 = -1;
v7 = -2;
v104 = (char *)cocos2d::CCArray::count(a1->m_selectedObjects);
v98 = (char *)-1;
v96 = (char *)-1;
v101 = B3;
while ( 1 )
{
if ( v5 >= cocos2d::CCArray::count(a1->m_selectedObjects) )
goto LABEL_49;
v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v5);
v9 = v8;
if ( v7 == -10001 )
break;
RelativeSpriteColor = GameObject::getRelativeSpriteColor(v8, 1);
if ( RelativeSpriteColor )
{
ColorMode = GJSpriteColor::getColorMode(RelativeSpriteColor);
v99 = ColorMode;
if ( v7 != -2 && v7 != ColorMode )
break;
}
else
{
v99 = v7;
}
LABEL_13:
if ( v4 == -10001 )
goto LABEL_14;
v13 = GameObject::getRelativeSpriteColor(v9, 2);
if ( v13 )
{
v14 = GJSpriteColor::getColorMode(v13);
v12 = v14;
if ( v4 != -2 && v4 != v14 )
LABEL_14:
v12 = -10001;
}
else
{
v12 = v4;
}
if ( v101 == -10001 )
goto LABEL_21;
if ( v101 == B3 )
{
ObjectZLayer = GameObject::getObjectZLayer(v9);
}
else
{
ObjectZLayer = GameObject::getObjectZLayer(v9);
if ( v101 != ObjectZLayer )
LABEL_21:
ObjectZLayer = -10001;
}
if ( v6 == -10001 )
goto LABEL_26;
if ( v6 == -1 )
{
ObjectZOrder = GameObject::getObjectZOrder(v9);
}
else
{
ObjectZOrder = GameObject::getObjectZOrder(v9);
if ( v6 != ObjectZOrder )
LABEL_26:
ObjectZOrder = -10001;
}
if ( v96 != (char *)-10001 )
{
m_editorLayer = v9->m_editorLayer;
if ( v96 != (char *)-1 )
{
v18 = v9->m_editorLayer;
if ( v96 != (char *)m_editorLayer )
v18 = -10001;
m_editorLayer = v18;
}
v96 = (char *)m_editorLayer;
}
if ( v98 != (char *)-10001 )
{
m_editorLayer2 = v9->m_editorLayer2;
if ( v98 != (char *)-1 )
{
v20 = v9->m_editorLayer2;
if ( v98 != (char *)m_editorLayer2 )
v20 = -10001;
m_editorLayer2 = v20;
}
v98 = (char *)m_editorLayer2;
}
v101 = ObjectZLayer;
++v5;
v4 = v12;
v6 = ObjectZOrder;
v7 = v99;
}
v99 = -10001;
goto LABEL_13;
}
m_selectedObject = a1->m_selectedObject;
if ( !m_selectedObject )
{
a1->m_objectInfoLabel->setString(a1->m_objectInfoLabel, " ");
LABEL_168:
sub_774008(v108);
return;
}
v22 = GameObject::getRelativeSpriteColor(m_selectedObject, 1);
if ( v22 )
v7 = GJSpriteColor::getColorMode(v22);
else
v7 = -2;
v23 = GameObject::getRelativeSpriteColor(a1->m_selectedObject, 2);
if ( v23 )
v4 = GJSpriteColor::getColorMode(v23);
else
v4 = -2;
v101 = GameObject::getObjectZLayer(a1->m_selectedObject);
v24 = GameObject::getObjectZOrder(a1->m_selectedObject);
v25 = a1->m_selectedObject;
v6 = v24;
v96 = (char *)v25->m_editorLayer;
v98 = (char *)v25->m_editorLayer2;
v104 = nullptr;
LABEL_49:
memset(v114, 0, sizeof(v114));
v114[2] = v114;
v114[3] = v114;
v115 = 0;
memset(v117, 0, sizeof(v117));
v117[2] = v117;
v117[3] = v117;
v118 = 0;
memset(v120, 0, sizeof(v120));
v27 = a1->m_selectedObjects;
v121 = 0;
v120[2] = v120;
v120[3] = v120;
if ( v27 && cocos2d::CCArray::count(v27) )
{
v100 = a1->m_selectedObjects;
}
else
{
v28 = a1->m_selectedObject;
if ( !v28 )
goto LABEL_53;
v100 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject((cocos2d::CCArray *)v28, v26);
}
if ( v100 )
{
data = v100->data;
num = data->num;
if ( data->num )
{
arr = (char *)data->arr;
v30 = 0;
v106 = &arr[4 * num - 4];
v105 = arr;
while ( 1 )
{
v80 = (int)v106;
if ( v105 > v106 )
goto LABEL_56;
v81 = *(_DWORD *)v105;
v105 += 4;
if ( !v81 )
goto LABEL_56;
for ( i = v30; (int)(i - v30) < *(__int16 *)(v81 + 1012); ++i )
{
LODWORD(v112.x) = GameObject::getGroupID((GameObject *)v81, i - v30);
v83 = (_DWORD *)std::map::operator[](&v113, &v112, v82);
++*v83;
if ( !*(_BYTE *)(v81 + 1014) )
continue;
v84 = GameManager::sharedState();
if ( (GameObject *)v81 != GJBaseGameLayer::getGroupParent(v84->m_levelEditorLayer, SLODWORD(v112.x)) )
continue;
v85 = v117[1];
v86 = v117;
x = v112.x;
v80 = 1;
while ( v85 )
{
v86 = v85;
if ( SLODWORD(v112.x) >= v85[4] )
{
v88 = (_DWORD *)v85[3];
v80 = 0;
}
else
{
v88 = (_DWORD *)v85[2];
v80 = 1;
}
v85 = v88;
}
if ( !v80 )
{
v90 = (int)v86;
goto LABEL_190;
}
v89 = v117[2];
if ( v86 != v117[2] )
{
v107 = v112.x;
v90 = sub_762018(v86);
x = v107;
LABEL_190:
if ( *(_DWORD *)(v90 + 16) >= SLODWORD(x) )
continue;
v89 = v86;
}
v91 = v89 == v117 || SLODWORD(x) < v89[4];
v92 = operator new(0x14u);
*(float *)(v92 + 16) = v112.x;
sub_7620E8(v91, v92, v89, v117);
++v118;
}
if ( *(_DWORD *)(v81 + 1076) == 1 )
{
v112.x = *(float *)(v81 + 1484);
if ( SLODWORD(v112.x) > 0 )
{
v93 = (_DWORD *)std::map::operator[](&v119, &v112, v80);
++*v93;
}
}
v30 = i;
}
}
LABEL_55:
v30 = num;
LABEL_56:
if ( v7 == -10001 )
{
if ( v4 == -10001 )
{
v34 = "?";
v37 = "?";
goto LABEL_72;
}
v34 = "?";
}
else
{
if ( v7 < 1000 )
{
v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v7);
CString = cocos2d::CCString::getCString(v33);
}
else
{
CString = GJSpecialColorSelect::textForColorIdx(v7);
}
v34 = CString;
if ( v4 == -10001 )
{
if ( v7 == -2 )
{
v34 = "-";
v37 = "?";
LABEL_76:
switch ( v101 )
{
case B5:
v38 = "B5";
break;
case B4:
v38 = "B4";
break;
case B3:
v38 = "B3";
break;
case B2:
v38 = "B2";
break;
case B1:
v38 = "B1";
break;
case T1:
v38 = "T1";
break;
case T2:
v38 = "T2";
break;
case T3:
v38 = "T3";
break;
case T4:
v38 = "T4";
break;
default:
v38 = "?";
break;
}
if ( v6 == -10001 )
{
v102 = "?";
}
else
{
v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)v6,
v32);
v102 = (char *)cocos2d::CCString::getCString(v39);
}
if ( v96 != (char *)-10001 )
{
v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v96);
cocos2d::CCString::getCString(v40);
}
sub_776584((int)&v109, (char *)&unk_939830);
if ( v4 == -2 || v7 == -2 )
{
sub_774544((int)&v109, "C: ");
if ( v4 == -2 )
v41 = (char *)v34;
else
v41 = (char *)v37;
sub_774544((int)&v109, v41);
v42 = "\n";
}
else
{
v43 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"C1: %s\nC2: %s\n",
v34,
v37,
v4 + 2);
v42 = (char *)cocos2d::CCString::getCString(v43);
}
sub_774544((int)&v109, v42);
if ( v30 )
{
sub_774544((int)&v109, "G: ");
v46 = 0;
for ( j = v114[2]; j != v114; j = (_DWORD *)sub_761FA8(j) )
{
v48 = (const char *)j[4];
if ( v100 )
{
v49 = j[5];
v50 = v49 >= cocos2d::CCArray::count(v100);
}
else
{
v50 = 0;
}
if ( v46 )
sub_774544((int)&v109, ",");
v51 = v117[1];
v52 = v117;
while ( v51 )
{
if ( v51[4] >= (int)v48 )
{
v53 = (_DWORD *)v51[2];
}
else
{
v53 = (_DWORD *)v51[3];
v51 = v52;
}
v52 = (_DWORD **)v51;
v51 = v53;
}
if ( v52 == v117 )
{
v54 = (char *)&unk_939830;
}
else if ( (int)v48 < (int)v52[4] )
{
v54 = (char *)&unk_939830;
}
else
{
v54 = "*";
}
sub_776584((int)&v112, v54);
if ( v50 )
v55 = "%i%s";
else
v55 = "(%i%s)";
v56 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v55, v48, v112.x);
v57 = (char *)cocos2d::CCString::getCString(v56);
sub_774544((int)&v109, v57);
if ( ++v46 == 5 )
{
sub_774008(&v112);
break;
}
sub_774008(&v112);
}
if ( v115 > 5 )
sub_774544((int)&v109, "...");
sub_774544((int)&v109, "\n");
}
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Layer: %s\nZ: %s\n",
v38,
v102);
v45 = (char *)cocos2d::CCString::getCString(v44);
sub_774544((int)&v109, v45);
sub_776584((int)&v110, (char *)&unk_939830);
if ( v96 && v96 != (char *)-10001 )
{
v58 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v96);
v59 = (char *)cocos2d::CCString::getCString(v58);
sub_774544((int)&v110, v59);
}
if ( v98 && v98 != (char *)-10001 )
{
if ( *((_DWORD *)v110 - 3) )
v60 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)", %i", v98);
else
v60 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v96);
v61 = (char *)cocos2d::CCString::getCString(v60);
sub_774544((int)&v110, v61);
}
if ( *((_DWORD *)v110 - 3) )
{
v62 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"EL: %s\n", v110);
v63 = (char *)cocos2d::CCString::getCString(v62);
sub_774544((int)&v109, v63);
}
if ( v121 )
{
sub_774544((int)&v109, "CID: ");
v64 = 0;
for ( k = v120[2]; ; k = (_DWORD *)sub_761FA8(k) )
{
if ( k == v120 )
{
LABEL_150:
if ( v121 > 5 )
sub_774544((int)&v109, "...");
sub_774544((int)&v109, "\n");
goto LABEL_153;
}
v97 = (char *)k[4];
if ( v100 )
break;
if ( v64 )
{
v67 = 0;
LABEL_157:
sub_774544((int)&v109, ",");
LABEL_146:
if ( v67 )
goto LABEL_147;
}
sub_774544((int)&v109, "(");
v67 = 0;
LABEL_147:
GameToolbox::intToString((GameToolbox *)&v112, (int)v97);
sub_774544((int)&v109, (char *)LODWORD(v112.x));
sub_774008(&v112);
if ( !v67 )
sub_774544((int)&v109, ")");
if ( ++v64 == 5 )
goto LABEL_150;
}
v66 = k[5];
v67 = v66 >= cocos2d::CCArray::count(v100);
if ( v64 )
goto LABEL_157;
goto LABEL_146;
}
LABEL_153:
v68 = a1->m_selectedObject;
if ( v68 && v68->m_classType == Effect )
{
if ( LODWORD(v68[1].m_sQuad.tr.vertices.x) || LODWORD(v68[1].m_sQuad.tr.vertices.y) )
{
v94 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Order: %i,%i\n",
(const char *)LODWORD(v68[1].m_sQuad.tr.vertices.y));
v95 = (char *)cocos2d::CCString::getCString(v94);
sub_774544((int)&v109, v95);
}
v69 = v68->getPosition(v68)->x;
y = v68->getPosition(v68)->y;
p_colors = (const cocos2d::CCPoint *)&v68[1].m_sQuad.tr.colors;
cocos2d::CCPoint::CCPoint(&v111, p_colors);
v72 = v111.x;
cocos2d::CCPoint::CCPoint(&v112, p_colors);
v74 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%.01f %.01f, %.01f %.01f\n",
v73,
v69,
y,
v72,
v112.y);
v75 = (char *)cocos2d::CCString::getCString(v74);
sub_774544((int)&v109, v75);
}
if ( (int)v104 > 1 )
{
v76 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Objects: %i", v104);
v77 = (char *)cocos2d::CCString::getCString(v76);
sub_774544((int)&v109, v77);
}
a1->m_objectInfoLabel->setString(a1->m_objectInfoLabel, v109);
sub_774008(&v110);
sub_774008(&v109);
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
(int)&v119,
v120[1]);
std::_Rb_tree,std::less,std::allocator>::_M_erase((int)v116, v117[1]);
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
(int)&v113,
v114[1]);
goto LABEL_168;
}
v37 = "?";
LABEL_72:
v32 = v4 + 2;
if ( v4 == -2 )
v37 = "-";
goto LABEL_76;
}
}
if ( v4 < 0 )
{
v37 = "-";
}
else
{
if ( v4 < 1000 )
{
v36 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v4);
v35 = cocos2d::CCString::getCString(v36);
}
else
{
v35 = GJSpecialColorSelect::textForColorIdx(v4);
}
v37 = v35;
}
if ( v7 == -2 )
v34 = "-";
goto LABEL_72;
}
LABEL_53:
num = 0;
v100 = nullptr;
goto LABEL_55;
}
}