// // cocos2d::CCMenu::alignItemsVerticallyWithPadding from 0xaf1a3c to 0xaf1c54 (536 bytes) // // 4 xrefs: // > EditorPauseLayer::customSetup @ 0x78c588 // > InfoLayer::init @ 0x7e43dc // > cocos2d::CCMenu::alignItemsVertically @ 0xaf1c58 // > @ 0x3fe88 // // 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::alignItemsVerticallyWithPadding(cocos2d::CCMenu *a1, float a2) { cocos2d::CCArray *m_pChildren; // x20 float v5; // s8 int v6; // w0 cocos2d::CCArray *v7; // x20 float v8; // s8 cocos2d::CCArray *v9; // x0 cocos2d::ccArray *v10; // x1 const void **v11; // x20 __int64 v12; // x0 char *v13; // x21 const void *i; // x0 void *v15; // x0 void *v16; // x19 void (__fastcall *v17)(void *, cocos2d::CCPoint *); // x26 float v18; // s9 float v19; // s0 float v20; // s9 cocos2d::ccArray *data; // x1 const void **arr; // x19 __int64 v23; // x0 char *v24; // x25 const void *v25; // x0 void *v26; // x0 void *v27; // x20 float v28; // s9 cocos2d::CCPoint v29; // [xsp+70h] [xbp+70h] BYREF m_pChildren = a1->m_pChildren; v5 = -a2; if ( !m_pChildren ) return; v6 = cocos2d::CCArray::count(m_pChildren); v7 = a1->m_pChildren; if ( v6 ) { if ( !v7 ) return; data = v7->data; if ( !data->num ) goto LABEL_4; arr = (const void **)data->arr; v23 = 8LL * data->num - 8; v24 = (char *)arr + v23; if ( arr > (const void **)((char *)arr + v23) ) goto LABEL_4; v25 = *arr; if ( !*arr ) goto LABEL_4; do { v26 = _dynamic_cast( v25, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); v27 = v26; if ( v26 ) { v28 = *(float *)((*(__int64 (__fastcall **)(void *))(*(_QWORD *)v26 + 312LL))(v26) + 4); v5 = v5 + (float)(a2 + (float)(v28 * (*(float (__fastcall **)(void *))(*(_QWORD *)v27 + 152LL))(v27))); } if ( v24 < (char *)++arr ) break; v25 = *arr; } while ( *arr ); v7 = a1->m_pChildren; } if ( !v7 ) return; LABEL_4: v8 = v5 * 0.5; if ( (unsigned int)cocos2d::CCArray::count(v7) ) { v9 = a1->m_pChildren; if ( v9 ) { v10 = v9->data; if ( v10->num ) { v11 = (const void **)v10->arr; v12 = 8LL * v10->num - 8; v13 = (char *)v11 + v12; if ( v11 <= (const void **)((char *)v11 + v12) ) { for ( i = *v11; *v11; i = *v11 ) { v15 = _dynamic_cast( i, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); v16 = v15; if ( v15 ) { v17 = *(void (__fastcall **)(void *, cocos2d::CCPoint *))(*(_QWORD *)v15 + 184LL); v18 = *(float *)((*(__int64 (__fastcall **)(void *))(*(_QWORD *)v15 + 312LL))(v15) + 4); v19 = (*(float (__fastcall **)(void *))(*(_QWORD *)v16 + 152LL))(v16); cocos2d::CCPoint::CCPoint(&v29, 0.0, v8 - (float)((float)(v18 * v19) * 0.5)); v17(v16, &v29); v20 = *(float *)((*(__int64 (__fastcall **)(void *))(*(_QWORD *)v16 + 312LL))(v16) + 4); v8 = v8 - (float)(a2 + (float)(v20 * (*(float (__fastcall **)(void *))(*(_QWORD *)v16 + 152LL))(v16))); } if ( v13 < (char *)++v11 ) break; } } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source