// // HardStreak::updateStroke from 0x56a42c to 0x56aa2e (1538 bytes) // // 3 xrefs: // > PlayerObject::updateEffects @ 0x4351a4 // > HardStreak::resumeStroke @ 0x56aa38 // > HardStreak::firstSetup @ 0x56aa76 // // 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:52:31 +0000 // char **__fastcall HardStreak::updateStroke(char **this, float a2) { int v2; // r4 int v3; // r3 const cocos2d::CCPoint *v4; // r0 cocos2d::CCArray *v5; // r0 unsigned int v6; // r1 int v7; // r3 const cocos2d::CCPoint *v8; // r2 _DWORD *v9; // r3 int *v10; // r6 int *v11; // r5 int v12; // r1 int v13; // t1 signed int v14; // r6 int v15; // r7 char *v16; // r5 int v17; // r5 char *v18; // r1 char *v19; // r2 char *v20; // r7 int v21; // r5 int v22; // r3 int v23; // r3 const cocos2d::CCPoint *v24; // r1 float v25; // r0 float *v26; // r1 char *v27; // r0 char *v28; // r9 float v29; // s15 float v30; // s15 int v31; // r3 int v32; // r5 float v33; // s16 const cocos2d::CCPoint *v34; // r2 float v35; // s19 int v36; // r5 float v37; // s14 float v38; // s15 float v39; // s17 float v40; // s15 unsigned __int8 *v41; // r0 int v42; // r8 int v43; // r7 int v44; // r6 int v45; // r3 int (__fastcall *v46)(int); // r3 float v47; // s15 int v48; // r6 int v49; // r7 int v50; // r10 int i; // r8 int v52; // [sp+0h] [bp-CCh] int v53; // [sp+8h] [bp-C4h] int v54; // [sp+Ch] [bp-C0h] _BYTE v55[8]; // [sp+24h] [bp-A8h] BYREF _BYTE v56[8]; // [sp+2Ch] [bp-A0h] BYREF _BYTE v57[8]; // [sp+34h] [bp-98h] BYREF _BYTE v58[8]; // [sp+3Ch] [bp-90h] BYREF _BYTE v59[8]; // [sp+44h] [bp-88h] BYREF float v60; // [sp+4Ch] [bp-80h] BYREF float v61; // [sp+50h] [bp-7Ch] _BYTE v62[8]; // [sp+54h] [bp-78h] BYREF float v63; // [sp+5Ch] [bp-70h] BYREF float v64; // [sp+60h] [bp-6Ch] float v65; // [sp+64h] [bp-68h] BYREF float v66; // [sp+68h] [bp-64h] cocos2d::CCPoint *v67; // [sp+6Ch] [bp-60h] BYREF cocos2d::CCPoint *v68; // [sp+70h] [bp-5Ch] cocos2d::CCPoint *v69; // [sp+74h] [bp-58h] BYREF char *v70[3]; // [sp+78h] [bp-54h] BYREF char *v71[3]; // [sp+84h] [bp-48h] BYREF float v72[5]; // [sp+90h] [bp-3Ch] BYREF _DWORD v73[2]; // [sp+A4h] [bp-28h] BYREF char v74[8]; // [sp+ACh] [bp-20h] BYREF char v75[8]; // [sp+B4h] [bp-18h] BYREF char v76[8]; // [sp+BCh] [bp-10h] BYREF v2 = (int)this; if ( *((_BYTE *)this + 366) ) { cocos2d::CCDrawNode::clear((cocos2d::CCDrawNode *)this); this = (char **)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 344)); if ( this ) { this = (char **)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 448))(v2); if ( this ) { if ( *(_BYTE *)(v2 + 364) ) v3 = 1; else v3 = 2; v53 = v3; v4 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 96))(v2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v4); v5 = *(cocos2d::CCArray **)(v2 + 344); v67 = nullptr; v68 = nullptr; v69 = nullptr; v6 = cocos2d::CCArray::count(v5) + 1; if ( v6 > (v69 - v67) >> 3 ) { std::__split_buffer::__split_buffer(v72, v6, (v68 - v67) >> 3, (int)&v69); std::vector::__swap_out_circular_buffer(&v67, v72); std::__split_buffer::~__split_buffer((int)v72); } v7 = *(_DWORD *)(v2 + 344); if ( v7 ) { v9 = *(_DWORD **)(v7 + 52); if ( *v9 ) { v10 = (int *)v9[3]; v11 = &v10[*v9 - 1]; while ( v10 <= v11 ) { v13 = *v10++; v12 = v13; if ( !v13 ) break; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v72, (const cocos2d::CCPoint *)(v12 + 52)); cocos2d::CCPoint::operator-(v71, v72, v55); if ( v67 != v68 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, (cocos2d::CCPoint *)((char *)v68 - 8)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, (const cocos2d::CCPoint *)v71); cocos2d::CCPoint::operator-(&v63, v56, v57); if ( (float)((float)(v64 * v64) + (float)(v63 * v63)) <= 0.01 ) continue; } if ( v68 == v69 ) { std::vector::__push_back_slow_path( (int)&v67, (const cocos2d::CCPoint *)v71); } else { if ( v68 ) cocos2d::CCPoint::CCPoint(v68, (const cocos2d::CCPoint *)v71); v68 = (cocos2d::CCPoint *)((char *)v68 + 8); } } } } cocos2d::CCPoint::operator-(v58, v2 + 348, v55); if ( v67 == v68 || (cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, (cocos2d::CCPoint *)((char *)v68 - 8)), cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, (const cocos2d::CCPoint *)v58), cocos2d::CCPoint::operator-(&v65, v59, v62), (float)((float)(v66 * v66) + (float)(v65 * v65)) > 0.01) ) { if ( v68 == v69 ) { std::vector::__push_back_slow_path( (int)&v67, (const cocos2d::CCPoint *)v58); } else { if ( v68 ) cocos2d::CCPoint::CCPoint(v68, (const cocos2d::CCPoint *)v58); v68 = (cocos2d::CCPoint *)((char *)v68 + 8); } } v14 = (v68 - v67) >> 3; if ( v14 > 1 ) { if ( !*(_BYTE *)(v2 + 365) ) { v15 = 8 * (v14 - 2); if ( COERCE_FLOAT( cocos2d::ccpDistance( (cocos2d::CCPoint *)((char *)v67 + v15), (cocos2d::CCPoint *)((char *)v67 + v15 + 8), v8)) > 10.0 ) { v16 = (char *)v67 + v15 + 8; cocos2d::CCPoint::operator-(&v65, v16, (char *)v67 + v15); cocos2d::ccpNormalize((cocos2d *)v70, (const cocos2d::CCPoint *)&v65); cocos2d::CCPoint::operator*(v71, v70, 1082130432); cocos2d::CCPoint::operator-(v72, v16, v71); cocos2d::CCPoint::operator=(v16, v72); } } v52 = v14 - 1; std::vector::vector(v70, v14 - 1); v17 = 0; do { v18 = (char *)v67 + 8 * v17 + 8; v19 = (char *)v67 + 8 * v17; v20 = &v70[0][8 * v17++]; cocos2d::CCPoint::operator-(&v65, v18, v19); cocos2d::ccpNormalize((cocos2d *)v71, (const cocos2d::CCPoint *)&v65); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v72, COERCE_FLOAT((int)v71[1] ^ 0x80000000), *(float *)v71); cocos2d::CCPoint::operator=(v20, v72); } while ( v17 < v52 ); std::vector::vector(v71, v14); v21 = 0; v22 = 0; while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v60, (const cocos2d::CCPoint *)&v70[0][8 * v22]); v23 = v21 == v52 ? v14 - 2 : v21; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, (const cocos2d::CCPoint *)&v70[0][8 * v23]); cocos2d::CCPoint::operator+(&v63, &v60, v62); v25 = COERCE_FLOAT(cocos2d::ccpLength((cocos2d *)&v63, v24)); if ( v25 >= 0.001 ) { cocos2d::CCPoint::operator*(&v65, &v63, 1.0 / v25); v28 = &v71[0][8 * v21]; v29 = (float)(v66 * v61) + (float)(v65 * v60); v30 = v29 <= 0.25 ? 4.0 : 1.0 / v29; cocos2d::CCPoint::operator*(v72, &v65, LODWORD(v30)); v27 = v28; v26 = v72; } else { v26 = &v60; v27 = &v71[0][8 * v21]; } cocos2d::CCPoint::operator=(v27, v26); if ( ++v21 == v14 ) break; if ( v21 ) v22 = v21 - 1; else v22 = 0; } v31 = v21 - 2; v32 = 8 * v52 - 8; v54 = v31; cocos2d::CCPoint::operator-(v72, (char *)v67 + 8 * v52, (char *)v67 + v32); cocos2d::ccpNormalize((cocos2d *)&v60, (const cocos2d::CCPoint *)v72); v33 = (float)((float)(fabsf((float)(*(float *)&v71[0][v32 + 4] * v61) + (float)(*(float *)&v71[0][v32] * v60)) * 3.0) * *(float *)(v2 + 356)) * *(float *)(v2 + 360); v35 = COERCE_FLOAT( cocos2d::ccpDistance( (cocos2d::CCPoint *)((char *)v67 + v32), (cocos2d::CCPoint *)((char *)v67 + 8 * v52), v34)); v36 = 0; while ( 1 ) { v37 = *(float *)(v2 + 356); v38 = *(float *)(v2 + 360); v39 = 0.5; if ( v36 ) { v40 = (float)(v37 + v37) * v38; if ( v40 < 1.0 ) { v41 = (unsigned __int8 *)&unk_BED198; goto LABEL_53; } } else { v40 = (float)(v37 * 6.0) * v38; if ( v40 < 1.0 ) goto LABEL_50; } v39 = v40 * 0.5; if ( !v36 ) { LABEL_50: v41 = (unsigned __int8 *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 472))(v2); goto LABEL_53; } v41 = (unsigned __int8 *)&unk_BED198; LABEL_53: v42 = *v41; v43 = v41[1]; v44 = v41[2]; memset(v72, 0, 0x10u); v72[3] = 1.0; v45 = *(_DWORD *)v2; v72[0] = (float)v42 / 255.0; v72[1] = (float)v43 / 255.0; v72[2] = (float)v44 / 255.0; v46 = *(int (__fastcall **)(int))(v45 + 448); if ( v36 ) v47 = (float)((float)v46(v2) / 255.0) * 0.65; else v47 = (float)v46(v2) / 255.0; v72[3] = v47; v48 = 0; do { if ( v33 <= v35 || v48 != v54 ) { v49 = 8 * v48; cocos2d::CCPoint::operator*(v62, &v71[0][8 * v48], LODWORD(v39)); v50 = 8 * v48 + 8; cocos2d::CCPoint::operator*(&v63, &v71[0][v50], LODWORD(v39)); for ( i = 0; i != 8; i += 2 ) cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v73[i]); cocos2d::CCPoint::operator-(&v65, (char *)v67 + v49, v62); cocos2d::CCPoint::operator=(v73, &v65); cocos2d::CCPoint::operator+(&v65, (char *)v67 + v49, v62); cocos2d::CCPoint::operator=(v74, &v65); cocos2d::CCPoint::operator+(&v65, (char *)v67 + v50, &v63); cocos2d::CCPoint::operator=(v75, &v65); cocos2d::CCPoint::operator-(&v65, (char *)v67 + v50, &v63); cocos2d::CCPoint::operator=(v76, &v65); HardStreak::appendQuad(v2, v73, v72); } ++v48; } while ( v48 < v52 ); if ( ++v36 == v53 ) { std::__vector_base::~__vector_base(v71); std::__vector_base::~__vector_base(v70); return std::__vector_base::~__vector_base((char **)&v67); } } } return std::__vector_base::~__vector_base((char **)&v67); } } } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source