summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2011-09-08 01:08:47 +0200
committerKahrl <kahrl@gmx.net>2011-09-08 01:08:47 +0200
commitbaf7da9d4a7fc0566840b159903999d76d99a228 (patch)
tree66ed23105449fcf51e971d5f8fcbf03d04973fb7 /src/map.h
parentc0b35fa429c68b49b2d6a5124aff6dcc31400b63 (diff)
downloadminetest-baf7da9d4a7fc0566840b159903999d76d99a228.tar.gz
minetest-baf7da9d4a7fc0566840b159903999d76d99a228.tar.bz2
minetest-baf7da9d4a7fc0566840b159903999d76d99a228.zip
Collected and moved existing camera infrastructure from game.cpp to camera.cpp and camera.h. Introduced configuration settings 'fov' which chooses the camera's (vertical) field of view and 'view_bobbing' which currently does nothing. Other code refactored to not expect the FOV to be a build time constant.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index 5bea4a137..cb649addd 100644
--- a/src/map.h
+++ b/src/map.h
@@ -518,11 +518,12 @@ public:
ISceneNode::drop();
}
- void updateCamera(v3f pos, v3f dir)
+ void updateCamera(v3f pos, v3f dir, f32 fov)
{
JMutexAutoLock lock(m_camera_mutex);
m_camera_position = pos;
m_camera_direction = dir;
+ m_camera_fov = fov;
}
/*
@@ -603,6 +604,7 @@ private:
v3f m_camera_position;
v3f m_camera_direction;
+ f32 m_camera_fov;
JMutex m_camera_mutex;
core::map<v2s16, bool> m_last_drawn_sectors;