cleanup & changed water logic

This commit is contained in:
h4570
2020-12-27 19:49:36 +01:00
parent 55f476e9ed
commit ea0d47e09c
10 changed files with 91 additions and 84 deletions
+2 -18
View File
@@ -12,7 +12,7 @@
#include <utils/math.hpp>
const float CAMERA_Y = 15.0F;
const float CAMERA_Y = 25.0F;
Camera::Camera(ScreenSettings *t_screen) : CameraBase(t_screen, &position)
{
@@ -40,12 +40,7 @@ void Camera::rotate(Pad &t_pad)
horizontalLevel -= 0.08;
else if (t_pad.rJoyH >= 200)
horizontalLevel += 0.08;
/*
if (t_pad.rJoyV <= 50 && verticalLevel > 25.0F)
verticalLevel -= 0.9F;
else if (t_pad.rJoyV >= 200 && verticalLevel < 80.0F)
verticalLevel += 0.9F;
*/
unitCirclePosition.x = (Math::sin(horizontalLevel) * verticalLevel);
unitCirclePosition.y = CAMERA_Y;
unitCirclePosition.z = (Math::cos(horizontalLevel) * verticalLevel);
@@ -56,15 +51,4 @@ void Camera::followBy(Mesh &t_mesh)
position.x = unitCirclePosition.x + t_mesh.position.x;
position.y = unitCirclePosition.y + t_mesh.position.y;
position.z = unitCirclePosition.z + t_mesh.position.z;
if (position.x > (-0.04F * verticalLevel) &&
position.x < 0.0F &&
position.z > (0.998F * verticalLevel))
{
// TODO
// position.x = 0.0F;
// position.y = 0.0F;
// position.z = 0.0F;
// horizontalLevel = 0.0F;
}
}