// // EditorUI::createCustomItems from 0xbdfab4 to 0xbdfdf0 (828 bytes) // // 3 xrefs: // > EditorUI::reloadCustomItems @ 0xbdfe3c // > EditorUI::setupCreateMenu @ 0xbfe06c // > @ 0x6a210 // // This function is hookable on this platform (idp: arm, 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 13:03:45 +0000 // GameManager *__fastcall EditorUI::createCustomItems(cocos2d::CCArray **this) { cocos2d::CCArray *v2; // x0 GameManager *v3; // x26 cocos2d::CCDictionary **v4; // x0 cocos2d::CCArray *OrderedCustomObjectKeys; // x24 unsigned __int64 v6; // x0 int v7; // w23 unsigned int i; // w19 const char *v9; // x1 size_t v10; // x0 cocos2d::CCObject *v11; // x0 cocos2d::CCString *v12; // x0 GameManager *v13; // x0 unsigned int v14; // w22 GameManager *v15; // x0 cocos2d::CCArray *v16; // x1 cocos2d::CCObject *v18; // x0 const char *v19; // x1 ButtonSprite *v20; // x21 float *MenuItemButton; // x0 const char *v22; // x1 ButtonSprite *v23; // x21 float *v24; // x0 const char *v25; // x1 ButtonSprite *v26; // x21 float *v27; // x0 const char *v28; // x1 ButtonSprite *v29; // x21 float *v30; // x0 char *v31; // [xsp+68h] [xbp+68h] _BYTE v32[8]; // [xsp+70h] [xbp+70h] BYREF __int64 v33[2]; // [xsp+78h] [xbp+78h] BYREF void *v34; // [xsp+88h] [xbp+88h] __int64 v35[2]; // [xsp+90h] [xbp+90h] BYREF void *v36; // [xsp+A0h] [xbp+A0h] v2 = (cocos2d::CCArray *)cocos2d::CCArray::removeAllObjects(*(this + 170)); v3 = (GameManager *)cocos2d::CCArray::create(v2); v4 = (cocos2d::CCDictionary **)GameManager::sharedState(v3); OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(v4); v6 = cocos2d::CCArray::count(OrderedCustomObjectKeys); v7 = v6; if ( (int)v6 > 0 ) { for ( i = 0; v7 != i; ++i ) { while ( 1 ) { v12 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, i); v13 = (GameManager *)cocos2d::CCString::intValue(v12); v14 = (unsigned int)v13; v15 = (GameManager *)GameManager::sharedState(v13); GameManager::stringForCustomObject(v15, (const char *)v14, v33); if ( (v33[0] & 1) == 0 ) break; if ( !v33[1] ) goto LABEL_12; v9 = (const char *)v34; LABEL_5: v35[0] = 0; v35[1] = 0; v36 = nullptr; v31 = (char *)v9; v10 = strlen(v9); std::string::__init(v35, v31, v10); v11 = EditorUI::menuItemFromObjectString((__int64)this, (char *)v35, v14); cocos2d::CCArray::addObject(v3, v11); if ( (v35[0] & 1) != 0 ) operator delete(v36); v6 = LOBYTE(v33[0]); if ( (v33[0] & 1) == 0 ) goto LABEL_8; LABEL_12: ++i; operator delete(v34); if ( v7 == i ) goto LABEL_13; } v6 = (int)LOBYTE(v33[0]) >> 1; if ( (_DWORD)v6 ) { v9 = (char *)v33 + 1; goto LABEL_5; } LABEL_8: ; } } LABEL_13: v16 = *(this + 114); if ( !v16 ) { v18 = (cocos2d::CCObject *)cocos2d::CCArray::create((cocos2d::CCArray *)v6); *(this + 114) = v18; cocos2d::CCObject::retain(v18); v20 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_upBtn_001.png", v19); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, (const cocos2d::CCPoint *)&unk_155EAB0); MenuItemButton = EditorUI::getCreateMenuItemButton( (__int64)this, v20, (__int64)EditorUI::orderUpCustomItem, 0, 0, 5, (const cocos2d::CCPoint *)v32, 0.9); cocos2d::CCArray::addObject(*(this + 114), (cocos2d::CCObject *)MenuItemButton); v23 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_downBtn_001.png", v22); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, (const cocos2d::CCPoint *)&unk_155EAB0); v24 = EditorUI::getCreateMenuItemButton( (__int64)this, v23, (__int64)EditorUI::orderDownCustomItem, 0, 0, 5, (const cocos2d::CCPoint *)v32, 0.9); cocos2d::CCArray::addObject(*(this + 114), (cocos2d::CCObject *)v24); v26 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_addCBtn_001.png", v25); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, (const cocos2d::CCPoint *)&unk_155EAB0); v27 = EditorUI::getCreateMenuItemButton( (__int64)this, v26, (__int64)EditorUI::onNewCustomItem, 0, 0, 1, (const cocos2d::CCPoint *)v32, 0.9); cocos2d::CCArray::addObject(*(this + 114), (cocos2d::CCObject *)v27); v29 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_delCBtn_001.png", v28); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, (const cocos2d::CCPoint *)&unk_155EAB0); v30 = EditorUI::getCreateMenuItemButton( (__int64)this, v29, (__int64)EditorUI::onDeleteCustomItem, 0, 0, 6, (const cocos2d::CCPoint *)v32, 0.9); cocos2d::CCArray::addObject(*(this + 114), (cocos2d::CCObject *)v30); v16 = *(this + 114); } cocos2d::CCArray::addObjectsFromArray(v3, v16); return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source