-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract SA interfaces to separate files #1 (C3DMarkerSAInterface) #4063
base: master
Are you sure you want to change the base?
Extract SA interfaces to separate files #1 (C3DMarkerSAInterface) #4063
Conversation
I love your PRs...thank you. |
CVector m_lastPosition; // 144 | ||
DWORD m_OnScreenTestTime; // time last screen check was done // 156 | ||
}; | ||
#include "interfaces/C3DMarkerSAInterface.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is interesting, but i think there were some sort of design choices involved. So we store SA interfaces and wrappers in the same file.
What do the other contributors think about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that generally the separation of MTA wrappers and SA internal structures is reasonable. I don't think that this can harm the existed code in any way.
The SA layer interfaces are currently in the header files of classes, e.g.,
C3DMarkerSAInterface
inC3DMarkerSA.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 theinterfaces
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.
CMatrix_Padded
classC3DMarkerSAInterface
and corrected its structureXYZ
,XYZStore
,CMatrixEx
fromCEntitySA.h
I tested the code after the changes and did not observe any issues with markers or their colors.