diff options
Diffstat (limited to 'src/graphics/engine/engine.h')
-rw-r--r-- | src/graphics/engine/engine.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 6363fd3..14a40db 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -48,6 +48,7 @@ class CApplication; class CInstanceManager; class CObject; class CSoundInterface; +class CImage; // Graphics module namespace @@ -890,12 +891,23 @@ public: const Math::Vector& upVec, float eyeDistance); //! Loads texture, creating it if not already present - Texture LoadTexture(const std::string& name); + Texture LoadTexture(const std::string& name); + //! Loads texture from existing image + Texture LoadTexture(const std::string& name, CImage* image); //! Loads texture, creating it with given params if not already present - Texture LoadTexture(const std::string& name, const TextureCreateParams& params); + Texture LoadTexture(const std::string& name, const TextureCreateParams& params); //! Loads all necessary textures bool LoadAllTextures(); + //! Changes colors in a texture + bool ChangeTextureColor(const std::string& texName, + Color colorRef1, Color colorNew1, + Color colorRef2, Color colorNew2, + float tolerance1, float tolerance2, + Math::Point ts, Math::Point ti, + Math::Point *exclude = nullptr, + float shift = 0.0f, bool hsv = false); + //! Sets texture for given stage; if not present in cache, the texture is loaded /** If loading fails, returns false. */ bool SetTexture(const std::string& name, int stage = 0); @@ -973,19 +985,19 @@ public: //@{ //! Ambient color management void SetAmbientColor(const Color& color, int rank = 0); - Color GetAmbientColor(int rank = 0); + Color GetAmbientColor(int rank = 0); //@} //@{ //! Color management under water void SetWaterAddColor(const Color& color); - Color GetWaterAddColor(); + Color GetWaterAddColor(); //@} //@{ //! Management of the fog color void SetFogColor(const Color& color, int rank = 0); - Color GetFogColor(int rank = 0); + Color GetFogColor(int rank = 0); //@} //@{ @@ -1188,7 +1200,7 @@ protected: const Material& mat, int state); //! Create texture and add it to cache - Texture CreateTexture(const std::string &texName, const TextureCreateParams ¶ms); + Texture CreateTexture(const std::string &texName, const TextureCreateParams ¶ms, CImage* image = nullptr); //! Tests whether the given object is visible bool IsVisible(int objRank); @@ -1291,8 +1303,6 @@ protected: int m_statisticTriangle; bool m_updateGeometry; int m_alphaMode; - bool m_stateColor; - bool m_forceStateColor; bool m_groundSpotVisible; bool m_shadowVisible; bool m_dirty; |