// // cocos2d::CCMenu::alignItemsHorizontallyWithPadding from 0x5d3dfc to 0x5d3f72 (374 bytes) // // 8 xrefs: // > FLAlertLayer::init @ 0x2eb726 // > MenuLayer::init @ 0x30ab7c // > EditorUI::setupCreateMenu @ 0x39bdc0 // > PauseLayer::customSetup @ 0x3a87e8 // > EditLevelLayer::init @ 0x3b713c // > GJGarageLayer::setupPage @ 0x40643c // > GJGarageLayer::setupIconSelect @ 0x406c2a // > cocos2d::CCMenu::alignItemsHorizontally @ 0x5d3f86 // // 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 cocos2d::CCMenu::alignItemsHorizontallyWithPadding(cocos2d::CCMenu *a1, float a2) { cocos2d::CCArray *m_pChildren; // r0 float v5; // s16 cocos2d::CCArray *v6; // r3 cocos2d::ccArray *data; // r3 const void **arr; // r4 const void **v9; // r5 cocos2d::CCArray *v10; // r0 const void *v11; // r0 const void *v12; // t1 void *v13; // r0 void *v14; // r9 float v15; // s17 cocos2d::CCArray *v16; // r3 cocos2d::ccArray *v17; // r3 int v18; // r4 cocos2d::CCObject **v19; // r3 unsigned int v20; // r5 const void **v21; // r8 float v22; // s16 const void *v23; // r0 const void *v24; // t1 void *v25; // r0 void *v26; // r4 void (__fastcall *v27)(void *, cocos2d::CCPoint *); // r10 float v28; // s19 float v29; // r0 float v30; // s19 cocos2d::CCPoint v31; // [sp+Ch] [bp-Ch] BYREF m_pChildren = a1->m_pChildren; v5 = -a2; if ( m_pChildren ) { if ( cocos2d::CCArray::count(m_pChildren) ) { v6 = a1->m_pChildren; if ( v6 ) { data = v6->data; if ( data->num ) { arr = (const void **)data->arr; v9 = &arr[data->num] + 0x3FFFFFFF; while ( arr <= v9 ) { v12 = *arr++; v11 = v12; if ( !v12 ) break; v13 = _dynamic_cast( v11, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); v14 = v13; if ( v13 ) { v15 = *(float *)(*(int (__fastcall **)(void *))(*(_DWORD *)v13 + 156))(v13); v5 = v5 + (float)(a2 + (float)(v15 * (*(float (__fastcall **)(void *))(*(_DWORD *)v14 + 68))(v14))); } } } } } } v10 = a1->m_pChildren; if ( v10 ) { if ( cocos2d::CCArray::count(v10) ) { v16 = a1->m_pChildren; if ( v16 ) { v17 = v16->data; if ( v17->num ) { v18 = v17->num + 0x40000000; v19 = v17->arr; v20 = (unsigned int)&v19[v18 - 1]; v21 = (const void **)v19; v22 = -(float)(v5 * 0.5); while ( (unsigned int)v21 <= v20 ) { v24 = *v21++; v23 = v24; if ( !v24 ) break; v25 = _dynamic_cast( v23, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); v26 = v25; if ( v25 ) { v27 = *(void (__fastcall **)(void *, cocos2d::CCPoint *))(*(_DWORD *)v25 + 92); v28 = *(float *)(*(int (__fastcall **)(void *))(*(_DWORD *)v25 + 156))(v25); v29 = (*(float (__fastcall **)(void *))(*(_DWORD *)v26 + 68))(v26); cocos2d::CCPoint::CCPoint(&v31, v22 + (float)((float)(v28 * v29) * 0.5), 0.0); v27(v26, &v31); v30 = *(float *)(*(int (__fastcall **)(void *))(*(_DWORD *)v26 + 156))(v26); v22 = v22 + (float)(a2 + (float)(v30 * (*(float (__fastcall **)(void *))(*(_DWORD *)v26 + 68))(v26))); } } } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source