diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-15 13:13:18 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:43 +0200 |
commit | 01ae0daea501f47ec56a8368e530cb4176fc44cd (patch) | |
tree | e96893df69b86481dcc6d36d613d4b67e72c205f /src/tile.h | |
parent | 45fc45a49e61c61646b9997840e92f25bb8ccde9 (diff) | |
download | hax-minetest-server-01ae0daea501f47ec56a8368e530cb4176fc44cd.tar.gz hax-minetest-server-01ae0daea501f47ec56a8368e530cb4176fc44cd.zip |
Properly update textures in node definitions
Diffstat (limited to '')
-rw-r--r-- | src/tile.h | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/tile.h b/src/tile.h index 17ba74e33..23849ca1f 100644 --- a/src/tile.h +++ b/src/tile.h @@ -94,34 +94,6 @@ struct AtlasPointer }; /* - An internal variant of the former with more data. -*/ -struct SourceAtlasPointer -{ - std::string name; - AtlasPointer a; - video::IImage *atlas_img; // The source image of the atlas - // Integer variants of position and size - v2s32 intpos; - v2u32 intsize; - - SourceAtlasPointer( - const std::string &name_, - AtlasPointer a_=AtlasPointer(0, NULL), - video::IImage *atlas_img_=NULL, - v2s32 intpos_=v2s32(0,0), - v2u32 intsize_=v2u32(0,0) - ): - name(name_), - a(a_), - atlas_img(atlas_img_), - intpos(intpos_), - intsize(intsize_) - { - } -}; - -/* TextureSource creates and caches textures. */ @@ -157,9 +129,9 @@ public: virtual void updateAP(AtlasPointer &ap){}; virtual void processQueue()=0; + virtual void insertSourceImage(const std::string &name, video::IImage *img)=0; + virtual void rebuildImagesAndTextures()=0; virtual void buildMainAtlas(class IGameDef *gamedef)=0; - // img is eaten, do not drop it - virtual void insertImage(const std::string &name, video::IImage *img)=0; }; IWritableTextureSource* createTextureSource(IrrlichtDevice *device); |