-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update Box2D to version 2.4.1 #67
Conversation
make -C third_party/Box2D/Build config=release_x86_64 -j$(CPUS) | ||
|
||
|
||
wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-linux.tar.gz && \ |
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.
Updated premake also 🤷
rm premake-5.0.0-alpha14-linux.tar.gz) | ||
|
||
box2d: premake | ||
.build/premake5 --file=third_party/Box2D/premake5.lua gmake |
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.
box has moved to cmake
82296aa
to
09c0da8
Compare
@@ -569,7 +569,7 @@ void PhysicsManager::HandleCollision_ObjectWithMap(b2Fixture* objectFixture, b2F | |||
float height = gGameMap.GetHeightAtPosition(gameObject->mPhysicsBody->GetPosition()); | |||
int mapLayer = (int) (Convert::MetersToMapUnits(height) + 0.5f); | |||
|
|||
b2FixtureData_map fxdata = mapFixture->GetUserData(); | |||
b2FixtureData_map fxdata = (b2FixtureData_map*) mapFixture->GetUserData().pointer; |
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.
b2FixtureData_map fxdata = (b2FixtureData_map*) mapFixture->GetUserData().pointer; | |
b2FixtureData_map fxdata = static_cast<b2FixtureData_map*>(mapFixture->GetUserData().pointer); |
@@ -505,59 +505,59 @@ bool PhysicsManager::ShouldCollide_ObjectWithMap(b2Contact* contact, b2Fixture* | |||
|
|||
// todo: this is temporary implementation | |||
|
|||
b2FixtureData_map fxdata = mapFixture->GetUserData(); | |||
b2FixtureData_map fxdata = (b2FixtureData_map*) mapFixture->GetUserData().pointer; |
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.
b2FixtureData_map fxdata = (b2FixtureData_map*) mapFixture->GetUserData().pointer; | |
b2FixtureData_map fxdata = static_cast<b2FixtureData_map*>(mapFixture->GetUserData().pointer); |
Oh, I didn't expect that. Nice work, thanks, @marmichalski ! As for 'static_cast' over 'c-style' cast, I haven't decided yet what I prefer more, usually I'm too lazy to write ***_cast<> etc but in general, I don't mind. |
Hey, no problem. I have updated the visual studio project for box2d, the I am not updating the casts, because I see no reason to. I can do that, if that's what you prefer, @codenamecpp, but I see you don't mind too :) Edit: Said box2d PR - erincatto/box2d#702 |
This should be fine, but would be great if someone could run the premake build. I am creating a cmake build env and that's where I have tested these changes.There is quite a few whitelines changes in touched files, I did not try to resolve them in any way, as unified line endings are my preference :PEdit: or actually I probably forgot to update premake. I'll update in a few.Done. It compiles & runs.
I have not updated the Visual Studio project as I have no way to test the changes - maybe just updating the files list should be enough 🤔