// // cocos2d::CCSprite::updateTransform from 0x5e702c to 0x5e73e8 (956 bytes) // // 0 xrefs: // // 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::CCSprite::updateTransform(cocos2d::CCSprite *a1) { cocos2d::CCNode *m_pParent; // r3 GLfloat v3; // r0 GLfloat v4; // r1 GLfloat v5; // r2 cocos2d::CCSprite_vtbl *v6; // r2 float b; // r1 float c; // r2 float d; // r3 _BOOL4 m_bDontDraw; // r3 float ty; // r1 float x; // s14 float m_fVertexZ; // r5 float y; // s13 float v15; // s15 float v16; // s12 float a; // s11 float v18; // s10 float v19; // s2 float v20; // s5 float tx; // s4 float v22; // s9 float v23; // s3 float v24; // s8 float v25; // s14 float v26; // s11 float v27; // s9 float v28; // s15 float v29; // s13 float v30; // s10 float v31; // s7 float v32; // s12 float v33; // s13 float v34; // s6 float v35; // s8 float v36; // s11 float v37; // s7 float v38; // s4 float v39; // s15 float m_fBlVertexMod; // s5 float v41; // s14 float m_fTextureBottom; // s5 float m_fTextureTop; // s10 float m_fBrVertexMod; // s5 float v45; // s14 float v46; // s5 float v47; // s10 float m_fTlVertexMod; // s9 float v49; // s10 float m_fTrVertexMod; // s14 float v51; // s15 GLfloat v52; // r0 GLfloat v53; // r1 GLfloat z; // r2 cocos2d::CCTextureAtlas *m_pobTextureAtlas; // r0 cocos2d::CCSprite_vtbl *v56; // r3 cocos2d::CCAffineTransform v57; // [sp+0h] [bp-38h] BYREF cocos2d::CCAffineTransform v58; // [sp+1Ch] [bp-1Ch] BYREF if ( !((int (__fastcall *)(cocos2d::CCSprite *))a1->isDirty)(a1) ) goto LABEL_38; if ( a1->m_bVisible && ((m_pParent = a1->m_pParent) == nullptr || m_pParent == a1->m_pobBatchNode || !HIBYTE(m_pParent[1].m_uUnknown)) ) { a1->m_bShouldBeHidden = 0; v6 = a1->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( m_pParent && m_pParent != a1->m_pobBatchNode ) { v6->nodeToParentTransform(&v58, a1); cocos2d::CCAffineTransformConcat(&v57, &v58, (const cocos2d::CCAffineTransform *)&a1->m_pParent[1].m_unknown2); } else { v6->nodeToParentTransform(&v57, a1); } b = v57.b; c = v57.c; d = v57.d; a1->m_transformToBatch.a = v57.a; a1->m_transformToBatch.b = b; a1->m_transformToBatch.c = c; a1->m_transformToBatch.d = d; m_bDontDraw = a1->m_bDontDraw; ty = v57.ty; a1->m_transformToBatch.tx = v57.tx; a1->m_transformToBatch.ty = ty; if ( !m_bDontDraw ) { if ( a1->_realOpacity ) { cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v58, &a1->m_obRect.size); x = a1->m_obOffsetPosition.x; m_fVertexZ = a1->m_fVertexZ; y = a1->m_obOffsetPosition.y; v15 = x + v58.a; v16 = a1->m_transformToBatch.b; a = a1->m_transformToBatch.a; v18 = y + v58.b; v19 = a1->m_transformToBatch.d; v20 = a1->m_transformToBatch.ty; tx = a1->m_transformToBatch.tx; v22 = -a1->m_transformToBatch.c; v23 = x * a; v24 = y * v22; v25 = x * v16; v26 = v15 * a; v27 = (float)(y + v58.b) * v22; v28 = v15 * v16; v29 = y * v19; v30 = v18 * v19; v31 = v25 + v29; v32 = (float)(v28 + v29) + v20; v33 = (float)(v28 + v30) + v20; v34 = (float)(v23 - v24) + tx; v35 = (float)(v26 - v24) + tx; v36 = (float)(v26 - v27) + tx; v37 = v31 + v20; v38 = (float)(v23 - v27) + tx; v39 = (float)(v25 + v30) + v20; if ( a1->m_bUseVertexMod ) { m_fBlVertexMod = a1->m_fBlVertexMod; if ( m_fBlVertexMod == 0.0 ) { a1->m_sQuad.bl.vertices.x = v34; a1->m_sQuad.bl.vertices.z = m_fVertexZ; a1->m_sQuad.bl.vertices.y = v37; } else { a1->m_sQuad.bl.vertices.z = m_fVertexZ; v41 = 1.0 - m_fBlVertexMod; m_fTextureBottom = a1->m_fTextureBottom; a1->m_sQuad.bl.vertices.x = v38 - (float)((float)(v38 - v34) * v41); m_fTextureTop = a1->m_fTextureTop; a1->m_sQuad.bl.vertices.y = v39 - (float)((float)(v39 - v37) * v41); a1->m_sQuad.bl.texCoords.v = m_fTextureTop - (float)((float)(m_fTextureTop - m_fTextureBottom) * v41); } m_fBrVertexMod = a1->m_fBrVertexMod; if ( m_fBrVertexMod == 0.0 ) { a1->m_sQuad.br.vertices.x = v35; a1->m_sQuad.br.vertices.z = m_fVertexZ; a1->m_sQuad.br.vertices.y = v32; } else { a1->m_sQuad.br.vertices.z = m_fVertexZ; v45 = 1.0 - m_fBrVertexMod; v46 = a1->m_fTextureBottom; a1->m_sQuad.br.vertices.x = v36 - (float)((float)(v36 - v35) * v45); v47 = a1->m_fTextureTop; a1->m_sQuad.br.vertices.y = v33 - (float)((float)(v33 - v32) * v45); a1->m_sQuad.br.texCoords.v = v47 - (float)((float)(v47 - v46) * v45); } m_fTlVertexMod = a1->m_fTlVertexMod; if ( m_fTlVertexMod == 0.0 ) { a1->m_sQuad.tl.vertices.x = v38; a1->m_sQuad.tl.vertices.z = m_fVertexZ; a1->m_sQuad.tl.vertices.y = v39; } else { a1->m_sQuad.tl.vertices.z = m_fVertexZ; v49 = 1.0 - m_fTlVertexMod; a1->m_sQuad.tl.vertices.x = v34 + (float)((float)(v38 - v34) * (float)(1.0 - m_fTlVertexMod)); a1->m_sQuad.tl.vertices.y = v37 + (float)((float)(v39 - v37) * (float)(1.0 - m_fTlVertexMod)); if ( m_fTlVertexMod >= 0.0 ) { if ( a1->m_bRectRotated ) a1->m_sQuad.tl.texCoords.u = a1->m_fTextureLeft + (float)((float)(a1->m_fTextureRight - a1->m_fTextureLeft) * v49); else a1->m_sQuad.tl.texCoords.v = a1->m_fTextureBottom + (float)((float)(a1->m_fTextureTop - a1->m_fTextureBottom) * v49); } } m_fTrVertexMod = a1->m_fTrVertexMod; if ( m_fTrVertexMod != 0.0 ) { a1->m_sQuad.tr.vertices.z = m_fVertexZ; v51 = 1.0 - m_fTrVertexMod; a1->m_sQuad.tr.vertices.x = v35 + (float)((float)(v36 - v35) * (float)(1.0 - m_fTrVertexMod)); a1->m_sQuad.tr.vertices.y = v32 + (float)((float)(v33 - v32) * (float)(1.0 - m_fTrVertexMod)); if ( m_fTrVertexMod >= 0.0 ) { if ( a1->m_bRectRotated ) a1->m_sQuad.tr.texCoords.u = a1->m_fTextureLeft + (float)((float)(a1->m_fTextureRight - a1->m_fTextureLeft) * v51); else a1->m_sQuad.tr.texCoords.v = a1->m_fTextureBottom + (float)((float)(a1->m_fTextureTop - a1->m_fTextureBottom) * v51); } goto LABEL_34; } } else { a1->m_sQuad.bl.vertices.x = v34; a1->m_sQuad.bl.vertices.z = m_fVertexZ; a1->m_sQuad.br.vertices.z = m_fVertexZ; a1->m_sQuad.bl.vertices.y = v37; a1->m_sQuad.tl.vertices.z = m_fVertexZ; a1->m_sQuad.br.vertices.x = v35; a1->m_sQuad.br.vertices.y = v32; a1->m_sQuad.tl.vertices.x = v38; a1->m_sQuad.tl.vertices.y = v39; } a1->m_sQuad.tr.vertices.z = m_fVertexZ; a1->m_sQuad.tr.vertices.x = v36; a1->m_sQuad.tr.vertices.y = v33; } else { a1->m_sQuad.bl.vertices.x = 0.0; a1->m_sQuad.bl.vertices.y = 0.0; a1->m_sQuad.bl.vertices.z = 0.0; v52 = a1->m_sQuad.bl.vertices.x; v53 = a1->m_sQuad.bl.vertices.y; z = a1->m_sQuad.bl.vertices.z; a1->m_sQuad.tr.vertices.x = v52; a1->m_sQuad.tr.vertices.y = v53; a1->m_sQuad.tr.vertices.z = z; a1->m_sQuad.tl.vertices.x = v52; a1->m_sQuad.tl.vertices.y = v53; a1->m_sQuad.tl.vertices.z = z; a1->m_sQuad.br.vertices.x = v52; a1->m_sQuad.br.vertices.y = v53; a1->m_sQuad.br.vertices.z = z; } } } else { a1->m_sQuad.bl.vertices.x = 0.0; a1->m_sQuad.bl.vertices.y = 0.0; a1->m_sQuad.bl.vertices.z = 0.0; v3 = a1->m_sQuad.bl.vertices.x; v4 = a1->m_sQuad.bl.vertices.y; v5 = a1->m_sQuad.bl.vertices.z; a1->m_sQuad.tr.vertices.x = v3; a1->m_sQuad.tr.vertices.y = v4; a1->m_sQuad.tr.vertices.z = v5; a1->m_sQuad.tl.vertices.x = v3; a1->m_sQuad.tl.vertices.y = v4; a1->m_sQuad.tl.vertices.z = v5; a1->m_sQuad.br.vertices.x = v3; a1->m_sQuad.br.vertices.y = v4; a1->m_sQuad.br.vertices.z = v5; a1->m_bShouldBeHidden = 1; } LABEL_34: if ( !a1->m_bDontDraw ) { m_pobTextureAtlas = a1->m_pobTextureAtlas; if ( m_pobTextureAtlas ) cocos2d::CCTextureAtlas::updateQuad(m_pobTextureAtlas, &a1->m_sQuad, a1->m_uAtlasIndex); } v56 = a1->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_bRecursiveDirty = 0; ((void (__fastcall *)(cocos2d::CCSprite *))v56->setDirty)(a1); LABEL_38: cocos2d::CCNode::updateTransform(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source