]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/content_cao.h
Shaders for Android (GLES 2) (#10506)
[dragonfireclient.git] / src / client / content_cao.h
index 699148c52306416eaaa4ea318db4e04678afb888..435fc2931656f4a553cfbcf784caa9be11a59180 100644 (file)
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class Camera;
 class Client;
 struct Nametag;
+struct MinimapMarker;
 
 /*
        SmoothTranslator
@@ -84,6 +85,7 @@ class GenericCAO : public ClientActiveObject
        scene::IBillboardSceneNode *m_spritenode = nullptr;
        scene::IDummyTransformationSceneNode *m_matrixnode = nullptr;
        Nametag *m_nametag = nullptr;
+       MinimapMarker *m_marker = nullptr;
        v3f m_position = v3f(0.0f, 10.0f * BS, 0);
        v3f m_velocity;
        v3f m_acceleration;
@@ -124,6 +126,7 @@ class GenericCAO : public ClientActiveObject
        float m_step_distance_counter = 0.0f;
        u8 m_last_light = 255;
        bool m_is_visible = false;
+       bool m_force_visible = false;
        s8 m_glow = 0;
        // Material
        video::E_MATERIAL_TYPE m_material_type;
@@ -188,10 +191,11 @@ class GenericCAO : public ClientActiveObject
                return m_matrixnode->getRelativeTransformationMatrix();
        }
 
-       inline const core::matrix4 &getAbsolutePosRotMatrix() const
+       inline const core::matrix4 *getAbsolutePosRotMatrix() const
        {
-               assert(m_matrixnode);
-               return m_matrixnode->getAbsoluteTransformation();
+               if (!m_matrixnode)
+                       return nullptr;
+               return &m_matrixnode->getAbsoluteTransformation();
        }
 
        inline f32 getStepHeight() const
@@ -214,6 +218,11 @@ class GenericCAO : public ClientActiveObject
                m_is_visible = toset;
        }
 
+       inline bool isForcedVisible() const
+       {
+               return m_force_visible;
+       }
+
        void setChildrenVisible(bool toset);
        void setAttachment(int parent_id, const std::string &bone, v3f position, v3f rotation);
        void getAttachment(int *parent_id, std::string *bone, v3f *position,
@@ -247,6 +256,8 @@ class GenericCAO : public ClientActiveObject
 
        void updateNametag();
 
+       void updateMarker();
+
        void updateNodePos();
 
        void step(float dtime, ClientEnvironment *env);
@@ -274,4 +285,6 @@ class GenericCAO : public ClientActiveObject
        {
                return m_prop.infotext;
        }
+
+       void updateMeshCulling();
 };