Add sqlite3 backend hack for android
[oweals/minetest.git] / src / clientmap.h
index 7f63704d3cb9f30188d0ebb18e562df2c7be2143..91f58a70c5dbd125e59efb92247437b1f5946bb4 100644 (file)
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_extrabloated.h"
 #include "map.h"
+#include "camera.h"
 #include <set>
 #include <map>
 
@@ -33,7 +34,8 @@ struct MapDrawControl
                wanted_max_blocks(0),
                wanted_min_range(0),
                blocks_drawn(0),
-               blocks_would_have_drawn(0)
+               blocks_would_have_drawn(0),
+               farthest_drawn(0)
        {
        }
        // Overrides limits by drawing everything
@@ -48,6 +50,8 @@ struct MapDrawControl
        u32 blocks_drawn;
        // Number of blocks that would have been drawn in wanted_range
        u32 blocks_would_have_drawn;
+       // Distance to the farthest block drawn
+       float farthest_drawn;
 };
 
 class Client;
@@ -83,12 +87,13 @@ public:
                ISceneNode::drop();
        }
 
-       void updateCamera(v3f pos, v3f dir, f32 fov)
+       void updateCamera(v3f pos, v3f dir, f32 fov, v3s16 offset)
        {
                JMutexAutoLock lock(m_camera_mutex);
                m_camera_position = pos;
                m_camera_direction = dir;
                m_camera_fov = fov;
+               m_camera_offset = offset;
        }
 
        /*
@@ -122,7 +127,7 @@ public:
        int getBackgroundBrightness(float max_d, u32 daylight_factor,
                        int oldvalue, bool *sunlight_seen_result);
 
-       void renderPostFx();
+       void renderPostFx(CameraMode cam_mode);
 
        // For debug printing
        virtual void PrintInfo(std::ostream &out);
@@ -143,6 +148,7 @@ private:
        v3f m_camera_position;
        v3f m_camera_direction;
        f32 m_camera_fov;
+       v3s16 m_camera_offset;
        JMutex m_camera_mutex;
 
        std::map<v3s16, MapBlock*> m_drawlist;