// // HardStreak::updateStroke from 0x4564c8 to 0x456a20 (1368 bytes) // // 3 xrefs: // > PlayerObject::updateEffects @ 0x33d1d4 // > HardStreak::resumeStroke @ 0x456a38 // > HardStreak::firstSetup @ 0x456b4e // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void HardStreak::updateStroke(HardStreak *a1, float a2) { int v3; // r3 const cocos2d::CCPoint *v4; // r0 cocos2d::CCArray *m_pointArray; // r3 unsigned int v6; // r6 int v7; // r2 bool v8; // r3 cocos2d::ccArray *data; // r2 cocos2d::CCObject **arr; // r5 cocos2d::CCObject **v11; // r7 int v12; // r3 int v13; // t1 PlayerObject *v14; // r9 int v15; // r2 bool v16; // r3 int v17; // r0 cocos2d::CCPoint *v18; // r1 unsigned int i; // r7 int v20; // r2 bool v21; // r3 int v22; // r2 bool v23; // r3 int j; // r8 cocos2d::CCPoint *v25; // r0 float m_waveSize; // s15 float v27; // s15 float v28; // s16 cocos2d::CCPoint v29; // r2 float v30; // s17 float v31; // s15 double v32; // d9 float v33; // s14 float v34; // s16 unsigned int v35; // r0 unsigned int v36; // r8 float y; // s14 float v38; // s18 float v39; // s18 _BOOL4 v40; // r9 cocos2d::CCArray *v41; // r3 int v42; // r2 bool v43; // r3 cocos2d::ccArray *v44; // r2 cocos2d::CCObject **v45; // r5 cocos2d::CCObject **v46; // r4 int v47; // r7 int v48; // t1 cocos2d::CCPoint *v49; // r7 int v50; // r2 bool v51; // r3 float v52; // s15 cocos2d::CCPoint *v53; // r1 int v54; // r2 bool v55; // r3 cocos2d::CCPoint *v56; // r1 int v57; // r2 bool v58; // r3 cocos2d::CCPoint *v59; // r1 int v60; // r2 bool v61; // r3 cocos2d::CCPoint *v62; // r1 int v63; // r2 bool v64; // r3 const cocos2d::ccColor3B *v65; // r0 int r; // r11 int g; // r9 int b; // r8 GLubyte (__fastcall *getOpacity)(cocos2d::CCNodeRGBA *__hidden); // r3 float v70; // s15 cocos2d::CCPoint v71; // [sp+0h] [bp-A4h] int v72; // [sp+8h] [bp-9Ch] PlayerObject *p_m_currentPoint; // [sp+10h] [bp-94h] int v74; // [sp+18h] [bp-8Ch] cocos2d::CCPoint v75; // [sp+2Ch] [bp-78h] BYREF cocos2d::CCPoint v76; // [sp+34h] [bp-70h] BYREF cocos2d::CCPoint v77; // [sp+3Ch] [bp-68h] BYREF cocos2d::CCPoint v78; // [sp+44h] [bp-60h] BYREF cocos2d::CCPoint v79; // [sp+4Ch] [bp-58h] BYREF cocos2d::CCPoint v80; // [sp+54h] [bp-50h] BYREF cocos2d::CCPoint v81[2]; // [sp+5Ch] [bp-48h] BYREF cocos2d::CCPoint v82; // [sp+6Ch] [bp-38h] BYREF int v83; // [sp+74h] [bp-30h] int v84; // [sp+78h] [bp-2Ch] _BYTE v85[8]; // [sp+7Ch] [bp-28h] BYREF char v86; // [sp+84h] [bp-20h] BYREF char v87; // [sp+8Ch] [bp-18h] BYREF char v88; // [sp+94h] [bp-10h] BYREF if ( a1->m_drawStreak ) { cocos2d::CCDrawNode::clear(a1); if ( cocos2d::CCArray::count(a1->m_pointArray) ) { if ( ((int (__fastcall *)(HardStreak *))a1->getOpacity)(a1) ) { if ( a1->m_isSolid ) v3 = 1; else v3 = 2; v74 = v3; v4 = a1->getPosition(a1); cocos2d::CCPoint::CCPoint(&v75, v4); m_pointArray = a1->m_pointArray; if ( m_pointArray ) { data = m_pointArray->data; if ( data->num ) { arr = data->arr; v11 = &arr[data->num] + 0x3FFFFFFF; while ( arr <= v11 ) { v13 = (int)*arr++; v12 = v13; if ( !v13 ) break; v14 = (PlayerObject *)(v12 + 52); cocos2d::CCPoint::CCPoint(v81, (const cocos2d::CCPoint *)(v12 + 52)); cocos2d::CCPoint::operator-(&v82, v81, &v75); cocos2d::CCPoint::operator=(v14, COERCE_FLOAT(&v82), v15, v16); } } } p_m_currentPoint = (PlayerObject *)&a1->m_currentPoint; cocos2d::CCPoint::operator-(&v82, &a1->m_currentPoint, &v75); v6 = 0; cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_currentPoint, COERCE_FLOAT(&v82), v7, v8); do { for ( i = 0; i < cocos2d::CCArray::count(a1->m_pointArray); ++i ) { v17 = cocos2d::CCArray::objectAtIndex(a1->m_pointArray, i); cocos2d::CCPoint::CCPoint(&v76, (const cocos2d::CCPoint *)(v17 + 52)); if ( i >= cocos2d::CCArray::count(a1->m_pointArray) - 1 ) v18 = &a1->m_currentPoint; else v18 = (cocos2d::CCPoint *)(cocos2d::CCArray::objectAtIndex(a1->m_pointArray, i + 1) + 52); cocos2d::CCPoint::CCPoint(&v77, v18); if ( v76.x != v77.x || v76.y != v77.y ) { if ( a1->m_isFlipped ) { cocos2d::CCPoint::CCPoint(&v82, &v77); cocos2d::CCPoint::operator=((PlayerObject *)&v77, COERCE_FLOAT(&v76), v20, v21); cocos2d::CCPoint::operator=((PlayerObject *)&v76, COERCE_FLOAT(&v82), v22, v23); } for ( j = 0; j != 32; j += 8 ) { v25 = (cocos2d::CCPoint *)&v85[j]; cocos2d::CCPoint::CCPoint(v25); } m_waveSize = a1->m_waveSize; if ( v6 ) v27 = m_waveSize + m_waveSize; else v27 = m_waveSize * 6.0; v28 = v27 * a1->m_pulseSize; cocos2d::CCPoint::CCPoint(v81, &v76); cocos2d::CCPoint::CCPoint(&v82, &v77); LODWORD(v29.x) = v81; LODWORD(v29.y) = &v82; v71.x = v28; HardStreak::quadCornerOffset(&v78, a1, v29, v71, *(float *)&v72); v30 = fabsf(v78.x); v31 = asinh((float)(v30 / (float)(v28 * 0.5))); v32 = tanh(v31); v33 = v32 * v30; v34 = fabsf(v33); v35 = cocos2d::CCArray::count(a1->m_pointArray) - 1; if ( i < v35 ) v36 = 0; else v36 = __clz(v6); if ( i >= v35 ) v36 >>= 5; if ( a1->m_isFlipped ) { v36 = 0; } else if ( v36 && fabsf(cocos2d::ccpDistance(&v76, &v77)) > 10.0 ) { y = v77.y; v38 = v32 * 4.0; v39 = fabsf(v38); if ( a1->m_isFlipped ) { if ( v76.y >= v77.y ) v52 = v76.y - v39; else v52 = v76.y + v39; v76.x = v76.x + 4.0; v76.y = v52; } else { if ( v76.y < v77.y ) y = v77.y - v39; v77.x = v77.x - 4.0; if ( v76.y >= v77.y ) y = y + v39; v77.y = y; } } cocos2d::CCPoint::CCPoint(&v79, &v76); cocos2d::CCPoint::CCPoint(&v80, &v77); v79.x = v79.x - v30; v80.x = v80.x + v30; if ( v6 ) { v76.x = v76.x + v30; v77.x = v77.x - v30; } v40 = v79.y < v80.y; if ( v79.y >= v80.y ) { v79.y = v79.y + v34; v80.y = v80.y - v34; if ( v6 ) { v76.y = v76.y - v34; v77.y = v77.y + v34; } v53 = &v76; } else { v79.y = v79.y - v34; v80.y = v80.y + v34; if ( v6 ) { v76.y = v76.y + v34; v77.y = v77.y - v34; } v53 = &v79; } cocos2d::CCPoint::operator-(&v82, v53, &v78); cocos2d::CCPoint::operator=((PlayerObject *)v85, COERCE_FLOAT(&v82), v54, v55); if ( v40 ) v56 = &v76; else v56 = &v79; cocos2d::CCPoint::operator+(&v82, v56, &v78); cocos2d::CCPoint::operator=((PlayerObject *)&v86, COERCE_FLOAT(&v82), v57, v58); if ( !v40 || v36 ) v59 = &v77; else v59 = &v80; cocos2d::CCPoint::operator+(&v82, v59, &v78); cocos2d::CCPoint::operator=((PlayerObject *)&v87, COERCE_FLOAT(&v82), v60, v61); if ( v40 || v36 ) v62 = &v77; else v62 = &v80; cocos2d::CCPoint::operator-(&v82, v62, &v78); cocos2d::CCPoint::operator=((PlayerObject *)&v88, COERCE_FLOAT(&v82), v63, v64); if ( v6 ) v65 = (const cocos2d::ccColor3B *)&unk_9AB81C; else v65 = a1->getColor(a1); r = v65->r; g = v65->g; b = v65->b; memset(v81, 0, sizeof(v81)); v81[1].y = 1.0; getOpacity = a1->getOpacity; v81[0].x = (float)r / 255.0; v81[0].y = (float)g / 255.0; v81[1].x = (float)b / 255.0; if ( v6 ) v70 = (float)((float)((int (__fastcall *)(HardStreak *))getOpacity)(a1) / 255.0) * 0.65; else v70 = (float)((int (__fastcall *)(HardStreak *))getOpacity)(a1) / 255.0; v82.x = 0.0; v82.y = 0.0; v83 = 0; v84 = 0; v81[1].y = v70; cocos2d::CCDrawNode::drawPolygon((int)a1, (int)v85, 4, (int)v81, 0.0, (int)&v82, 0); } } ++v6; } while ( v6 != v74 ); v41 = a1->m_pointArray; if ( v41 ) { v44 = v41->data; if ( v44->num ) { v45 = v44->arr; v46 = &v45[v44->num] + 0x3FFFFFFF; while ( v45 <= v46 ) { v48 = (int)*v45++; v47 = v48; if ( !v48 ) break; v49 = (cocos2d::CCPoint *)(v47 + 52); cocos2d::CCPoint::CCPoint(v81, v49); cocos2d::CCPoint::operator+(&v82, v81, &v75); cocos2d::CCPoint::operator=((PlayerObject *)v49, COERCE_FLOAT(&v82), v50, v51); } } } cocos2d::CCPoint::operator+(&v82, p_m_currentPoint, &v75); cocos2d::CCPoint::operator=(p_m_currentPoint, COERCE_FLOAT(&v82), v42, v43); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source