Skip to content

Conversation

@MiranDMC
Copy link
Contributor

@MiranDMC MiranDMC commented Nov 8, 2025

  • Reorganized contents of CVector.h
  • Separated declarations from implementation
  • Unified function names
  • All functions are now inlined
  • Added vector LERP functions
  • Added unit tests project
image

@MiranDMC MiranDMC force-pushed the 3D_Vector_refactoring branch from 9f98454 to 4e095f8 Compare November 8, 2025 14:32
@MiranDMC MiranDMC force-pushed the 3D_Vector_refactoring branch from 4e095f8 to 363e38a Compare November 8, 2025 14:45
@gennariarmando
Copy link
Collaborator

A refactor sounds nice and all, but in my opinion having multiple implementations for the trilogy for the sake of keeping one constructor call the original game function isn't worth the pain of editing it in the future.

One single CVector class with all the implementations inlined inside one header file shared across the trilogy, with macros to not implement it for IV sounds way more reasonable for such a drastic change.

@MiranDMC
Copy link
Contributor Author

MiranDMC commented Nov 9, 2025

Removed game specific CVector implementations.
GTA2's CVector.h contained some extra classes. Extracted to CVector2D.h.
Created CVector in shared location. All games are now using the same code.

In future same treatment should be done to the CVector2D, CMatrix etc.

@MiranDMC MiranDMC force-pushed the 3D_Vector_refactoring branch from 7fa33b3 to 6ff0e62 Compare November 9, 2025 21:05
@gennariarmando gennariarmando merged commit abc450e into DK22Pac:master Nov 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants