mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Extract SA interfaces to separate files #1 (C3DMarkerSAInterface)

Open FileEX opened this issue 8 months ago • 1 comments

The SA layer interfaces are currently in the header files of classes, e.g., C3DMarkerSAInterface in C3DMarkerSA.h. However, in many cases, multiple interfaces are in the same file, and often they shouldn't be there. I think a good solution to this mess is to extract the interfaces into separate files in the interfaces directory within the Game SA project.

During this extraction, we can also refine the interfaces and fill in missing fields, as many interface classes have incorrect structures. These PRs are not intended to refactor the actual code (e.g., C3DMarkerSA), only as much as necessary for the new interface structure.

Merging all interfaces in a single PR would obviously be unacceptable, impossible to review, and difficult to test. Therefore, I want to split this into multiple PRs, ideally handling three interfaces per PR. This PR is the first in the series.

~~- Improved and completed the CMatrix_Padded class~~

  • Extracted the C3DMarkerSAInterface and corrected its structure
  • Adjusted some functions to match the new interface structure
  • Removed dead and unused classes XYZ, XYZStore, CMatrixEx from CEntitySA.h

I tested the code after the changes and did not observe any issues with markers or their colors.

FileEX avatar Mar 02 '25 17:03 FileEX