// // cocos2d::CCNode::nodeToParentTransform from 0x5bd128 to 0x5bd404 (732 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 // cocos2d::CCAffineTransform *cocos2d::CCNode::nodeToParentTransform( cocos2d::CCAffineTransform *__return_ptr retstr, cocos2d::CCNode *a2) { cocos2d::CCAffineTransform *p_m_sTransform; // r5 float v5; // s12 float tx; // s15 float v7; // s14 float v8; // s13 float v9; // s15 float m_fTransformY; // s14 float x; // s19 _BOOL4 m_bIgnoreAnchorPointForPosition; // r3 float y; // s20 float m_fRotationX; // s14 float m_fRotationY; // s16 float v16; // s17 float v17; // s22 float v18; // s18 float v19; // s16 float v20; // s16 float m_fScaleX; // s12 float m_fScaleY; // s11 int v23; // r9 float v24; // s14 float v25; // s15 float b; // r1 float c; // r2 float d; // r3 float ty; // r1 float v30; // r10 float v31; // r0 float v32; // r1 float v33; // r2 float v34; // r3 float v35; // r1 float v36; // r1 float v37; // r2 float v38; // r3 float v39; // r1 float v40; // r1 float v41; // r2 float v42; // r3 float v43; // r1 float a; // r0 float v45; // r1 float v46; // r2 float v47; // r3 float *p_tx; // r5 float v49; // r1 float v51; // s14 cocos2d::CCAffineTransform v52; // [sp+10h] [bp-38h] BYREF cocos2d::CCAffineTransform v53; // [sp+2Ch] [bp-1Ch] BYREF p_m_sTransform = &a2->m_sTransform; if ( a2->m_bTransformDirty ) { x = a2->m_obPosition.x; m_bIgnoreAnchorPointForPosition = a2->m_bIgnoreAnchorPointForPosition; y = a2->m_obPosition.y; a2->m_fTransformX = x; a2->m_fTransformY = y; if ( m_bIgnoreAnchorPointForPosition ) { x = x + a2->m_obAnchorPointInPoints.x; y = y + a2->m_obAnchorPointInPoints.y; } m_fRotationX = a2->m_fRotationX; m_fRotationY = a2->m_fRotationY; if ( m_fRotationX == 0.0 && m_fRotationY == 0.0 ) { v17 = 1.0; v19 = 0.0; v18 = 0.0; v16 = 1.0; } else if ( m_fRotationX == m_fRotationY ) { v16 = cosf(-(float)(0.017453 * m_fRotationX)); v17 = v16; v18 = sinf(-(float)(0.017453 * m_fRotationX)); v19 = v18; } else { v20 = -(float)(0.017453 * m_fRotationY); v16 = cosf(-(float)(0.017453 * m_fRotationX)); v18 = sinf(-(float)(0.017453 * m_fRotationX)); v17 = cosf(v20); v19 = sinf(v20); } m_fScaleX = a2->m_fScaleX; m_fScaleY = a2->m_fScaleY; if ( a2->m_fSkewX == 0.0 && a2->m_fSkewY == 0.0 ) { v24 = a2->m_obAnchorPointInPoints.x; v25 = a2->m_obAnchorPointInPoints.y; if ( v24 != 0.0 || v25 != 0.0 ) { v51 = -v24; x = x + (float)((float)((float)(v18 * v25) * m_fScaleY) + (float)((float)(v17 * v51) * m_fScaleX)); y = y + (float)((float)((float)-(float)(v25 * v16) * m_fScaleY) + (float)((float)(v19 * v51) * m_fScaleX)); } v23 = 0; } else { v23 = 1; } cocos2d::__CCAffineTransformMake( &v52, v17 * m_fScaleX, v19 * m_fScaleX, -(float)(v18 * m_fScaleY), v16 * m_fScaleY, x, y); b = v52.b; c = v52.c; d = v52.d; p_m_sTransform->a = v52.a; p_m_sTransform->b = b; p_m_sTransform->c = c; p_m_sTransform->d = d; ty = v52.ty; p_m_sTransform->tx = v52.tx; p_m_sTransform->ty = ty; if ( v23 ) { v30 = tanf(a2->m_fSkewY * 0.017453); v31 = tanf(a2->m_fSkewX * 0.017453); cocos2d::__CCAffineTransformMake(&v53, 1.0, v30, v31, 1.0, 0.0, 0.0); cocos2d::CCAffineTransformConcat(&v52, &v53, p_m_sTransform); v32 = v52.b; v33 = v52.c; v34 = v52.d; p_m_sTransform->a = v52.a; p_m_sTransform->b = v32; p_m_sTransform->c = v33; p_m_sTransform->d = v34; v35 = v52.ty; p_m_sTransform->tx = v52.tx; p_m_sTransform->ty = v35; if ( !cocos2d::CCPoint::equals(&a2->m_obAnchorPointInPoints, &stru_AC8864) ) { cocos2d::CCAffineTransformTranslate( &v52, p_m_sTransform, COERCE_FLOAT(LODWORD(a2->m_obAnchorPointInPoints.x) ^ 0x80000000), COERCE_FLOAT(LODWORD(a2->m_obAnchorPointInPoints.y) ^ 0x80000000)); v36 = v52.b; v37 = v52.c; v38 = v52.d; p_m_sTransform->a = v52.a; p_m_sTransform->b = v36; p_m_sTransform->c = v37; p_m_sTransform->d = v38; v39 = v52.ty; p_m_sTransform->tx = v52.tx; p_m_sTransform->ty = v39; } } if ( a2->m_bAdditionalTransformDirty ) { cocos2d::CCAffineTransformConcat(&v52, p_m_sTransform, &a2->m_sAdditionalTransform); v40 = v52.b; v41 = v52.c; v42 = v52.d; p_m_sTransform->a = v52.a; p_m_sTransform->b = v40; p_m_sTransform->c = v41; p_m_sTransform->d = v42; v43 = v52.ty; p_m_sTransform->tx = v52.tx; p_m_sTransform->ty = v43; a2->m_bAdditionalTransformDirty = 0; } a2->m_bTransformDirty = 0; goto LABEL_24; } if ( a2->m_bPositionDirty ) { v5 = a2->m_obPosition.x; tx = a2->m_sTransform.tx; v7 = v5 - a2->m_fTransformX; v8 = a2->m_obPosition.y; a2->m_fTransformX = v5; v9 = tx + v7; m_fTransformY = a2->m_fTransformY; a2->m_fTransformY = v8; a2->m_sTransform.tx = v9; a2->m_sTransform.ty = a2->m_sTransform.ty + (float)(v8 - m_fTransformY); LABEL_24: a2->m_bPositionDirty = 0; } a = p_m_sTransform->a; v45 = p_m_sTransform->b; v46 = p_m_sTransform->c; v47 = p_m_sTransform->d; p_tx = &p_m_sTransform->tx; retstr->a = a; retstr->b = v45; retstr->c = v46; retstr->d = v47; v49 = p_tx[1]; retstr->tx = *p_tx; retstr->ty = v49; return retstr; }
GD Web Decomp Icon

GD Web Decomp

Raw Source