Improve glass
[oweals/minetest.git] / src / tile.h
index ac4e790b43e86523e08f3589ae1eb9d412206241..23849ca1fcc382258797be30e1e321947efea598 100644 (file)
@@ -93,34 +93,6 @@ struct AtlasPointer
        float y1(){ return pos.Y + size.Y; }
 };
 
-/*
-       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.
 */
@@ -138,6 +110,7 @@ public:
                {return AtlasPointer(0);}
        virtual video::ITexture* getTextureRaw(const std::string &name)
                {return NULL;}
+       virtual void updateAP(AtlasPointer &ap){};
 };
 
 class IWritableTextureSource : public ITextureSource
@@ -153,10 +126,12 @@ public:
                {return AtlasPointer(0);}
        virtual video::ITexture* getTextureRaw(const std::string &name)
                {return NULL;}
+       virtual void updateAP(AtlasPointer &ap){};
 
-       virtual void updateAP(AtlasPointer &ap)=0;
-       virtual void buildMainAtlas(class IGameDef *gamedef)=0;
        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;
 };
 
 IWritableTextureSource* createTextureSource(IrrlichtDevice *device);