// // GJBaseGameLayer::damagingObjectsInRect from 0x99cf28 to 0x99d4e0 (1464 bytes) // // 4 xrefs: // > PlayerObject::spiderTestJumpInternal @ 0x762c9c // > PlayerObject::spiderTestJumpY @ 0x7649e4 // > PlayerObject::spiderTestJumpX @ 0x7654d0 // > @ 0xe1e20 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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:58:05 +0000 // cocos2d::CCArray *__fastcall GJBaseGameLayer::damagingObjectsInRect(__int64 a1, float *a2, unsigned __int8 a3) { cocos2d::CCArray *updated; // x0 float v6; // s2 float v7; // s0 _BOOL4 v8; // w0 float v9; // s2 __int64 v10; // x19 __int64 v11; // x25 float v12; // s1 float v13; // s0 float v14; // s0 float v16; // s0 float v17; // s1 _BOOL4 v18; // w0 _QWORD *v19; // x19 __int64 v20; // x0 unsigned __int64 v21; // x1 int v22; // w0 __int64 v23; // x28 _QWORD *v24; // x21 int v25; // w20 __int64 v26; // x19 __int64 v27; // x20 GameObject *v28; // x27 const cocos2d::CCRect *v29; // x0 int v30; // [xsp+84h] [xbp+84h] int v31; // [xsp+88h] [xbp+88h] int v32; // [xsp+8Ch] [xbp+8Ch] cocos2d::CCArray *v33; // [xsp+90h] [xbp+90h] int v34; // [xsp+98h] [xbp+98h] int i; // [xsp+9Ch] [xbp+9Ch] __int64 v36; // [xsp+A0h] [xbp+A0h] int v38; // [xsp+B0h] [xbp+B0h] int v39; // [xsp+B4h] [xbp+B4h] __int64 v40; // [xsp+B8h] [xbp+B8h] float ObjectRadius; // [xsp+C0h] [xbp+C0h] float *v42; // [xsp+C0h] [xbp+C0h] __int64 v43; // [xsp+D8h] [xbp+D8h] BYREF _BYTE v44[8]; // [xsp+E0h] [xbp+E0h] BYREF _BYTE v45[16]; // [xsp+E8h] [xbp+E8h] BYREF _BYTE v46[16]; // [xsp+F8h] [xbp+F8h] BYREF v39 = a3; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, (const cocos2d::CCRect *)a2); updated = (cocos2d::CCArray *)GJBaseGameLayer::updateOBB2(a1, (__int64)v46); v33 = (cocos2d::CCArray *)cocos2d::CCArray::create(updated); v6 = *a2; if ( *a2 > 0.0 && ((v7 = *(float *)(a1 + 13632), v6 < 10000000.0) ? (v8 = (float)((float)(v6 * v7) + -1.0) > 0.0) : (v8 = (float)((float)(v7 * 10000000.0) + -1.0) > 0.0), v8) ) { if ( v6 <= 0.0 ) { v34 = -1; } else { if ( v6 >= 10000000.0 ) { v34 = (int)(float)((float)(v7 * 10000000.0) + -1.0); v9 = v6 + a2[2]; if ( v9 <= 0.0 ) goto LABEL_8; goto LABEL_15; } v34 = (int)(float)((float)(v6 * v7) + -1.0); } } else { v34 = 0; } v9 = v6 + a2[2]; if ( v9 <= 0.0 ) { LABEL_8: v10 = *(_QWORD *)(a1 + 13392); v11 = *(_QWORD *)(a1 + 13400); v12 = (float)(unsigned __int64)(((v11 - v10) >> 3) - 1); if ( v12 >= 1.0 ) goto LABEL_9; goto LABEL_17; } LABEL_15: v16 = *(float *)(a1 + 13632); if ( v9 >= 10000000.0 ) { v10 = *(_QWORD *)(a1 + 13392); v11 = *(_QWORD *)(a1 + 13400); v12 = (float)(unsigned __int64)(((v11 - v10) >> 3) - 1); if ( (float)((float)(v16 * 10000000.0) + 1.0) > v12 ) goto LABEL_17; } else { v10 = *(_QWORD *)(a1 + 13392); v11 = *(_QWORD *)(a1 + 13400); v12 = (float)(unsigned __int64)(((v11 - v10) >> 3) - 1); if ( (float)((float)(v9 * v16) + 1.0) > v12 ) { LABEL_17: v32 = (int)v12; goto LABEL_18; } } if ( v9 <= 0.0 ) { LABEL_9: v32 = 1; v13 = a2[1]; if ( v13 <= 0.0 ) goto LABEL_10; goto LABEL_19; } if ( v9 < 10000000.0 ) v32 = (int)(float)((float)(v9 * v16) + 1.0); else v32 = (int)(float)((float)(v16 * 10000000.0) + 1.0); LABEL_18: v13 = a2[1]; if ( v13 <= 0.0 ) goto LABEL_10; LABEL_19: v17 = *(float *)(a1 + 13636); if ( v13 < 10000000.0 ) v18 = (float)((float)(v13 * v17) + -1.0) > 0.0; else v18 = (float)((float)(v17 * 10000000.0) + -1.0) > 0.0; if ( !v18 ) { LABEL_10: v31 = 0; v14 = v13 + a2[3]; if ( v14 <= 0.0 ) goto LABEL_11; goto LABEL_26; } if ( v13 <= 0.0 ) { v31 = -1; } else if ( v13 < 10000000.0 ) { v31 = (int)(float)((float)(v13 * v17) + -1.0); } else { v31 = (int)(float)((float)(v17 * 10000000.0) + -1.0); } v14 = v13 + a2[3]; if ( v14 <= 0.0 ) { LABEL_11: v30 = 1; if ( v10 == v11 ) return v33; goto LABEL_29; } LABEL_26: if ( v14 < 10000000.0 ) v30 = (int)(float)((float)(v14 * *(float *)(a1 + 13636)) + 1.0); else v30 = (int)(float)((float)(*(float *)(a1 + 13636) * 10000000.0) + 1.0); if ( v10 != v11 ) { LABEL_29: if ( v34 > v32 ) return v33; v36 = 8LL * v34; v19 = *(_QWORD **)(v10 + v36); if ( !v19 ) goto LABEL_62; LABEL_31: v20 = (__int64)(v19[1] - *v19) >> 3; v21 = v20 - 1; v22 = v20 - 1; if ( v30 <= v21 ) v22 = v30; for ( i = v22; v31 > i; i = -1 ) { LABEL_60: v36 += 8; if ( v32 < ++v34 ) return v33; v19 = *(_QWORD **)(*(_QWORD *)(a1 + 13392) + v36); if ( v19 ) goto LABEL_31; LABEL_62: ; } v23 = 8LL * v31; v40 = 4LL * v31; v38 = v31; while ( 1 ) { v24 = *(_QWORD **)(*v19 + v23); if ( v24 ) { v25 = *(_DWORD *)(**(_QWORD **)(*(_QWORD *)(a1 + 13560) + v36) + v40); if ( v25 > 0 ) break; } LABEL_48: v23 += 8; ++v38; v40 += 4; if ( i < v38 ) goto LABEL_60; v19 = *(_QWORD **)(*(_QWORD *)(a1 + 13392) + v36); } v26 = 0; v27 = 8 * ((unsigned int)(v25 - 1) + 1LL); while ( 1 ) { while ( 1 ) { v28 = *(GameObject **)(*v24 + v26); if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)v28 + 1800LL))(v28) != 2 && (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)v28 + 1800LL))(v28) != 47 || !*((_BYTE *)v28 + 773) && (!v39 || (unsigned __int8)GameObject::getGroupDisabled(v28)) ) { goto LABEL_40; } v29 = (const cocos2d::CCRect *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v28 + 1328LL))(v28); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v45, v29); if ( *((float *)v28 + 225) > 0.0 ) break; if ( (unsigned __int8)cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)a2, (const cocos2d::CCRect *)v45) ) { if ( !*((_BYTE *)v28 + 744) ) goto LABEL_47; v42 = (float *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v28 + 1560LL))(v28); if ( OBB2D::overlaps1Way((__int64)v42, *(float **)(a1 + 2080)) && OBB2D::overlaps1Way(*(_QWORD *)(a1 + 2080), v42) ) { goto LABEL_47; } } LABEL_40: v26 += 8; if ( v26 == v27 ) goto LABEL_48; } ObjectRadius = GameObject::getObjectRadius(v28); (*(void (__fastcall **)(__int64 *__return_ptr, GameObject *))(*(_QWORD *)v28 + 1360LL))(&v43, v28); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, (const cocos2d::CCRect *)a2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, (const cocos2d::CCPoint *)&v43); if ( !GJBaseGameLayer::rectIntersectsCircle( ObjectRadius, a1, (cocos2d::CCRect *)v46, (const cocos2d::CCPoint *)v44) ) goto LABEL_40; LABEL_47: v26 += 8; cocos2d::CCArray::addObject(v33, v28); if ( v26 == v27 ) goto LABEL_48; } } return v33; }
GD Web Decomp Icon

GD Web Decomp

Raw Source