// // cocos2d::CCLabelAtlas::updateAtlasValues from 0xae15d0 to 0xae1830 (608 bytes) // // 2 xrefs: // > @ 0x4cde8 // > @ 0x1201ce0 // // 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 cocos2d::CCLabelAtlas::updateAtlasValues(cocos2d::CCLabelAtlas *a1) { stl::StringData::Internal *m_data; // x24 __int64 v3; // x19 cocos2d::CCTexture2D *v4; // x22 float v5; // s11 unsigned int v6; // w0 unsigned int m_uItemWidth; // w23 float v8; // s10 cocos2d::CCDirector *v9; // x0 float ContentScaleFactor; // s0 unsigned int m_uItemHeight; // w22 float v12; // s9 cocos2d::CCDirector *v13; // x0 float v14; // s0 float v15; // s9 float v16; // s8 cocos2d::ccV3F_C4B_T2F_Quad *v17; // x0 float v18; // s7 stl::StringData::Internal *v19; // x8 int v20; // w7 char v21; // t1 unsigned int m_uItemsPerRow; // w1 unsigned int v23; // w3 unsigned int v24; // w4 unsigned int v25; // w5 GLfloat v26; // s3 GLfloat v27; // s6 GLfloat v28; // s2 GLfloat v29; // s1 GLfloat v30; // s3 GLubyte b; // w2 cocos2d::CCTextureAtlas *m_pTextureAtlas; // x0 cocos2d::CCTextureAtlas_vtbl *v33; // x2 unsigned int v34; // w1 m_data = a1->m_sString.m_data.m_data; v3 = *((_QWORD *)m_data - 3); v4 = a1->m_pTextureAtlas->getTexture(a1->m_pTextureAtlas); v5 = (float)v4->getPixelsWide(v4); v6 = v4->getPixelsHigh(v4); m_uItemWidth = a1->m_uItemWidth; v8 = (float)v6; v9 = cocos2d::CCDirector::sharedDirector(); ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v9); m_uItemHeight = a1->m_uItemHeight; v12 = ContentScaleFactor; v13 = cocos2d::CCDirector::sharedDirector(); v14 = cocos2d::CCDirector::getContentScaleFactor(v13); if ( a1->m_bIgnoreContentScaleFactor ) { v15 = (float)a1->m_uItemWidth; v16 = (float)a1->m_uItemHeight; } else { v15 = (float)m_uItemWidth * v12; v16 = (float)m_uItemHeight * v14; } a1->m_pTextureAtlas->getCapacity(a1->m_pTextureAtlas); v17 = a1->m_pTextureAtlas->getQuads(a1->m_pTextureAtlas); if ( (_DWORD)v3 ) { v18 = v15 / v5; v19 = m_data; v20 = 0; do { v21 = *(_BYTE *)v19; v19 = (stl::StringData::Internal *)((char *)v19 + 1); ++v17; m_uItemsPerRow = a1->m_uItemsPerRow; v23 = a1->m_uItemWidth; v24 = (unsigned __int8)(v21 - a1->m_uMapStartChar); v25 = v20 * v23; ++v20; v26 = (float)(v25 + v23); v27 = (float)a1->m_uItemHeight; v17[-1].bl.vertices.y = 0.0; v17[-1].bl.vertices.x = (float)v25; v17[-1].br.vertices.x = v26; v17[-1].tr.vertices.x = v26; v17[-1].bl.vertices.z = 0.0; v17[-1].br.vertices.y = 0.0; v17[-1].br.vertices.z = 0.0; v28 = (float)((float)(int)(v24 / m_uItemsPerRow) * v16) / v8; v17[-1].tl.vertices.x = (float)v25; v17[-1].tl.vertices.y = v27; v17[-1].tl.vertices.z = 0.0; v17[-1].tr.vertices.y = v27; v29 = (float)((float)(v24 % m_uItemsPerRow) * v15) / v5; v17[-1].tr.vertices.z = 0.0; v17[-1].tl.texCoords.v = v28; v17[-1].tr.texCoords.v = v28; v30 = v28 + (float)(v16 / v8); v17[-1].bl.texCoords.v = v30; v17[-1].tl.texCoords.u = v29; v17[-1].bl.texCoords.u = v29; v17[-1].br.texCoords.v = v30; v17[-1].tr.texCoords.u = v29 + v18; v17[-1].br.texCoords.u = v29 + v18; LOBYTE(v23) = a1->_displayedColor.g; b = a1->_displayedColor.b; LOBYTE(m_uItemsPerRow) = a1->_displayedOpacity; LOBYTE(v24) = a1->_displayedColor.r; v17[-1].tl.colors.r = v24; v17[-1].tl.colors.g = v23; v17[-1].tl.colors.b = b; v17[-1].tl.colors.a = m_uItemsPerRow; v17[-1].tr.colors.r = v24; v17[-1].tr.colors.g = v23; v17[-1].tr.colors.b = b; v17[-1].tr.colors.a = m_uItemsPerRow; v17[-1].bl.colors.r = v24; v17[-1].bl.colors.g = v23; v17[-1].bl.colors.b = b; v17[-1].bl.colors.a = m_uItemsPerRow; v17[-1].br.colors.r = v24; v17[-1].br.colors.g = v23; v17[-1].br.colors.b = b; v17[-1].br.colors.a = m_uItemsPerRow; } while ( (_DWORD)v3 != v20 ); m_pTextureAtlas = a1->m_pTextureAtlas; v33 = m_pTextureAtlas->__vftable; m_pTextureAtlas->m_bDirty = 1; v34 = v33->getTotalQuads(m_pTextureAtlas); if ( (unsigned int)v3 > v34 ) cocos2d::CCTextureAtlas::increaseTotalQuadsWith(a1->m_pTextureAtlas, v3 - v34); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source