From baf7da9d4a7fc0566840b159903999d76d99a228 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 8 Sep 2011 01:08:47 +0200 Subject: 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. --- src/utility.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index ea7c11846..d331bafbb 100644 --- a/src/utility.h +++ b/src/utility.h @@ -1765,8 +1765,8 @@ inline int myrand_range(int min, int max) Miscellaneous functions */ -bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir, f32 range, - f32 *distance_ptr=NULL); +bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir, + f32 camera_fov, f32 range, f32 *distance_ptr=NULL); /* Queue with unique values with fast checking of value existence -- cgit v1.2.3 From 3e012122d1607a6269af4e4522305d8b5efcd9d4 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Wed, 21 Sep 2011 18:37:29 +0200 Subject: Simplistic wielded tool lighting, added setMeshVerticesColor to utility.h and refactored some other code into calls of that --- src/utility.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index d331bafbb..2fefd8667 100644 --- a/src/utility.h +++ b/src/utility.h @@ -553,6 +553,9 @@ private: u32 *m_result; }; +// Sets the color of all vertices in the mesh +void setMeshVerticesColor(scene::IMesh* mesh, video::SColor& color); + // Calculates the borders of a "d-radius" cube inline void getFacePositions(core::list &list, u16 d) { -- cgit v1.2.3