-#ifdef SERVER
- void setTexture(ITextureSource *tsrc, u16 i, std::string name,
- u8 alpha=255)
- {}
- void setAllTextures(ITextureSource *tsrc, std::string name, u8 alpha=255)
- {}
-#else
- void setTexture(ITextureSource *tsrc,
- u16 i, std::string name, u8 alpha=255);
-
- void setAllTextures(ITextureSource *tsrc,
- std::string name, u8 alpha=255)
- {
- for(u16 i=0; i<6; i++)
- {
- setTexture(tsrc, i, name, alpha);
- }
- // Force inventory texture too
- setInventoryTexture(name, tsrc);
- }
-#endif
-
-#ifndef SERVER
- void setTile(u16 i, const TileSpec &tile)
- { tiles[i] = tile; }
- void setAllTiles(const TileSpec &tile)
- { for(u16 i=0; i<6; i++) setTile(i, tile); }
-#endif
-
-#ifdef SERVER
- void setInventoryTexture(std::string imgname,
- ITextureSource *tsrc)
- {}
- void setInventoryTextureCube(std::string top,
- std::string left, std::string right, ITextureSource *tsrc)
- {}
-#else
- void setInventoryTexture(std::string imgname, ITextureSource *tsrc);
-
- void setInventoryTextureCube(std::string top,
- std::string left, std::string right, ITextureSource *tsrc);
-#endif
+ ContentFeatures();
+ ~ContentFeatures();
+ void reset();
+ void serialize(std::ostream &os, u16 protocol_version);
+ void deSerialize(std::istream &is);
+ void serializeOld(std::ostream &os, u16 protocol_version);
+ void deSerializeOld(std::istream &is, int version);