Mercurial > fife-parpg
diff engine/core/view/camera.cpp @ 621:356634098bd9
* Removed the image chunking size variable from engine settings.
* Replaced the existing define of PI and added some math related static const variables
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 01 Oct 2010 14:09:47 +0000 |
parents | d242e6ce6f9f |
children | 46b95d06c8c2 |
line wrap: on
line diff
--- a/engine/core/view/camera.cpp Thu Sep 30 21:24:55 2010 +0000 +++ b/engine/core/view/camera.cpp Fri Oct 01 14:09:47 2010 +0000 @@ -327,7 +327,7 @@ void Camera::calculateZValue(ScreenPoint& screen_coords) { int dy = -(screen_coords.y - toScreenCoordinates(m_location.getMapCoordinates()).y); - screen_coords.z = static_cast<int>(tan(m_tilt * (M_PI / 180.0)) * static_cast<double>(dy)); + screen_coords.z = static_cast<int>(tan(m_tilt * (DBL_PI / 180.0)) * static_cast<double>(dy)); } ExactModelCoordinate Camera::toMapCoordinates(ScreenPoint screen_coords, bool z_calculated) {