// // EditorUI::editButtonUsable from 0x37f1c4 to 0x37f510 (844 bytes) // // 2 xrefs: // > EditorUI::toggleEditObjectButton @ 0x37fcd8 // > EditorUI::editObject @ 0x37fea4 // // 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) { unsigned int v2; // r3 bool v3; // zf bool v4; // cc unsigned int v5; // r3 int v6; // r2 GameObject *m_selectedObject; // r0 GameObject *v8; // r0 unsigned int i; // r6 GameObject *v11; // r0 unsigned int j; // r6 int v13; // r3 bool v14; // zf unsigned int k; // r6 unsigned int m; // r6 GameObject *v17; // r0 int v18; // [sp+8h] [bp-10h] BYREF int v19; // [sp+Ch] [bp-Ch] BYREF int v20; // [sp+10h] [bp-8h] BYREF v18 = -1; v19 = -1; v20 = -1; EditorUI::getGroupInfo(a1, a1->m_selectedObject, a1->m_selectedObjects, &v18, &v19, &v20); if ( v18 > 1914 ) { if ( v18 == 2999 ) return 1; if ( v18 > 2999 ) { if ( v18 >= 3616 ) { if ( v18 > 3643 ) { if ( v18 == 3655 ) return 1; if ( v18 > 3655 ) { v5 = v18 - 3660; goto LABEL_85; } v6 = 3645; LABEL_81: v3 = v18 == v6; goto LABEL_82; } if ( v18 >= 3640 ) return 1; v4 = (unsigned int)(v18 - 3617) > 3; } else { if ( v18 >= 3612 ) return 1; if ( v18 > 3033 ) { if ( v18 != 3600 ) { if ( v18 < 3600 ) goto LABEL_88; v4 = (unsigned int)(v18 - 3602) > 7; goto LABEL_86; } return 1; } if ( v18 >= 3029 || v18 == 3022 ) return 1; if ( v18 > 3022 ) { v3 = v18 == 3024; goto LABEL_82; } v4 = (unsigned int)(v18 - 3006) > 0xA; } } else { if ( v18 <= 2069 ) { if ( v18 < 2066 ) { if ( v18 >= 1936 ) { if ( v18 < 2015 ) goto LABEL_88; if ( v18 > 2016 ) { v2 = v18 - 2062; goto LABEL_20; } } else if ( v18 < 1931 ) { v2 = v18 - 1916; goto LABEL_20; } } return 1; } if ( v18 == 2907 ) return 1; if ( v18 <= 2907 ) { if ( v18 < 2899 ) goto LABEL_88; if ( v18 <= 2901 ) return 1; v5 = v18 - 2903; goto LABEL_85; } if ( v18 < 2909 ) goto LABEL_88; if ( v18 <= 2917 ) return 1; v4 = (unsigned int)(v18 - 2919) > 6; } } else { if ( v18 >= 1912 ) return 1; if ( v18 <= 901 ) { if ( v18 >= 899 ) return 1; if ( v18 <= 203 ) { if ( v18 >= 200 ) return 1; if ( v18 <= 33 ) { if ( v18 < 29 ) { v2 = v18 - 12; LABEL_20: v4 = v2 > 1; goto LABEL_86; } return 1; } if ( v18 == 105 ) return 1; if ( v18 > 105 ) { if ( v18 == 111 ) return 1; v3 = v18 == 142; } else { v3 = v18 == 47; } LABEL_82: if ( !v3 ) goto LABEL_88; return 1; } if ( v18 == 660 ) return 1; if ( v18 <= 660 ) { if ( v18 != 221 ) { if ( v18 < 221 ) goto LABEL_88; v2 = v18 - 286; goto LABEL_20; } return 1; } if ( v18 <= 716 ) goto LABEL_88; if ( v18 <= 718 ) return 1; v5 = v18 - 743; goto LABEL_85; } if ( v18 == 1520 ) return 1; if ( v18 <= 1520 ) { if ( v18 == 1268 ) return 1; if ( v18 > 1268 ) { if ( v18 == 1334 ) return 1; if ( v18 > 1334 ) { v2 = v18 - 1346; goto LABEL_20; } v6 = 1331; } else if ( v18 >= 1008 ) { v6 = 1049; } else { if ( v18 >= 1006 ) return 1; v6 = 915; } goto LABEL_81; } if ( v18 == 1616 ) return 1; if ( v18 <= 1616 ) { if ( v18 == 1595 ) return 1; if ( v18 > 1595 ) { v5 = v18 - 1611; LABEL_85: v4 = v5 > 2; goto LABEL_86; } v6 = 1585; goto LABEL_81; } if ( v18 < 1811 ) goto LABEL_88; if ( v18 <= 1812 ) return 1; v4 = (unsigned int)(v18 - 1814) > 5; } LABEL_86: if ( !v4 ) return 1; LABEL_88: m_selectedObject = a1->m_selectedObject; if ( m_selectedObject && GameObject::isBasicTrigger(m_selectedObject) ) return 1; v8 = a1->m_selectedObject; if ( v8 ) { if ( GameObject::canChangeCustomColor(v8) ) return 1; } if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { for ( i = 0; i < cocos2d::CCArray::count(a1->m_selectedObjects); ++i ) { v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, i); if ( GameObject::canChangeCustomColor(v11) ) return 1; } } if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { for ( j = 0; ; ++j ) { if ( j >= cocos2d::CCArray::count(a1->m_selectedObjects) ) return 1; v13 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, j) + 884); if ( v13 != 744 ) { if ( v13 > 744 ) { if ( v13 < 899 ) break; if ( v13 <= 900 ) continue; v14 = v13 == 915; } else { if ( v13 < 29 ) break; if ( v13 <= 30 ) continue; v14 = v13 == 105; } if ( !v14 ) break; } } } if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { for ( k = 0; k < cocos2d::CCArray::count(a1->m_selectedObjects); ++k ) { if ( (unsigned int)(*(_DWORD *)(cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, k) + 884) - 3006) > 4 ) goto LABEL_117; } return 1; } LABEL_117: if ( cocos2d::CCArray::count(a1->m_selectedObjects) ) { for ( m = 0; m < cocos2d::CCArray::count(a1->m_selectedObjects); ++m ) { v17 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, m); if ( !GameObject::isSpawnableTrigger(v17) ) return 0; } return 1; } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source