]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/camera.h
Android: Implement Autohiding button bars to cleanup screen
[dragonfireclient.git] / src / camera.h
index 8831257cc8c2df3b8d7bf51989785779203d31e8..006f4b3cebadf1a74f9e682d2e1ed74b9bd54198 100644 (file)
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irrlichttypes_extrabloated.h"
 #include "inventory.h"
 #include "mesh.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "util/numeric.h"
 #include <ICameraSceneNode.h>
 
@@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class LocalPlayer;
 struct MapDrawControl;
 class IGameDef;
+class WieldMeshSceneNode;
 
 enum CameraMode {CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT};
 
@@ -109,7 +110,7 @@ class Camera
        }
 
        // Checks if the constructor was able to create the scene nodes
-       bool successfullyCreated(std::wstring& error_message);
+       bool successfullyCreated(std::string &error_message);
 
        // Step the camera: updates the viewing range and view bobbing.
        void step(f32 dtime);
@@ -127,7 +128,7 @@ class Camera
        void setDigging(s32 button);
 
        // Replace the wielded item mesh
-       void wield(const ItemStack &item, u16 playeritem);
+       void wield(const ItemStack &item);
 
        // Draw the wielded tool.
        // This has to happen *after* the main scene is drawn.
@@ -157,8 +158,7 @@ class Camera
        scene::ICameraSceneNode* m_cameranode;
 
        scene::ISceneManager* m_wieldmgr;
-       scene::IMeshSceneNode* m_wieldnode;
-       u8 m_wieldlight;
+       WieldMeshSceneNode* m_wieldnode;
 
        // draw control
        MapDrawControl& m_draw_control;
@@ -203,16 +203,17 @@ class Camera
        // If 1, right-click digging animation
        s32 m_digging_button;
 
-       //dummymesh for camera
-       irr::scene::IAnimatedMesh* m_dummymesh;
-
        // Animation when changing wielded item
        f32 m_wield_change_timer;
-       scene::IMesh *m_wield_mesh_next;
-       u16 m_previous_playeritem;
-       std::string m_previous_itemname;
+       ItemStack m_wield_item_next;
 
        CameraMode m_camera_mode;
+
+       f32 m_cache_fall_bobbing_amount;
+       f32 m_cache_view_bobbing_amount;
+       f32 m_cache_wanted_fps;
+       f32 m_cache_fov;
+       bool m_cache_view_bobbing;
 };
 
 #endif