Refactor geom
library into geom
and shape
#1263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One thing that has been bugging me for a while is the
geom
library. So far it contained classes that, based on their locations in the binary, should not be in the same library.roadmap
shows it like this:We can see that
legobox
untillegomesh
belong to their own, distinct group of compilation units based on their addresses. The reason we have put them ingeom
is - and this is something unique - we have copied this code directly from the alpha source code leak. Some of it has been virtually unchanged since then. In the alpha, these classes have been located in:LEGO/SOURCES/GEOM/
so in the case of the alpha version, these classes are clearly part of the
geom
library.The reason we have put
legoedge
...legowegedge
intogeom
is because we have this BETA10 assertion:"C:\\Lego\\Sources\\Geom\\LegoWEGEdge.h"
(at10037357
)which means these classes have also been part of the
geom
library (at this point). However, the binaries of both Retail and BETA10 indicate thatlegobox
...legomesh
have moved to the very end of the binary. My conclusion is that they separated this old code, created a new library and added this to the compilation at the very end.This PR refactors the aforementioned libraries into
geom
and a new library calledshape
. Note that we also have the classLegoColor
in there, which was previously inmisc
, but is only used internally bylegomesh
.roadmap
is now showing: