// // GJBaseGameLayer::drawHitboxTrail from 0x99aee0 to 0x99b760 (2176 bytes) // // 3 xrefs: // > GJBaseGameLayer::updateDebugDraw @ 0x99c01c // > GJBaseGameLayer::updateDebugDraw @ 0x99c034 // > @ 0xc4d50 // // 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:04 +0000 // __int64 __fastcall GJBaseGameLayer::drawHitboxTrail( _QWORD *a1, _QWORD *a2, int a3, const cocos2d::CCRect *a4, float a5) { _QWORD *v5; // x20 unsigned __int64 v6; // x19 int v7; // w25 _QWORD *v10; // x22 _QWORD *v11; // x21 int v12; // w1 _BOOL4 v13; // w23 __int64 v14; // x21 int v15; // w22 int v16; // w26 __int64 v17; // x0 __int64 v18; // x1 __int64 v19; // x19 int v20; // w27 int v21; // w6 __int64 v22; // x26 __int64 v23; // x25 __int64 v24; // x28 float v25; // s2 float v26; // s8 int v27; // w24 int v28; // w0 int v29; // w2 __int64 v30; // x23 int v31; // w0 float v32; // s2 int v33; // w24 float v34; // s0 float v35; // s0 float v36; // s9 float v37; // s1 __int64 v38; // x0 float v39; // s0 float v40; // s0 float v41; // s15 __int64 i; // x20 cocos2d::CCPoint *v43; // x0 long double v44; // q0 long double v45; // q0 long double v46; // q0 long double v47; // q0 int v48; // w1 _QWORD *v49; // [xsp+B0h] [xbp+B0h] int v50; // [xsp+BCh] [xbp+BCh] _QWORD *v51; // [xsp+C0h] [xbp+C0h] __int64 v52; // [xsp+E0h] [xbp+E0h] float v53; // [xsp+E0h] [xbp+E0h] float v54; // [xsp+E0h] [xbp+E0h] _QWORD *v55; // [xsp+F0h] [xbp+F0h] int v57; // [xsp+100h] [xbp+100h] int v59; // [xsp+110h] [xbp+110h] int v61; // [xsp+120h] [xbp+120h] _BOOL4 v62; // [xsp+124h] [xbp+124h] int v63; // [xsp+128h] [xbp+128h] int v64; // [xsp+12Ch] [xbp+12Ch] float v65[2]; // [xsp+130h] [xbp+130h] BYREF _BYTE v66[8]; // [xsp+138h] [xbp+138h] BYREF _BYTE v67[8]; // [xsp+140h] [xbp+140h] BYREF _BYTE v68[16]; // [xsp+148h] [xbp+148h] BYREF unsigned __int64 v69; // [xsp+158h] [xbp+158h] BYREF int v70; // [xsp+160h] [xbp+160h] float v71; // [xsp+164h] [xbp+164h] unsigned __int64 v72; // [xsp+168h] [xbp+168h] BYREF int v73; // [xsp+170h] [xbp+170h] float v74; // [xsp+174h] [xbp+174h] unsigned __int64 v75; // [xsp+178h] [xbp+178h] BYREF int v76; // [xsp+180h] [xbp+180h] float v77; // [xsp+184h] [xbp+184h] _BYTE v78[8]; // [xsp+188h] [xbp+188h] BYREF __int64 v79; // [xsp+190h] [xbp+190h] BYREF __int64 v80; // [xsp+198h] [xbp+198h] BYREF __int64 v81; // [xsp+1A0h] [xbp+1A0h] BYREF v5 = a2; v6 = 0xCCCCCCCCCCCCCCCDLL * ((__int64)(a2[1] - *a2) >> 2); v7 = v6; if ( (_DWORD)v6 ) { v51 = a1 + 1536; v55 = a1 + 1024; v10 = a1 + 1536; v11 = a1 + 1024; v12 = (*(__int64 (**)(void))(*a1 + 1336LL))(); v59 = v12; v13 = (int)v6 >= v12; v62 = v13; v61 = *((unsigned __int8 *)v10 + 1557); if ( *((_BYTE *)v11 + 4044) || *((_BYTE *)v10 + 1557) ) { v50 = 0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, -100000.0, -100000.0); if ( (int)v6 <= 0 ) return _stack_chk_guard; } else { if ( (int)v6 <= 0 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, -100000.0, -100000.0); return _stack_chk_guard; } v14 = 0; v15 = 0; v16 = v12; do { v17 = v14; if ( v13 ) v17 = (a3 + (int)v14) % v16; v18 = 20 * v17; ++v14; cocos2d::CCRect::CCRect( (cocos2d::CCRect *)&v75, *(float *)(*v5 + v18) - (float)(*(float *)(*v5 + v18 + 8) * 0.5), *(float *)(*v5 + v18 + 4) - (float)(*(float *)(*v5 + v18 + 8) * 0.5), *(float *)(*v5 + v18 + 8), *(float *)(*v5 + v18 + 8)); if ( (unsigned __int8)cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v75, a4) ) ++v15; } while ( (int)v6 > (int)v14 ); v50 = v15; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, -100000.0, -100000.0); } v19 = -1; v63 = 0; v20 = 0; v64 = v7; do { v21 = v20; if ( v62 ) v21 = (a3 + v20) % v59; v22 = *v5; v23 = 20LL * v21; v24 = *v5 + v23; v25 = *(float *)(v24 + 8); v26 = v25 * 0.5; cocos2d::CCRect::CCRect( (cocos2d::CCRect *)v68, *(float *)v24 - (float)(v25 * 0.5), *(float *)(v24 + 4) - (float)(v25 * 0.5), v25, v25); v27 = (unsigned __int8)cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v68, a4); v28 = v63; v29 = *(unsigned __int8 *)(v24 + 16); if ( v27 ) v28 = v63 + 1; v63 = v28; if ( v20 ) { v30 = v19; if ( v62 ) v30 = (a3 + (int)v19) % v59; v31 = *(unsigned __int8 *)(*v5 + 20 * v30 + 16); if ( v61 ) { v32 = 2.0; if ( v29 != v31 ) { LABEL_52: v57 = 1; goto LABEL_27; } } else { v32 = 3.5; if ( v29 != v31 ) goto LABEL_52; } } else { v32 = 2.0; if ( !v61 ) v32 = 3.5; } if ( v20 < v64 - 1 && vabds_f32(*(float *)(v22 + v23), v65[0]) < v32 && vabds_f32(*(float *)(v24 + 4), v65[1]) < v32 ) { goto LABEL_48; } v57 = 0; LABEL_27: cocos2d::CCPoint::operator=(v65, v24); if ( v27 ) { if ( *((_BYTE *)v55 + 4044) ) { v33 = v20 + 1; if ( v20 != v64 - 1 ) { LABEL_33: v36 = 0.86; goto LABEL_34; } } else { v33 = v20 + 1; if ( v50 ) v34 = (float)v63 / (float)v50; else v34 = (float)(v20 + 1) / (float)v64; if ( v20 != v64 - 1 ) { v35 = v34 / 0.7; if ( v35 >= 1.0 ) goto LABEL_33; v36 = (float)(v35 * 0.85) + 0.01; LABEL_34: if ( v61 ) { v37 = 0.9; goto LABEL_36; } LABEL_57: v71 = v36; LODWORD(v69) = 1.0; HIDWORD(v69) = 1.0; v70 = 0; goto LABEL_37; } } v36 = 1.0; if ( !v61 ) goto LABEL_57; v37 = 1.0; LABEL_36: v71 = v37; v69 = COERCE_UNSIGNED_INT(1.0); v70 = 0; LABEL_37: v38 = a1[1728]; if ( v20 == v64 - 1 && *((_BYTE *)v51 + 362) ) { v77 = 0.25; v76 = v70; v75 = v69; } else { v75 = 0; v76 = 0; v77 = 0.0; } cocos2d::CCDrawNode::drawRect(v38, v68, &v75, &v69, 0, a5); v39 = fmodf(fabsf(*(float *)(v24 + 12)), 90.0); if ( v39 > 0.01 && v39 < 89.99 ) { v53 = (float)-*(float *)(v24 + 12) * 0.017453; v41 = cosf(v53); v54 = sinf(v53); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v75, v41, v54); cocos2d::CCPoint::operator*(&v75, v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v75, -v54, v41); cocos2d::CCPoint::operator*(&v75, v26); v49 = v5; for ( i = 0; i != 32; i += 8 ) { v43 = (cocos2d::CCPoint *)&v78[i]; cocos2d::CCPoint::CCPoint(v43); } v5 = v49; cocos2d::CCPoint::operator-(&v72, v24, v66, v44); cocos2d::CCPoint::operator-(&v75, &v72, v67, v45); cocos2d::CCPoint::operator=(v78, &v75); cocos2d::CCPoint::operator+(&v72, v24); cocos2d::CCPoint::operator-(&v75, &v72, v67, v46); cocos2d::CCPoint::operator=(&v79, &v75); cocos2d::CCPoint::operator+(&v72, v24); cocos2d::CCPoint::operator+(&v75, &v72); *(__n128 *)&v47 = cocos2d::CCPoint::operator=(&v80, &v75); cocos2d::CCPoint::operator-(&v72, v24, v66, v47); cocos2d::CCPoint::operator+(&v75, &v72); cocos2d::CCPoint::operator=(&v81, &v75); if ( v61 ) { if ( v20 == v64 - 1 ) *(float *)&v48 = 0.9; else *(float *)&v48 = 0.6; v72 = 1058642330; v74 = *(float *)&v48; v73 = 0; } else { if ( v20 != v64 - 1 ) v36 = v36 * 0.7; v74 = v36; v72 = 0x3F19999A3F19999ALL; v73 = 0; } v75 = 0; v76 = 0; v77 = 0.0; cocos2d::CCDrawNode::drawPolygon(a5); } if ( v57 && !*((_BYTE *)v55 + 4044) ) { v40 = *(float *)(v22 + v23); v52 = a1[1728]; if ( *(_BYTE *)(v24 + 16) ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v40 - 2.0, *(float *)(v24 + 4) - 2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, *(float *)(v22 + v23) + 2.0, *(float *)(v24 + 4) + 2.0); v72 = __PAIR64__(0.5, 1.0); v73 = 0; v74 = 1.0; v75 = 0; v76 = 0; v77 = 0.0; cocos2d::CCDrawNode::drawRect(v52, v66, v67, &v72, &v75, 0, 0.0); } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v40 - 2.0, *(float *)(v24 + 4) - 2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, *(float *)(v22 + v23) + 2.0, *(float *)(v24 + 4) + 2.0); v72 = 0; v73 = 0; v74 = 0.0; v75 = __PAIR64__(0.5, 1.0); v76 = 0; v77 = 1.0; cocos2d::CCDrawNode::drawRect(v52, v66, v67, &v72, &v75, 0, a5); } } goto LABEL_49; } LABEL_48: v33 = v20 + 1; LABEL_49: ++v20; ++v19; } while ( v64 > v33 ); } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source