// // cocos2d::ccVertexLineToPolygon from 0x10047f924 to 0x10047fc08 (740 bytes) // // 2 xrefs: // > cocos2d::CCMotionStreak::update @ 0x100208a5c // > cocos2d::CCMotionStreak::update @ 0x100208a88 // // 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 11:05:46 +0000 // void __fastcall cocos2d::ccVertexLineToPolygon(float32x2_t *a1, __int64 a2, unsigned int a3, int a4, float a5) { float32x2_t v5; // x29 float32x2_t v6; // x30 float32x2_t v7; // d8 float32x2_t v8; // d9 float32x2_t v9; // d10 float32x2_t v10; // d11 float32x2_t v11; // d12 float32x2_t v12; // d13 __int64 v13; // x8 __int64 v16; // x23 float v18; // s8 __int64 v19; // x22 __int64 v20; // x25 __int64 v21; // x26 unsigned int v22; // w27 __int64 v23; // x28 double v24; // d0 double v25; // d0 float v26; // s0 int32x2_t v27; // d0 double v28; // d0 float32x2_t *v29; // x0 float32x2_t *v30; // x1 double v31; // d0 float32x2_t v32; // kr00_8 int32x2_t v33; // d0 double v34; // d0 float32x2_t v35; // d0 float32x2_t v36; // d1 unsigned int v37; // w8 unsigned int v38; // w20 __int64 v39; // x21 float *v40; // x22 float v41; // s8 float v42; // s9 float *v43; // x23 float v44; // s10 float v45; // s11 bool v46; // cc int v47; // [xsp+4h] [xbp-DCh] float32x2_t v48; // [xsp+8h] [xbp-D8h] BYREF float32x2_t v49; // [xsp+10h] [xbp-D0h] BYREF float32x2_t v50; // [xsp+18h] [xbp-C8h] BYREF float32x2_t v51; // [xsp+20h] [xbp-C0h] BYREF float32x2_t v52; // [xsp+28h] [xbp-B8h] BYREF float32x2_t v53; // [xsp+30h] [xbp-B0h] BYREF float32x2_t v54; // [xsp+38h] [xbp-A8h] BYREF float32x2_t v55; // [xsp+40h] [xbp-A0h] BYREF float32x2_t v56[19]; // [xsp+48h] [xbp-98h] BYREF v13 = a4 + a3; if ( (unsigned int)v13 >= 2 ) { v56[1] = v12; v56[2] = v11; v56[3] = v10; v56[4] = v9; v56[5] = v8; v56[6] = v7; v56[17] = v5; v56[18] = v6; v16 = (unsigned int)(v13 - 1); v47 = 2 * a3; if ( (unsigned int)v13 > a3 ) { v18 = a5 * 0.5; v19 = (__int64)&a1[(unsigned int)v16 - 1]; v20 = a3; v21 = v16 - a3; v22 = 2 * a3; v23 = v13 - a3; while ( 1 ) { sub_1000262F4(&v55, (double *)&a1[v20]); sub_1000262EC(&v54); if ( !(v20 * 8) ) break; if ( !v21 ) { v30 = &v55; v29 = (float32x2_t *)v19; goto LABEL_10; } sub_1000262F4(&v53, (double *)&a1[v20 + 1]); sub_1000262F4(&v52, (double *)&a1[v20 - 1]); *(float32x2_t *)&v24 = sub_10002632C(&v53, &v55, v56); cocos2d::ccpNormalize(v56, &v51, v24); *(float32x2_t *)&v25 = sub_10002632C(&v52, &v55, v56); cocos2d::ccpNormalize(v56, &v50, v25); v26 = acosf((float)(v51.f32[1] * v50.f32[1]) + (float)(v51.f32[0] * v50.f32[0])); if ( v26 < 1.2217 ) { *(float *)&v27.i32[1] = sub_100026318(&v51, &v50, v56).f32[1]; v27.i32[0] = 2.0; *(float32x2_t *)&v28 = sub_100026360(v56, &v48, v27); goto LABEL_14; } if ( v26 >= 2.9671 ) { *(float32x2_t *)&v28 = sub_10002632C(&v53, &v52, &v48); LABEL_14: cocos2d::ccpNormalize(&v48, &v49, v28); v32 = v49; LABEL_15: sub_1000262BC((float *)v56, -v32.f32[1], v32.f32[0]); goto LABEL_16; } *(float *)&v33.i32[1] = sub_100026318(&v51, &v50, v56).f32[1]; v33.i32[0] = 2.0; *(float32x2_t *)&v34 = sub_100026360(v56, &v49, v33); cocos2d::ccpNormalize(&v49, v56, v34); LABEL_16: sub_10002630C(&v54, (double *)v56); sub_100026350(&v54, v56, v18); sub_10002630C(&v54, (double *)v56); v36 = v54; v35 = v55; *(float32x2_t *)(a2 + 8LL * v22) = vadd_f32(v55, v54); *(float32x2_t *)(a2 + 8LL * (v22 + 1)) = vsub_f32(v35, v36); ++v20; --v21; v22 += 2; if ( !--v23 ) goto LABEL_17; } v29 = &v55; v30 = a1 + 1; LABEL_10: *(float32x2_t *)&v31 = sub_10002632C(v29, v30, &v52); cocos2d::ccpNormalize(&v52, &v53, v31); v32 = v53; goto LABEL_15; } LABEL_17: v37 = a3 - 1; if ( !a3 ) v37 = 0; if ( v37 < (unsigned int)v16 ) { v38 = v47 - 2 * (a3 != 0); v39 = v16 - v37; do { v40 = (float *)(a2 + 8LL * (v38 + 2)); v41 = *v40; v42 = v40[1]; v43 = (float *)(a2 + 8LL * (v38 + 3)); v44 = *v43; v45 = v43[1]; if ( !(unsigned int)cocos2d::ccVertexLineIntersect( v56, *(float *)(a2 + 8LL * v38), *(float *)(a2 + 8LL * v38 + 4), *v43, v45, *(float *)(a2 + 8LL * (v38 + 1)), *(float *)(a2 + 8LL * (v38 + 1) + 4), *v40, v42) || (v56[0].f32[0] >= 0.0 ? (v46 = v56[0].f32[0] <= 1.0) : (v46 = 0), !v46) ) { *v40 = v44; v40[1] = v45; *v43 = v41; v43[1] = v42; } v38 += 2; --v39; } while ( v39 ); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source