// // HardStreak::updateStroke from 0x1402b8ef0 to 0x1402b97f8 (2312 bytes) // // 15 xrefs: // > GJBaseGameLayer::update @ 0x140238fc3 // > GJBaseGameLayer::update @ 0x140238fd9 // > GJBaseGameLayer::update @ 0x14023928b // > GJBaseGameLayer::update @ 0x1402392a1 // > HardStreak::init @ 0x1402b8e78 // > MenuGameLayer::update @ 0x1403326d1 // > MenuGameLayer::resetPlayer @ 0x140333338 // > PlayerObject::createFadeOutDartStreak @ 0x1403987f2 // > PlayerObject::activateStreak @ 0x1403a0182 // > HardStreak::stopStroke @ 0x1402b8eb6 // > MenuGameLayer::init @ 0x140331ae1 // > PlayerObject::createFadeOutDartStreak @ 0x1403987f7 // > @ 0x14068bfa0 // > @ 0x14068c030 // > @ 0x1406d26a8 // // 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) { cocos2d::CCRGBAProtocol *v3; // r15 cocos2d::CCArray *m_pointArray; // rdi cocos2d::ccArray *data; // rdi __int64 num; // rax cocos2d::CCObject **arr; // rdi cocos2d::CCObject **i; // rsi cocos2d::CCObject *v9; // rbx int v10; // esi unsigned int v11; // edi unsigned int v12; // r12d float m_waveSize; // xmm8_4 float v14; // xmm8_4 float v15; // xmm8_4 float *v16; // rax float *v17; // rbx float *v18; // rax float v19; // xmm8_4 double v20; // xmm1_8 float v21; // xmm6_4 float v22; // xmm0_4 float v23; // xmm7_4 float v24; // xmm8_4 float v25; // xmm6_4 const struct cocos2d::CCPoint *v26; // r8 bool m_isFlipped; // al bool v28; // di float v29; // xmm3_4 float v30; // xmm2_4 float v31; // xmm1_4 bool v32; // bl float v33; // xmm0_4 float v34; // xmm1_4 cocos2d::CCPoint *v35; // rcx cocos2d::CCPoint *v36; // rcx cocos2d::CCPoint *v37; // rcx const cocos2d::ccColor3B *v38; // rcx int b; // eax GLubyte (__fastcall *getOpacity)(cocos2d::CCRGBAProtocol *__hidden); // rdx float v41; // xmm0_4 cocos2d::CCArray *v42; // rax cocos2d::ccArray *v43; // rdi __int64 v44; // rax cocos2d::CCObject **v45; // rdi cocos2d::CCObject **j; // rsi cocos2d::CCObject *v47; // rbx cocos2d::CCPoint v48; // [rsp+40h] [rbp-C0h] BYREF cocos2d::CCPoint v49; // [rsp+48h] [rbp-B8h] BYREF cocos2d::CCPoint v50; // [rsp+50h] [rbp-B0h] BYREF cocos2d::CCPoint v51; // [rsp+58h] [rbp-A8h] BYREF cocos2d::CCPoint v52; // [rsp+60h] [rbp-A0h] BYREF cocos2d::CCPoint v53; // [rsp+68h] [rbp-98h] BYREF cocos2d::CCPoint v54[2]; // [rsp+70h] [rbp-90h] BYREF __int16 v55; // [rsp+80h] [rbp-80h] cocos2d::CCPoint v56; // [rsp+90h] [rbp-70h] BYREF int v57; // [rsp+98h] [rbp-68h] char v58[8]; // [rsp+A0h] [rbp-60h] BYREF cocos2d::CCPoint v59; // [rsp+A8h] [rbp-58h] BYREF cocos2d::CCPoint v60; // [rsp+B0h] [rbp-50h] BYREF char v61[8]; // [rsp+B8h] [rbp-48h] BYREF cocos2d::CCPoint v62; // [rsp+C0h] [rbp-40h] BYREF cocos2d::CCPoint v63; // [rsp+C8h] [rbp-38h] BYREF cocos2d::CCPoint v64; // [rsp+D0h] [rbp-30h] BYREF float v65[3]; // [rsp+D8h] [rbp-28h] BYREF int v66; // [rsp+E4h] [rbp-1Ch] __int128 v67; // [rsp+E8h] [rbp-18h] BYREF cocos2d::CCPoint v68; // [rsp+F8h] [rbp-8h] BYREF cocos2d::CCPoint v69; // [rsp+100h] [rbp+0h] BYREF cocos2d::CCPoint v70; // [rsp+108h] [rbp+8h] BYREF cocos2d::CCPoint v71; // [rsp+110h] [rbp+10h] BYREF if ( !a1->m_drawStreak ) return; cocos2d::CCDrawNode::clear(a1); if ( !cocos2d::CCArray::count(a1->m_pointArray) ) return; v3 = &a1->cocos2d::CCRGBAProtocol; if ( !a1->getOpacity(&a1->cocos2d::CCRGBAProtocol) ) return; v57 = 2 - a1->m_isSolid; a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint(&v56); m_pointArray = a1->m_pointArray; if ( m_pointArray ) { data = m_pointArray->data; num = data->num; if ( (_DWORD)num ) { arr = data->arr; for ( i = &arr[num - 1]; arr <= i; ++arr ) { v9 = *arr; if ( !*arr ) break; cocos2d::CCPoint::CCPoint(&v53); cocos2d::CCPoint::operator-(&v53, &v50, &v56); cocos2d::CCPoint::operator=(&v9[1], &v50); } } } cocos2d::CCPoint::operator-(&a1->m_currentPoint, &v53, &v56); cocos2d::CCPoint::operator=(&a1->m_currentPoint, &v53); v10 = 0; do { v11 = 0; if ( cocos2d::CCArray::count(a1->m_pointArray) ) { while ( 1 ) { cocos2d::CCArray::objectAtIndex(a1->m_pointArray, v11); cocos2d::CCPoint::CCPoint(&v48); v12 = v11 + 1; if ( v11 >= cocos2d::CCArray::count(a1->m_pointArray) - 1 ) { cocos2d::CCPoint::CCPoint(&v62); } else { cocos2d::CCArray::objectAtIndex(a1->m_pointArray, v12); cocos2d::CCPoint::CCPoint(&v59); } cocos2d::CCPoint::CCPoint(&v49); if ( v48.x != v49.x || v48.y != v49.y ) break; LABEL_66: v11 = v12; if ( v12 >= cocos2d::CCArray::count(a1->m_pointArray) ) goto LABEL_67; } if ( a1->m_isFlipped ) { cocos2d::CCPoint::CCPoint(&v60); cocos2d::CCPoint::operator=(&v49, &v48); cocos2d::CCPoint::operator=(&v48, &v60); } cocos2d::CCPoint::CCPoint(&v68); cocos2d::CCPoint::CCPoint(&v69); cocos2d::CCPoint::CCPoint(&v70); cocos2d::CCPoint::CCPoint(&v71); m_waveSize = a1->m_waveSize; if ( v10 ) v14 = m_waveSize + m_waveSize; else v14 = m_waveSize * 6.0; v15 = v14 * a1->m_pulseSize; cocos2d::CCPoint::CCPoint(&v63); v17 = v16; cocos2d::CCPoint::CCPoint(&v64); if ( v15 >= 1.0 ) { v19 = v15 * 0.5; v20 = atan2f(v17[1] - v18[1], *v17 - *v18) * 180.0 / 3.141592653589793 + 90.0; if ( v20 <= 360.0 ) { if ( v20 < 0.0 ) v20 = v20 + 360.0; } else { v20 = v20 - 360.0; } v21 = v20 * 3.141592653589793 / 180.0; sinf(v21); v22 = cosf(v21); cocos2d::CCPoint::CCPoint(v22 * v19, v22 * v19); } else { cocos2d::CCPoint::CCPoint(&v50); v19 = v15 * 0.5; } v23 = fabs(v50.x); v24 = asinhf(v23 / v19); v25 = fabs(tanhf(v24) * v23); if ( v11 < cocos2d::CCArray::count(a1->m_pointArray) - 1 || v10 ) { v28 = 0; } else { m_isFlipped = a1->m_isFlipped; v28 = !m_isFlipped; if ( !m_isFlipped && fabs(cocos2d::ccpDistance((cocos2d *)&v48, &v49, v26)) > 10.0 ) { v29 = fabs(tanhf(v24) * 4.0); if ( a1->m_isFlipped ) { v48.x = v48.x + 4.0; if ( v49.y <= v48.y ) v31 = v48.y - v29; else v31 = v48.y + v29; v48.y = v31; } else { v49.x = v49.x + -4.0; if ( v49.y <= v48.y ) v30 = v49.y + v29; else v30 = v49.y - v29; v49.y = v30; } } } cocos2d::CCPoint::CCPoint(&v51); cocos2d::CCPoint::CCPoint(&v52); v51.x = v51.x - v23; v52.x = v52.x + v23; if ( v10 ) { v48.x = v48.x + v23; v49.x = v49.x - v23; } v32 = v52.y > v51.y; if ( v52.y <= v51.y ) { v51.y = v51.y + v25; v52.y = v52.y - v25; if ( !v10 ) goto LABEL_50; v33 = v48.y - v25; v34 = v49.y + v25; } else { v51.y = v51.y - v25; v52.y = v52.y + v25; if ( !v10 ) goto LABEL_50; v33 = v48.y + v25; v34 = v49.y - v25; } v49.y = v34; v48.y = v33; LABEL_50: v35 = &v51; if ( !v32 ) v35 = &v48; cocos2d::CCPoint::operator-(v35, v61, &v50); cocos2d::CCPoint::operator=(&v68, v61); v36 = &v48; if ( !v32 ) v36 = &v51; cocos2d::CCPoint::operator+(v36, v58); cocos2d::CCPoint::operator=(&v69, v58); if ( !v32 || v28 ) { cocos2d::CCPoint::operator+(&v49, &v53); cocos2d::CCPoint::operator=(&v70, &v53); if ( !v32 ) { v37 = &v52; if ( !v28 ) { LABEL_60: cocos2d::CCPoint::operator-(v37, v54, &v50); cocos2d::CCPoint::operator=(&v71, v54); if ( v10 ) v38 = (const cocos2d::ccColor3B *)&unk_140529AFC; else v38 = v3->getColor(&a1->cocos2d::CCRGBAProtocol); v55 = *(_WORD *)&v38->r; b = v38->b; v66 = 1065353216; getOpacity = v3->getOpacity; v65[2] = (float)b / 255.0; v65[0] = (float)(unsigned __int8)v55 / 255.0; v65[1] = (float)HIBYTE(v55) / 255.0; v41 = (float)getOpacity(&a1->cocos2d::CCRGBAProtocol) / 255.0; if ( v10 ) v41 = v41 * 0.64999998; v66 = LODWORD(v41); v67 = 0; cocos2d::CCDrawNode::drawPolygon(a1, &v68, 4, v65, 0, &v67, 0); goto LABEL_66; } } } else { cocos2d::CCPoint::operator+(&v52, &v53); cocos2d::CCPoint::operator=(&v70, &v53); } v37 = &v49; goto LABEL_60; } LABEL_67: ++v10; } while ( v10 < v57 ); v42 = a1->m_pointArray; if ( v42 ) { v43 = v42->data; v44 = v43->num; if ( (_DWORD)v44 ) { v45 = v43->arr; for ( j = &v45[v44 - 1]; v45 <= j; ++v45 ) { v47 = *v45; if ( !*v45 ) break; cocos2d::CCPoint::CCPoint(v54); cocos2d::CCPoint::operator+(v54, v58); cocos2d::CCPoint::operator=(&v47[1], v58); } } } cocos2d::CCPoint::operator+(&a1->m_currentPoint, v54); cocos2d::CCPoint::operator=(&a1->m_currentPoint, v54); }
GD Web Decomp Icon

GD Web Decomp

Raw Source