// // GJBaseGameLayer::damagingObjectsInRect from 0x58e548 to 0x58e942 (1018 bytes) // // 3 xrefs: // > PlayerObject::spiderTestJumpInternal @ 0x444064 // > PlayerObject::spiderTestJumpY @ 0x44564e // > PlayerObject::spiderTestJumpX @ 0x445eee // // 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 11:53:04 +0000 // cocos2d::CCArray *__fastcall GJBaseGameLayer::damagingObjectsInRect(int a1, float *a2, int a3) { float v3; // s12 float v4; // s13 cocos2d::CCArray *updated; // r0 cocos2d::CCArray *v8; // r0 float v9; // s14 float *v10; // r3 float v11; // s12 float v12; // s11 int v13; // r4 float v14; // s13 float v15; // s13 float v16; // s16 float v17; // s14 float *v18; // r3 float v19; // s13 _DWORD *v20; // r8 int v21; // r1 int v22; // r2 int v23; // s13 float v24; // s17 float v25; // s14 float *v26; // r3 int v27; // s17 float v28; // s14 float *v29; // r7 float v30; // s12 float v31; // s11 int v32; // r3 float v33; // s13 float v34; // s12 float v35; // s13 float v36; // s14 float v37; // s13 float *v38; // r3 unsigned int v39; // s16 int i; // r7 _DWORD *v42; // r2 unsigned int v43; // r3 int v44; // r9 GameObject *v45; // r10 const cocos2d::CCRect *v46; // r0 int v47; // r0 int v48; // [sp+4h] [bp-60h] int v49; // [sp+8h] [bp-5Ch] int j; // [sp+Ch] [bp-58h] cocos2d::CCArray *v51; // [sp+10h] [bp-54h] signed int v52; // [sp+14h] [bp-50h] _DWORD *v53; // [sp+18h] [bp-4Ch] int v54; // [sp+28h] [bp-3Ch] float *v56; // [sp+38h] [bp-2Ch] int ObjectRadius; // [sp+3Ch] [bp-28h] _BYTE v58[8]; // [sp+44h] [bp-20h] BYREF _BYTE v59[8]; // [sp+4Ch] [bp-18h] BYREF _BYTE v60[16]; // [sp+54h] [bp-10h] BYREF float v61[4]; // [sp+64h] [bp+0h] BYREF cocos2d::CCRect::CCRect((cocos2d::CCRect *)v61, (const cocos2d::CCRect *)a2); updated = (cocos2d::CCArray *)GJBaseGameLayer::updateOBB2(a1, (int)v61); v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(updated); v9 = *a2; v51 = v8; if ( *a2 <= 0.0 ) { v13 = 0; } else { v4 = 10000000.0; v10 = (float *)(a1 + 11424); v11 = *(float *)(a1 + 11424); if ( v9 < 10000000.0 ) v12 = (float)(v9 * v11) - 1.0; else v12 = (float)(v11 * 10000000.0) - 1.0; v13 = v12 > 0.0; v3 = v12; if ( v12 > 0.0 ) { if ( v9 <= 0.0 ) { v13 = -1; } else { if ( v9 < 10000000.0 ) v14 = *v10; else v14 = 10000000.0; if ( v9 < 10000000.0 ) { v3 = 1.0; } else { v12 = 1.0; v3 = *v10; } if ( v9 < 10000000.0 ) v3 = (float)(v9 * v14) - v3; else v12 = (float)(v3 * v14) - v12; if ( v9 < 10000000.0 ) v15 = v3; else v15 = v12; LODWORD(v4) = (int)v15; v13 = LODWORD(v4); } } } v16 = v9 + a2[2]; if ( v16 <= 0.0 ) { v17 = 1.0; } else { v17 = 10000000.0; v18 = (float *)(a1 + 11424); if ( v16 < 10000000.0 ) { v17 = *v18; v4 = 1.0; } else { v3 = 1.0; } if ( v16 < 10000000.0 ) v19 = v4 + (float)(v16 * v17); else v19 = *v18; if ( v16 < 10000000.0 ) v17 = v19; else v3 = v3 + (float)(v19 * v17); if ( v16 >= 10000000.0 ) v17 = v3; } v20 = (_DWORD *)(a1 + 11304); v21 = *(_DWORD *)(a1 + 11304); v22 = *(_DWORD *)(a1 + 11308); v23 = ((v22 - v21) >> 2) - 1; v24 = (float)(unsigned int)v23; if ( v17 > (float)(unsigned int)v23 ) goto LABEL_44; if ( v16 > 0.0 ) { v25 = 10000000.0; v26 = (float *)(a1 + 11424); if ( v16 < 10000000.0 ) v25 = *v26; else v23 = *(int *)v26; if ( v16 < 10000000.0 ) v24 = (float)(v16 * v25) + 1.0; else v24 = (float)(*(float *)&v23 * v25) + 1.0; LABEL_44: v27 = (int)v24; goto LABEL_46; } v27 = 1; LABEL_46: v28 = a2[1]; if ( v28 <= 0.0 ) { v32 = 0; } else { v29 = (float *)(a1 + 11428); v30 = *(float *)(a1 + 11428); if ( v28 < 10000000.0 ) v31 = (float)(v28 * v30) - 1.0; else v31 = (float)(v30 * 10000000.0) - 1.0; v32 = v31 > 0.0; if ( v31 > 0.0 ) { if ( v28 > 0.0 ) { if ( v28 < 10000000.0 ) v33 = *v29; else v33 = 10000000.0; if ( v28 < 10000000.0 ) { v34 = 1.0; } else { v31 = 1.0; v34 = *v29; } if ( v28 < 10000000.0 ) v34 = (float)(v28 * v33) - v34; else v31 = (float)(v34 * v33) - v31; if ( v28 < 10000000.0 ) v35 = v34; else v35 = v31; v48 = (int)v35; goto LABEL_68; } v32 = -1; } } v48 = v32; LABEL_68: v36 = v28 + a2[3]; if ( v36 <= 0.0 ) { v39 = 1; } else { v37 = 10000000.0; v38 = (float *)(a1 + 11428); if ( v36 < 10000000.0 ) v37 = *v38; else v36 = *v38; v39 = (int)(float)((float)(v36 * v37) + 1.0); } if ( v21 != v22 ) { for ( i = 4 * v13; ; i += 4 ) { if ( v13 > v27 ) return v51; v42 = *(_DWORD **)(*v20 + i); if ( v42 ) { v43 = ((v42[1] - *v42) >> 2) - 1; if ( v43 >= v39 ) v43 = v39; } else { v43 = -1; } v52 = v43; v49 = 4 * v48; for ( j = v48; j <= v52; ++j ) { v53 = *(_DWORD **)(**(_DWORD **)(*v20 + i) + v49); if ( v53 ) { v44 = 0; v54 = *(_DWORD *)(**(_DWORD **)(*(_DWORD *)(a1 + 11388) + i) + v49); while ( 1 ) { if ( v44 >= v54 ) goto LABEL_98; v45 = *(GameObject **)(*v53 + 4 * v44); if ( ((*(int (__fastcall **)(GameObject *))(*(_DWORD *)v45 + 900))(v45) == 2 || (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v45 + 900))(v45) == 47) && (*((_BYTE *)v45 + 657) || a3 && !GameObject::getGroupDisabled(v45)) ) { break; } LABEL_97: ++v44; } v46 = (const cocos2d::CCRect *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v45 + 664))(v45); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v60, v46); if ( *((float *)v45 + 191) <= 0.0 ) { if ( !cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)a2, (const cocos2d::CCRect *)v60) ) goto LABEL_97; if ( *((_BYTE *)v45 + 636) ) { v56 = (float *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v45 + 780))(v45); if ( !OBB2D::overlaps1Way((int)v56, *(float **)(a1 + 1488)) ) goto LABEL_97; v47 = OBB2D::overlaps1Way(*(_DWORD *)(a1 + 1488), v56); goto LABEL_105; } } else { ObjectRadius = GameObject::getObjectRadius(v45); (*(void (__fastcall **)(_BYTE *, GameObject *))(*(_DWORD *)v45 + 680))(v58, v45); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v61, (const cocos2d::CCRect *)a2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, (const cocos2d::CCPoint *)v58); v47 = GJBaseGameLayer::rectIntersectsCircle( a1, (cocos2d::CCRect *)v61, (const cocos2d::CCPoint *)v59, *(float *)&ObjectRadius); LABEL_105: if ( !v47 ) goto LABEL_97; } cocos2d::CCArray::addObject(v51, v45); goto LABEL_97; } LABEL_98: v49 += 4; } ++v13; } } return v51; }
GD Web Decomp Icon

GD Web Decomp

Raw Source