// // cocos2d::CCMenu::alignItemsInRowsWithArray from 0x7dc818 to 0x7dcb30 (792 bytes) // // 1 xrefs: // > cocos2d::CCMenu::alignItemsInRows @ 0x7dcb90 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:00:45 +0000 // char **__fastcall cocos2d::CCMenu::alignItemsInRowsWithArray(cocos2d::CCMenu *this, cocos2d::CCArray *a2) { unsigned int v3; // r5 float *v4; // r0 unsigned int v5; // r4 int v6; // r6 int v7; // r0 cocos2d::CCArray *v8; // r0 int v9; // r3 _DWORD *v10; // r2 float v11; // s17 const void **v12; // r8 float v13; // s16 unsigned int v14; // r6 unsigned int v15; // r10 int v16; // r9 unsigned int *v18; // r3 float **v19; // r3 unsigned int v20; // r6 int v21; // r11 int v22; // r9 float **v23; // r2 float **v24; // r8 float *v25; // t1 float *v26; // r0 float *v27; // r3 float v28; // s16 int v29; // r0 unsigned int v30; // s15 unsigned int v31; // r2 unsigned int v32; // r1 const void *v33; // r0 const void *v34; // t1 void *v35; // r0 void *v36; // r5 float *v37; // r0 float v38; // s18 unsigned int v39; // s15 const void **v40; // [sp+0h] [bp-5Ch] unsigned int v41; // [sp+0h] [bp-5Ch] struct __class_type_info *lpstype; // [sp+4h] [bp-58h] struct __class_type_info *lpstypea; // [sp+4h] [bp-58h] float *v44; // [sp+8h] [bp-54h] char v45[4]; // [sp+14h] [bp-48h] BYREF float v46; // [sp+18h] [bp-44h] char *v47[3]; // [sp+1Ch] [bp-40h] BYREF char *v48; // [sp+28h] [bp-34h] BYREF unsigned int *v49; // [sp+2Ch] [bp-30h] unsigned int *v50; // [sp+30h] [bp-2Ch] BYREF char *v51; // [sp+34h] [bp-28h] BYREF int *v52; // [sp+38h] [bp-24h] unsigned int v53; // [sp+3Ch] [bp-20h] void *v54[2]; // [sp+40h] [bp-1Ch] BYREF unsigned int *v55; // [sp+48h] [bp-14h] v3 = 0; sub_7DC4C8(v47, (int)a2); v4 = *((float **)this + 48); v48 = nullptr; v49 = nullptr; v50 = nullptr; v51 = nullptr; v52 = nullptr; v53 = 0; if ( !v4 || (v4 = (float *)cocos2d::CCArray::count((cocos2d::CCArray *)v4)) == nullptr ) { v5 = 0; LABEL_4: v6 = -10; goto LABEL_5; } v5 = *((_DWORD *)this + 48); if ( !v5 ) goto LABEL_4; v18 = *(unsigned int **)(v5 + 52); v5 = *v18; if ( !*v18 ) goto LABEL_4; v19 = (float **)v18[3]; v20 = v5 + 0x3FFFFFFF; v5 = 0; v21 = 0; v22 = -5; v23 = &v19[v20]; v24 = v19; v6 = -10; v41 = (unsigned int)v23; while ( (unsigned int)v24 <= v41 ) { v25 = *v24++; v4 = v25; if ( !v25 ) break; v4 = (float *)_dynamic_cast( v4, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); if ( v4 ) { v44 = v4; lpstype = *(struct __class_type_info **)&v47[0][4 * v21]; v26 = (float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v4 + 164))(v4); v27 = v44; v28 = *v26; if ( (float)v3 >= *v26 || (v29 = _isnanf(*v26), v27 = v44, v29) ) v30 = (unsigned int)(float)v3; else v30 = (unsigned int)v28; v3 = v30; ++v5; v4 = (float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v27 + 164))(v27); v22 += (int)(float)(v4[1] + 5.0); if ( v5 >= (unsigned int)lpstype ) { if ( v49 == v50 ) { v31 = ((char *)v49 - v48) >> 2; if ( v31 > 0x1FFFFFFE ) { v32 = 0x3FFFFFFF; } else { v32 = v31 + 1; if ( v31 + 1 < 2 * v31 ) v32 = 2 * v31; } std::__split_buffer::__split_buffer(v54, v32, v31, (int)&v50); if ( v55 ) *v55 = v30; ++v55; std::vector::__swap_out_circular_buffer((int)&v48, v54); v4 = (float *)v54[0]; v55 -= (unsigned int)((char *)v55 - (char *)v54[1]) >> 2; if ( v54[0] ) operator delete(v54[0]); } else { if ( v49 ) *v49 = v30; ++v49; } v54[0] = (void *)v22; if ( (unsigned int)v52 >= v53 ) { std::vector::__push_back_slow_path((int)&v51, v54); } else { if ( v52 ) *v52 = v22; ++v52; } ++v21; v6 += 10 + v30; v3 = 0; v5 = 0; v22 = -5; } } } LABEL_5: v7 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v4); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v45, v7); v8 = *((cocos2d::CCArray **)this + 48); if ( v8 ) { if ( cocos2d::CCArray::count(v8) ) { v9 = *((_DWORD *)this + 48); if ( v9 ) { v10 = *(_DWORD **)(v9 + 52); if ( *v10 ) { v11 = 0.0; v12 = (const void **)v10[3]; v13 = (float)(v6 / -2); v14 = 0; v15 = 0; v16 = 0; v40 = &v12[*v10] + 0x3FFFFFFF; while ( v12 <= v40 ) { v34 = *v12++; v33 = v34; if ( !v34 ) break; v35 = _dynamic_cast( v33, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode, 0); v36 = v35; if ( v35 ) { if ( !v15 ) { v15 = *(_DWORD *)&v47[0][4 * v16]; v11 = (float)*(unsigned int *)&v51[4 * v16]; } v37 = (float *)(*(int (__fastcall **)(void *))(*(_DWORD *)v35 + 164))(v35); v38 = *v37; if ( (float)v14 >= *v37 || _isnanf(*v37) ) v39 = (unsigned int)(float)v14; else v39 = (unsigned int)v38; v14 = v39; ++v5; lpstypea = *(struct __class_type_info **)(*(_DWORD *)v36 + 92); cocos2d::CCPoint::CCPoint( (float *)v54, v13 + (float)(*(_DWORD *)&v48[4 * v16] >> 1), v11 - (float)(v46 * 0.5)); ((void (__fastcall *)(void *, void **))lpstypea)(v36, v54); v11 = v11 - (float)(*(float *)((*(int (__fastcall **)(void *))(*(_DWORD *)v36 + 164))(v36) + 4) + 10.0); if ( v5 >= v15 ) { ++v16; v14 = 0; v15 = 0; v5 = 0; v13 = v13 + (float)(v39 + 5); } } } } } } } std::__vector_base::~__vector_base(&v51); std::__vector_base::~__vector_base(&v48); return std::__vector_base::~__vector_base(v47); }
GD Web Decomp Icon

GD Web Decomp

Raw Source