Skip to content

Conversation

@bobtista
Copy link

@bobtista bobtista commented Nov 13, 2025

Summary

Replaces all C-style casts between Matrix4x4/Matrix3D and D3DXMATRIX/D3DMATRIX with proper conversion functions that handle the row-major/column-major transpose.

Before:

DX8CALL(SetTransform(transform, (D3DMATRIX*)&m)); 

After:

D3DXMATRIX d3dMat = Build_D3DXMATRIX(m); DX8CALL(SetTransform(transform, &d3dMat)); 
@bobtista bobtista force-pushed the bobtista/fix-matrix4-d3d-transpose branch from 518ebd4 to fa2fff2 Compare November 13, 2025 17:13
@bobtista bobtista force-pushed the bobtista/fix-matrix4-d3d-transpose branch 2 times, most recently from 9a7854f to de78d22 Compare December 3, 2025 20:51
@bobtista bobtista changed the title refactor(dx8): Replace unsafe Matrix4/D3DMATRIX casts with explicit conversions refactor(dx8): Replace unsafe Matrix4x4/D3DMATRIX casts with proper transpose conversion Dec 3, 2025
@bobtista bobtista force-pushed the bobtista/fix-matrix4-d3d-transpose branch 4 times, most recently from 780bdee to 93986cd Compare December 3, 2025 21:36
@bobtista bobtista force-pushed the bobtista/fix-matrix4-d3d-transpose branch from 93986cd to 2a0b73e Compare December 3, 2025 21:38
@bobtista bobtista marked this pull request as ready for review December 3, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants