// // sub_AD91B8 from 0xad91b8 to 0xad9758 (1440 bytes) // // 1 xrefs: // > cocos2d::CCDrawNode::drawSegmentEx @ 0xad9c34 // // 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 // __int64 __fastcall sub_AD91B8( cocos2d::CCDrawNode *a1, float *a2, float *a3, float *a4, unsigned __int8 a5, unsigned __int8 a6, float a7) { int v9; // w21 int v11; // w23 float v12; // s11 float v13; // s12 float v14; // s9 float v15; // s10 cocos2d::ccV2F_C4B_T2F *m_pBuffer; // x7 float v17; // s3 float v18; // s1 float v19; // s24 cocos2d::ccV2F_C4B_T2F *v20; // x0 float v21; // s22 float v22; // s5 float v23; // s16 float v24; // s19 float v25; // s21 float v26; // s17 float v27; // s5 float v28; // s8 float v29; // s25 float v30; // s23 float v31; // s20 float v32; // s4 float v33; // s6 __int64 v34; // x6 __int64 v35; // x4 __int64 v36; // x9 int v37; // w8 cocos2d::ccV2F_C4B_T2F *v38; // x2 cocos2d::ccV2F_C4B_T2F *v39; // x1 unsigned int v40; // w10 unsigned int v41; // w7 unsigned int v42; // w5 unsigned int v43; // w11 float v44; // s18 float v45; // s7 float v46; // s10 unsigned int v47; // w9 __int64 v48; // x7 float v49; // s22 __int64 v50; // x1 cocos2d::ccV2F_C4B_T2F *v51; // x2 unsigned int v52; // w6 unsigned int v53; // w5 char v54; // w10 GLfloat v55; // s19 char v56; // w9 float v57; // s9 GLsizei m_nBufferCount; // w1 GLfloat v60; // s29 unsigned int v61; // w5 unsigned int v62; // w2 GLfloat v63; // s28 GLubyte v64; // w11 GLfloat v65; // s10 GLubyte v66; // w10 float v67; // s29 float v68; // s27 float v69; // s18 float v70; // s9 GLubyte v71; // w1 GLubyte v72; // w7 float v75; // [xsp+88h] [xbp+88h] float v76; // [xsp+8Ch] [xbp+8Ch] cocos2d::CCPoint v77; // [xsp+90h] [xbp+90h] BYREF v9 = a5; v11 = a6; cocos2d::CCDrawNode::ensureCapacity(a1, 0x12u); v12 = a2[1]; v13 = *a2; v14 = a3[1]; v15 = *a3; cocos2d::CCPoint::CCPoint(&v77, -(float)(v14 - v12), *a3 - *a2); cocos2d::ccpNormalize(&v77); m_pBuffer = a1->m_pBuffer; v17 = -v76; v18 = a7 * v76; v19 = v15 - (float)(a7 * v75); v20 = &m_pBuffer[a1->m_nBufferCount]; v21 = v15 + (float)(a7 * v75); v22 = (float)-v76 * a7; v23 = (float)(a7 * v76) + (float)(a7 * v75); v24 = (float)(a7 * v76) - (float)(a7 * v75); v25 = v13 - (float)(a7 * v75); v26 = v22 + (float)(a7 * v75); v27 = -(float)(v22 - (float)(a7 * v75)); v28 = v13 + (float)(a7 * v75); v29 = v14 - v18; v30 = v14 + v18; v31 = v12 - v18; v32 = v12 + v18; if ( v11 ) { v34 = 9; v35 = 4; v36 = 6; v37 = 2; v60 = v15 - v26; v61 = (unsigned int)(float)(a4[2] * 255.0); v62 = (unsigned int)(float)(a4[3] * 255.0); v63 = v14 + v24; v64 = (unsigned int)(float)(*a4 * 255.0); v65 = v15 + v27; v66 = (unsigned int)(float)(a4[1] * 255.0); v33 = -v75; m_pBuffer[a1->m_nBufferCount].vertices.x = v60; v20->colors.b = v61; v20->colors.a = v62; v20[1].colors.b = v61; v20[1].colors.a = v62; v20[2].colors.b = v61; v20[2].colors.a = v62; v20->colors.r = v64; v20->colors.g = v66; v20[1].colors.r = v64; v20[1].colors.g = v66; v20[2].colors.r = v64; v20[2].colors.g = v66; v20->vertices.y = v14 - v23; v20->texCoords.u = -(float)(v75 - v76); v20->texCoords.v = -(float)(v75 + v76); v20[1].vertices.x = v65; v20[1].vertices.y = v14 + v24; v20[1].texCoords.u = v75 + v76; v20[1].texCoords.v = v76 - v75; v20[2].vertices.x = v19; v20[2].vertices.y = v29; v20[2].texCoords.u = -v75; v20[2].texCoords.v = v17; v67 = *a4 * 255.0; v68 = a4[1] * 255.0; v69 = a4[2] * 255.0; v70 = a4[3] * 255.0; v20[3].vertices.x = v21; LOBYTE(v61) = (unsigned int)v67; LOBYTE(v62) = (unsigned int)v68; v20[3].colors.r = v61; v71 = (unsigned int)v69; v20[3].colors.g = v62; v72 = (unsigned int)v70; v20[3].colors.b = v71; v20[3].colors.a = v72; v20[4].colors.r = v61; v20[4].colors.g = v62; v20[4].colors.b = v71; v20[4].colors.a = v72; v20[5].colors.r = v61; v20[5].colors.g = v62; v20[5].colors.b = v71; v20[5].colors.a = v72; v20[3].vertices.y = v30; v20[3].texCoords.u = v75; v20[3].texCoords.v = v76; v20[4].vertices.x = v65; v20[4].vertices.y = v63; v20[4].texCoords.u = v75 + v76; v20[4].texCoords.v = v76 - v75; v20[5].vertices.x = v19; v20[5].vertices.y = v29; v20[5].texCoords.u = -v75; v20[5].texCoords.v = v17; } else { v33 = -v75; v34 = 3; v35 = 2; v36 = 0; v37 = 0; } v38 = &v20[v36]; v39 = &v20[v34]; v40 = (unsigned int)(float)(*a4 * 255.0); v41 = (unsigned int)(float)(a4[1] * 255.0); v42 = (unsigned int)(float)(a4[2] * 255.0); v43 = (unsigned int)(float)(a4[3] * 255.0); v20[v36].vertices.x = v21; v38->colors.r = v40; v38->colors.g = v41; v38[1].colors.r = v40; v38->colors.b = v42; v38[1].colors.g = v41; v38[1].colors.b = v42; v38[2].colors.r = v40; v38[2].colors.g = v41; v38[2].colors.b = v42; v38->colors.a = v43; v38[1].colors.a = v43; v38[2].colors.a = v43; v38->vertices.y = v30; v38->texCoords.u = v75; v38->texCoords.v = v76; v38[1].vertices.x = v25; v38[1].vertices.y = v31; v38[1].texCoords.u = v33; v38[1].texCoords.v = v17; v38[2].vertices.x = v19; v38[2].vertices.y = v29; v38[2].texCoords.u = v33; v38[2].texCoords.v = v17; v44 = *a4 * 255.0; v45 = a4[2] * 255.0; v46 = a4[3] * 255.0; v47 = (unsigned int)(float)(a4[1] * 255.0); v20[v34].vertices.x = v21; LOBYTE(v41) = (unsigned int)v44; v39->vertices.y = v30; LOBYTE(v42) = (unsigned int)v45; v39->colors.r = v41; LOBYTE(v38) = (unsigned int)v46; v39->colors.g = v47; v39->colors.b = v42; v39->colors.a = (unsigned __int8)v38; v39[1].colors.r = v41; v39[1].colors.g = v47; v39[1].colors.b = v42; v39[1].colors.a = (unsigned __int8)v38; v39[2].colors.r = v41; v39[2].colors.g = v47; v39[2].colors.b = v42; v39[2].colors.a = (unsigned __int8)v38; v39->texCoords.u = v75; v39->texCoords.v = v76; v39[1].vertices.x = v25; v39[1].vertices.y = v31; v39[1].texCoords.u = v33; v39[1].texCoords.v = v17; v39[2].vertices.x = v28; v39[2].vertices.y = v32; v39[2].texCoords.u = v75; v39[2].texCoords.v = v76; if ( v9 ) { v48 = 60 * v35; LODWORD(v35) = v37 + 4; v49 = *a4 * 255.0; v50 = (__int64)v20 + v48; v51 = &v20[3 * v37 + 9]; v52 = (unsigned int)(float)(a4[2] * 255.0); v53 = (unsigned int)(float)(a4[3] * 255.0); v54 = (unsigned int)(float)(a4[1] * 255.0); v55 = v12 - v24; *(float *)((char *)&v20->vertices.x + v48) = v13 - v27; v56 = (unsigned int)v49; *(_BYTE *)(v50 + 10) = v52; *(_BYTE *)(v50 + 11) = v53; *(_BYTE *)(v50 + 30) = v52; *(_BYTE *)(v50 + 31) = v53; *(_BYTE *)(v50 + 50) = v52; *(_BYTE *)(v50 + 51) = v53; *(_BYTE *)(v50 + 8) = v56; *(_BYTE *)(v50 + 9) = v54; *(_BYTE *)(v50 + 28) = v56; *(_BYTE *)(v50 + 29) = v54; *(_BYTE *)(v50 + 48) = v56; *(_BYTE *)(v50 + 49) = v54; *(GLfloat *)(v50 + 4) = v55; *(float *)(v50 + 12) = v17 - v75; *(float *)(v50 + 16) = v75 - v76; *(float *)(v50 + 20) = v25; *(float *)(v50 + 24) = v31; *(float *)(v50 + 32) = v33; *(float *)(v50 + 36) = v17; *(float *)(v50 + 40) = v28; *(float *)(v50 + 44) = v32; *(float *)(v50 + 52) = v75; *(float *)(v50 + 56) = v76; v57 = a4[2] * 255.0; LOBYTE(v48) = (unsigned int)(float)(*a4 * 255.0); LOBYTE(v53) = (unsigned int)(float)(a4[3] * 255.0); LOBYTE(v50) = (unsigned int)(float)(a4[1] * 255.0); v51->vertices.x = v13 - v27; LOBYTE(v52) = (unsigned int)v57; v51->vertices.y = v55; v51->colors.r = v48; v51->colors.g = v50; v51->colors.b = v52; v51->colors.a = v53; v51[1].colors.r = v48; v51[1].colors.g = v50; v51[1].colors.b = v52; v51[1].colors.a = v53; v51[2].colors.r = v48; v51[2].colors.g = v50; v51[2].colors.b = v52; v51[2].colors.a = v53; v51->texCoords.u = v17 - v75; v51->texCoords.v = v75 - v76; v51[1].vertices.x = v13 + v26; v51[1].vertices.y = v12 + v23; v51[1].texCoords.u = v75 - v76; v51[1].texCoords.v = v75 + v76; v51[2].vertices.x = v28; v51[2].vertices.y = v32; v51[2].texCoords.u = v75; v51[2].texCoords.v = v76; } m_nBufferCount = a1->m_nBufferCount; a1->m_bDirty = 1; a1->m_nBufferCount = m_nBufferCount + 3 * v35; return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source