diff --git a/external/gamekit b/external/gamekit index ca131a8a..f0285a38 160000 --- a/external/gamekit +++ b/external/gamekit @@ -1 +1 @@ -Subproject commit ca131a8af626b9def9d0335f2a00f395a27b65b2 +Subproject commit f0285a38170f3f59963b56bbb3347a6321f7e064 diff --git a/source/client/graphics/CelestialObject.cpp b/source/client/graphics/CelestialObject.cpp index 1cc0cb3b..f7a3bd6a 100644 --- a/source/client/graphics/CelestialObject.cpp +++ b/source/client/graphics/CelestialObject.cpp @@ -101,7 +101,7 @@ void CelestialObject::updateAxisTransform() const { // The axis is completely vertical. This does not make much sense, // because the sun and the moon will rotate horizontally following // the horizon, but let's not crash! There are infinite rotations - // thatcan keep the sun and moon in the horizon. Let's pick one: + // that can keep the sun and moon in the horizon. Let's pick one: // local X axis pointing to world's X, local Y axis pointing to // world's Z, and local Z axis pointing to world's -Y. That places // Polaris at the top, and the sun to the East at 6:00 and to the diff --git a/source/client/graphics/PlayerBox.cpp b/source/client/graphics/PlayerBox.cpp index a7b34dc9..781d9d51 100644 --- a/source/client/graphics/PlayerBox.cpp +++ b/source/client/graphics/PlayerBox.cpp @@ -274,7 +274,7 @@ void PlayerBox::draw(gk::RenderTarget &target, gk::RenderStates states) const { // Subtract the camera position - see comment in ClientWorld::draw() const gk::Vector3d &cameraPosition = m_camera.getDPosition(); states.transform.translate(m_x - cameraPosition.x, m_y - cameraPosition.y, m_z - cameraPosition.z); - states.transform.rotate(m_viewAngleH, gk::Vector3{0, 0, 1}); + states.transform.rotateZ(m_viewAngleH); states.transform *= getTransform(); states.texture = &m_texture; diff --git a/source/client/graphics/Skybox.cpp b/source/client/graphics/Skybox.cpp index c86cb7f5..24f848f0 100644 --- a/source/client/graphics/Skybox.cpp +++ b/source/client/graphics/Skybox.cpp @@ -95,7 +95,7 @@ void Skybox::loadSky(const Sky &sky) { star.setPosition(v.x, v.y, v.z); // Rotate the star to make it face the camera - star.rotate(atan2f(v.y, v.x) * float(180./M_PI), gk::Vector3f{0.f, 0.f, 1.f}); + star.rotateZ(atan2f(v.y, v.x) * float(180./M_PI)); // Set a random rotation in the day cycle star.setRotationOffset(rand() % GameTime::dayLength); diff --git a/source/client/gui/InventoryCube.cpp b/source/client/gui/InventoryCube.cpp index 141526e6..fa7b1d89 100644 --- a/source/client/gui/InventoryCube.cpp +++ b/source/client/gui/InventoryCube.cpp @@ -51,8 +51,8 @@ InventoryCube::InventoryCube(float size, bool isEntity) // NOTE: intrinsic rotations! The axis is the local axis of the object. // Note also that we start looking at the bottom of the cube due to how // glm::ortho is used (see comment below). - m_transform.rotate(120.f, {1, 0, 0}); - m_transform.rotate(-45.f, {0, 0, 1}); + m_transform.rotateX(120.f); + m_transform.rotateZ(-45.f); } } diff --git a/source/client/hud/Minimap.cpp b/source/client/hud/Minimap.cpp index ca6abb03..41dfc55a 100644 --- a/source/client/hud/Minimap.cpp +++ b/source/client/hud/Minimap.cpp @@ -72,7 +72,7 @@ void Minimap::update(const ClientPlayer &player, class ClientWorld &world) { } m_playerFovRotationTransform = gk::Transform::Identity; - m_playerFovRotationTransform.rotate(player.cameraYaw() - 90.f, {0, 0, -1}); + m_playerFovRotationTransform.rotateZ(90.f - player.cameraYaw()); static float oldCameraFov = Config::cameraFOV; static u16 oldRenderDistance = Config::renderDistance;