Skip to content
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

Refactor: move collide2 out as a library #1041

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BenjamenMeyer
Copy link
Member

Add a new libraries directory in parallel to the engine for our various library components, and add the collide2 code there as the first library component as it is the most independent of the various libraries.

NOTE: There is no real code change outside of header includes

Thank you for submitting a pull request and becoming a contributor to the Vega Strike Core Engine.

Please answer the following:

Code Changes:

Issues:

Purpose:

  • What is this pull request trying to do? Breaking down the code structure into smaller, independent components
  • What release is this for? 0.10.x
  • Is there a project or milestone we should apply this to? 0.10.x

Add a new `libraries` directory in parallel to the `engine` for
our various library components, and add the `collide2` code there
as the first library component as it is the most independent of
the various libraries.

NOTE: There is no real code change outside of header includes
Copy link
Contributor

@royfalk royfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward. Not sure how meaningful it is without encapsulating it from the rest of the code though.

# collide2 headers
${CMAKE_CURRENT_SOURCE_DIR}
# VS engine headers
#${CMAKE_SOURCE_DIR}/engine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue for refactoring VS out of collide library. It's no good separating it out if it refers to VS all over.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. collide2 is generally under a difference license (public domain from what I can tell... or rather the UNLICENSE) so at a minimum we gain that clarity.
  2. agreed - there's a few things (gfx/quaternion.h) that seem to have gotten spread out. it'd be nice to make it more independent that way.

Filed #1042

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the build failures (#1041 (comment)) I'll have to address some of this somehow... but my goal is to be minimal right now. Not sure if I'll fix up #1041 immediately or just move some checks around in CMake for the moment so Mac/Win builds succeed - more likely just move stuff around b/c it'll probably make more sense long term with other libraries being split out any way.


#Find Math
INCLUDE(CheckSymbolExists)
IF(NOT POW_FUNCTION_EXISTS AND NOT NEED_LINKING_AGAINST_LIBM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to find a lot of information about this. Is there really a chance modern systems don't have POW? (whatever that is)
I'm asking because a lot of stuff in our cmake was really legacy from 2001.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt it. Created #1043 to follow up on that.

@BenjamenMeyer
Copy link
Member Author

NOTE: I reviewed the build failures:

  • The Mac build failed due to not finding the endian.h system header included by our endianness.h header
  • The Windows builds failed due to not finding expat.h

Both of these were while building the the collide2 library. Interestingly, Linux has no issue with either of these. Probably means that some of the library searches we do in the VS engine need to be more universal for now - at least until #1041 can be completed.

Copy link
Contributor

@royfalk royfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Make it build and run and ship it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants