// // EditorUI::editButtonUsable from 0x68bc20 to 0x68c0d4 (1204 bytes) // // 3 xrefs: // > EditorUI::toggleEditObjectButton @ 0x68ce1c // > EditorUI::editObject @ 0x68d130 // > @ 0x9b778 // // 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 // bool EditorUI::editButtonUsable(EditorUI *a1) { GameObject *m_selectedObject; // x1 cocos2d::CCArray *m_selectedObjects; // x2 GameObject *v4; // x0 GameObject *v5; // x0 unsigned int v6; // w21 GameObject *v7; // x0 unsigned int v8; // w21 int v9; // w0 unsigned int v11; // w21 unsigned int v12; // w21 GameObject *v13; // x0 int v14; // [xsp+3Ch] [xbp+3Ch] BYREF int v15; // [xsp+40h] [xbp+40h] BYREF int v16; // [xsp+44h] [xbp+44h] BYREF m_selectedObject = a1->m_selectedObject; m_selectedObjects = a1->m_selectedObjects; v14 = -1; v15 = -1; v16 = -1; EditorUI::getGroupInfo(a1, m_selectedObject, m_selectedObjects, &v14, &v15, &v16); if ( v14 > 1914 ) { if ( v14 != 2999 ) { if ( v14 > 2999 ) { if ( v14 > 3615 ) { if ( v14 <= 3643 ) { if ( v14 >= 3640 || (unsigned int)(v14 - 3617) <= 3 ) return 1; goto LABEL_11; } if ( v14 != 3655 ) { if ( v14 > 3655 ) { if ( (unsigned int)(v14 - 3660) > 2 ) goto LABEL_11; } else if ( v14 != 3645 ) { goto LABEL_11; } } } else if ( v14 < 3612 ) { if ( v14 > 3033 ) { if ( v14 == 3600 || v14 >= 3600 && (unsigned int)(v14 - 3602) <= 7 ) return 1; goto LABEL_11; } if ( v14 >= 3029 || v14 == 3022 ) return 1; if ( v14 > 3022 ) { if ( v14 != 3024 ) goto LABEL_11; } else if ( (unsigned int)(v14 - 3006) > 0xA ) { goto LABEL_11; } } } else if ( v14 > 2069 ) { if ( v14 != 2907 ) { if ( v14 > 2907 ) { if ( v14 >= 2909 && (v14 <= 2917 || (unsigned int)(v14 - 2919) <= 6) ) return 1; } else if ( v14 >= 2899 && (v14 <= 2901 || (unsigned int)(v14 - 2903) <= 2) ) { return 1; } goto LABEL_11; } } else if ( v14 < 2066 ) { if ( v14 > 1935 ) { if ( v14 >= 2015 && (v14 <= 2016 || (unsigned int)(v14 - 2062) <= 1) ) return 1; } else if ( v14 >= 1931 || (unsigned int)(v14 - 1916) <= 1 ) { return 1; } goto LABEL_11; } } return 1; } if ( v14 >= 1912 ) return 1; if ( v14 <= 901 ) { if ( v14 < 899 ) { if ( v14 > 203 ) { if ( v14 != 660 ) { if ( v14 > 660 ) { if ( v14 >= 717 && (v14 <= 718 || (unsigned int)(v14 - 743) <= 2) ) return 1; } else if ( v14 == 221 || v14 >= 221 && (unsigned int)(v14 - 286) <= 1 ) { return 1; } goto LABEL_11; } } else if ( v14 < 200 ) { if ( v14 <= 33 ) { if ( v14 >= 29 || (unsigned int)(v14 - 12) <= 1 ) return 1; goto LABEL_11; } if ( v14 != 105 ) { if ( v14 > 105 ) { if ( v14 == 111 || v14 == 142 ) return 1; goto LABEL_11; } if ( v14 != 47 ) goto LABEL_11; } } } return 1; } if ( v14 == 1520 ) return 1; if ( v14 > 1520 ) { if ( v14 != 1616 ) { if ( v14 > 1616 ) { if ( v14 >= 1811 && (v14 <= 1812 || (unsigned int)(v14 - 1814) <= 5) ) return 1; goto LABEL_11; } if ( v14 != 1595 ) { if ( v14 > 1595 ) { if ( (unsigned int)(v14 - 1611) > 2 ) goto LABEL_11; } else if ( v14 != 1585 ) { goto LABEL_11; } } } return 1; } if ( v14 == 1268 ) return 1; if ( v14 > 1268 ) { if ( v14 != 1334 ) { if ( v14 > 1334 ) { if ( (unsigned int)(v14 - 1346) > 1 ) goto LABEL_11; } else if ( v14 != 1331 ) { goto LABEL_11; } } return 1; } if ( v14 > 1007 ) { if ( v14 != 1049 ) goto LABEL_11; return 1; } if ( v14 >= 1006 || v14 == 915 ) return 1; LABEL_11: v4 = a1->m_selectedObject; if ( v4 ) { if ( GameObject::isBasicTrigger(v4) ) return 1; v5 = a1->m_selectedObject; if ( v5 ) { if ( GameObject::canChangeCustomColor(v5) ) return 1; } } v6 = 0; if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { while ( v6 < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v6); if ( GameObject::canChangeCustomColor(v7) ) return 1; ++v6; } } v8 = 0; if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { while ( v8 < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { v9 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v8) + 1012); if ( v9 != 744 ) { if ( v9 > 744 ) { if ( v9 < 899 || v9 > 900 && v9 != 915 ) goto LABEL_79; } else if ( v9 < 29 || v9 > 30 && v9 != 105 ) { goto LABEL_79; } } ++v8; } return 1; } LABEL_79: v11 = 0; if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { while ( v11 < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { if ( (unsigned int)(*(_DWORD *)(cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v11) + 1012) - 3006) > 4 ) goto LABEL_80; ++v11; } return 1; } LABEL_80: v12 = 0; if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { while ( v12 < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) ) { v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v12); if ( !GameObject::isSpawnableTrigger(v13) ) return 0; ++v12; } return 1; } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source