// // LevelEditorLayer::updateObjectLabel from 0x1000e9d80 to 0x1000ea147 (967 bytes) // // 10 xrefs: // > EditorUI::dynamicGroupUpdate @ 0x100044f59 // > LevelEditorLayer::addSpecial @ 0x1000dfd4d // > SetupTriggerPopup::updateEditorLabel @ 0x100236d1e // > SetupTriggerPopup::onClose @ 0x10023918e // > CollisionBlockPopup::onClose @ 0x10028688e // > CollisionBlockPopup::onNextItemID @ 0x100286a3e // > CollisionBlockPopup::onItemIDArrow @ 0x100286b7e // > CollisionBlockPopup::onDynamicBlock @ 0x100286d9d // > CollisionBlockPopup::updateEditorLabel @ 0x100286fee // > CollisionBlockPopup::textChanged @ 0x10028720d // // 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 __fastcall LevelEditorLayer::updateObjectLabel(GameObject *a1) { int m_objectID; // ecx unsigned __int64 v3; // rax __int64 v4; // rdx unsigned __int64 v5; // rax __int64 v6; // rdx int v7; // edx float height; // eax __int64 m_targetColor; // rsi const char *v10; // rax char *v11; // rdi cocos2d::CCString *v12; // rax const char *CString; // rsi cocos2d::CCString *v14; // rax cocos2d::CCString *v15; // rax const char *v16; // rsi __int64 v17; // rax cocos2d::CCLabelBMFont *v18; // r14 const char *data; // rsi __int64 v20; // rax std::string v21; // [rsp+0h] [rbp-50h] BYREF float v22; // [rsp+1Ch] [rbp-34h] std::string v23; // [rsp+20h] [rbp-30h] BYREF float v24; // [rsp+3Ch] [rbp-14h] m_objectID = a1->m_objectID; if ( m_objectID <= 1810 ) { if ( m_objectID > 1267 ) { if ( (unsigned int)(m_objectID - 1585) <= 0x1F ) { v7 = -2080373759; if ( _bittest(&v7, m_objectID - 1585) ) goto LABEL_26; } if ( (unsigned int)(m_objectID - 1346) < 2 || m_objectID == 1268 ) goto LABEL_26; } else { v3 = (unsigned int)(m_objectID - 1006); if ( (unsigned int)v3 <= 0x2B ) { v4 = 0x80000000003LL; if ( _bittest64(&v4, v3) ) goto LABEL_26; } if ( m_objectID == 899 || m_objectID == 901 ) goto LABEL_26; } } else { if ( m_objectID <= 2061 ) { if ( ((unsigned int)(m_objectID - 1811) > 6 || m_objectID == 1813) && m_objectID != 1912 ) return; LABEL_26: height = a1[1].m_obContentSize.height; if ( m_objectID > 1815 ) { if ( m_objectID == 1816 ) { memset(&v23, 0, sizeof(v23)); v24 = 0.0; v11 = "%i"; if ( BYTE5(a1[1].CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable) ) v11 = "%i."; v12 = (cocos2d::CCString *)sub_1007AB580(v11, *(_BYTE *)&v21.__r_.__value_.__l.0); CString = cocos2d::CCString::getCString(v12); std::string::assign(&v23, CString); LABEL_51: v17 = ((__int64 (__fastcall *)(GameObject *))a1->getObjectLabel)(a1); v18 = (cocos2d::CCLabelBMFont *)v17; if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 ) { data = v23.__r_.__value_.__l.__data_; if ( v17 ) { LABEL_53: (*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v17 + 912LL))(v17, data); goto LABEL_56; } } else { data = v23.__r_.__value_.__s.__data_; if ( v17 ) goto LABEL_53; } v18 = cocos2d::CCLabelBMFont::create_3(data, "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v18->setScale)(v18, 0.5); ((void (__fastcall *)(GameObject *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v18, 1); ((void (__fastcall *)(GameObject *, cocos2d::CCLabelBMFont *))a1->setObjectLabel)(a1, v18); LABEL_56: v22 = *(float *)((__int64 (__fastcall *)(GameObject *))a1->getContentSize)(a1); v20 = ((__int64 (__fastcall *)(GameObject *))a1->getContentSize)(a1); sub_10028CBE0(&v21, v22 * 0.5, v24 + (float)(0.5 * *(float *)(v20 + 4))); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v18->setPosition)(v18, &v21); cocos2d::CCLabelBMFont::limitLabelWidth(v18, 30.0, 0.5, 0.0); if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v23.__r_.__value_.__l.__data_); return; } m_targetColor = LODWORD(height); if ( m_objectID != 1817 ) goto LABEL_33; } else { if ( m_objectID == 899 ) { m_targetColor = (unsigned int)a1->m_targetColor; memset(&v23, 0, sizeof(v23)); if ( (int)m_targetColor <= 999 ) { LABEL_47: GameToolbox::intToString(&v21, m_targetColor); if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v23.__r_.__value_.__l.__data_); v23 = v21; goto LABEL_50; } goto LABEL_37; } m_targetColor = LODWORD(height); if ( m_objectID != 1811 ) { LABEL_33: memset(&v23, 0, sizeof(v23)); if ( m_objectID == 3640 ) { v15 = (cocos2d::CCString *)sub_1007AB580("%i\n%i", *(_BYTE *)&v21.__r_.__value_.__l.0); v24 = 0.0; v16 = cocos2d::CCString::getCString(v15); std::string::assign(&v23, v16); goto LABEL_51; } if ( m_objectID == 1912 ) { v14 = (cocos2d::CCString *)sub_1007AB580("%i/%i", *(_BYTE *)&v21.__r_.__value_.__l.0); v10 = cocos2d::CCString::getCString(v14); goto LABEL_42; } if ( (int)m_targetColor <= 999 || m_objectID != 1006 || LODWORD(a1[1].m_pScheduler) ) goto LABEL_47; LABEL_37: v10 = GJSpecialColorSelect::textForColorIdx(m_targetColor); LABEL_42: std::string::assign(&v23, v10); LABEL_50: v24 = -5.0; goto LABEL_51; } } m_targetColor = *(unsigned int *)&a1[1]._displayedOpacity; goto LABEL_33; } if ( m_objectID <= 3032 ) { if ( m_objectID != 2062 && m_objectID != 2067 && m_objectID != 3016 ) return; goto LABEL_26; } v5 = (unsigned int)(m_objectID - 3609); if ( (unsigned int)v5 <= 0x33 ) { v6 = 0x8000080000001LL; if ( _bittest64(&v6, v5) ) goto LABEL_26; } if ( m_objectID == 3033 ) goto LABEL_26; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source