diff options
Diffstat (limited to 'src/tile.h')
-rw-r--r-- | src/tile.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tile.h b/src/tile.h index 29c6b69f2..f3250669e 100644 --- a/src/tile.h +++ b/src/tile.h @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <IrrlichtDevice.h> #include "threads.h" #include <string> +#include <map> class IGameDef; @@ -106,6 +107,7 @@ public: virtual bool isKnownSourceImage(const std::string &name)=0; virtual video::ITexture* generateTextureFromMesh( const TextureFromMeshParams ¶ms)=0; + virtual video::ITexture* getNormalTexture(const std::string &name)=0; }; class IWritableTextureSource : public ITextureSource @@ -127,6 +129,7 @@ public: virtual void processQueue()=0; virtual void insertSourceImage(const std::string &name, video::IImage *img)=0; virtual void rebuildImagesAndTextures()=0; + virtual video::ITexture* getNormalTexture(const std::string &name)=0; }; IWritableTextureSource* createTextureSource(IrrlichtDevice *device); @@ -175,11 +178,25 @@ enum MaterialType{ This fully defines the looks of a tile. The SMaterial of a tile is constructed according to this. */ +struct FrameSpec +{ + FrameSpec(): + texture_id(0), + texture(NULL), + normal_texture(NULL) + { + } + u32 texture_id; + video::ITexture *texture; + video::ITexture *normal_texture; +}; + struct TileSpec { TileSpec(): texture_id(0), texture(NULL), + normal_texture(NULL), alpha(255), material_type(TILE_MATERIAL_BASIC), material_flags( @@ -243,6 +260,8 @@ struct TileSpec u32 texture_id; video::ITexture *texture; + video::ITexture *normal_texture; + // Vertex alpha (when MATERIAL_ALPHA_VERTEX is used) u8 alpha; // Material parameters @@ -252,6 +271,8 @@ struct TileSpec // Animation parameters u8 animation_frame_count; u16 animation_frame_length_ms; + std::map<u32, FrameSpec> frames; + u8 rotation; }; |