-
-struct TextureMod
-{
- /*
- Returns a new texture which can be based on the original.
- Shall not modify or delete the original texture.
- */
- virtual video::ITexture * make(video::ITexture *original,
- const char *newname, video::IVideoDriver* driver) = 0;
-};
-
-struct CrackTextureMod: public TextureMod
-{
- CrackTextureMod(u16 a_progression)
- {
- progression = a_progression;
- }
-
- virtual video::ITexture * make(video::ITexture *original,
- const char *newname, video::IVideoDriver* driver);
-
- u16 progression;
-};
-
-struct ProgressBarTextureMod: public TextureMod
-{
- // value is from 0.0 to 1.0
- ProgressBarTextureMod(float a_value)
- {
- value = a_value;
- }
-
- virtual video::ITexture * make(video::ITexture *original,
- const char *newname, video::IVideoDriver* driver);
-
- float value;
-};
-
-/*
- A class for specifying a requested texture
-*/
-struct TextureSpec
-{
- TextureSpec()
- {
- mod = NULL;
- }
- TextureSpec(const std::string &a_name, const std::string &a_path,
- TextureMod *a_mod)
- {
- name = a_name;
- path = a_path;
- mod = a_mod;;
- }
- ~TextureSpec()
- {
- }
- bool operator==(const TextureSpec &other)
- {
- return name == other.name;
- }
- // An unique name for the texture. Usually the same as the path.
- // Note that names and paths reside the same namespace.
- std::string name;
- // This is the path of the base texture
- std::string path;
- // Modification to do to the base texture
- // NOTE: This is deleted by the one who processes the request
- TextureMod *mod;
-};