Thyme icon indicating copy to clipboard operation
Thyme copied to clipboard

Refactor TRANS_LIT_TEX_VERTEX into two instances

Open duncanspumpkin opened this issue 3 years ago • 2 comments

_TRANS_LIT_TEX_VERTEX was a problem child in the clang-tidy PR so had a closer look at it. We have two different instances of this in different forms in the codebase. I've created TransformedTexture1Vertex and TransformedTexture2Vertex to replace the two different types. I've also extracted out the D3DFVF values for each struct so its clear why they are being set.

duncanspumpkin avatar Nov 19 '21 12:11 duncanspumpkin

Suggested to use https://github.com/TheAssemblyArmada/Thyme/blob/69b10921b42c6848fcd118c2fa257ec4f51c962d/src/w3d/renderer/dx8vertexbuffer.h#L45

Sadly this isn't the same this is for Vector4. Could still use the same naming scheme though.

duncanspumpkin avatar Nov 19 '21 13:11 duncanspumpkin

We have the following vertex formats defined: VertexFormatXYZDUV2 within w3dwater.h VertexFormatXYZNDUV2 within dx8vertexbuffer.h VertexFormatXYZDUV1 within dx8vertexbuffer.h This PR adds: VertexFormatXYZWDUV1 within dx8wrapper.h VertexFormatXYZWDUV2 within dx8wrapper.h

duncanspumpkin avatar Nov 21 '21 11:11 duncanspumpkin