diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-14 22:07:42 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:42 +0200 |
commit | 1afed48a2c90548e0b420c9c3d7d4af9e0734d1d (patch) | |
tree | d485510b3eaa0b4fcc2aa4a4cf336da025003bfd /src/nodedef.cpp | |
parent | c6fd2986d4261cf742d3bc21e8c12be59ab89f95 (diff) | |
download | minetest-1afed48a2c90548e0b420c9c3d7d4af9e0734d1d.tar.gz minetest-1afed48a2c90548e0b420c9c3d7d4af9e0734d1d.tar.bz2 minetest-1afed48a2c90548e0b420c9c3d7d4af9e0734d1d.zip |
Make possible and do update textures in node definitions after late texture atlas making
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 74d825362..7b723e958 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -164,6 +164,21 @@ public: assert(c <= MAX_CONTENT); return &m_content_features[c]; } + virtual void updateTextures(ITextureSource *tsrc) + { +#ifndef SERVER + infostream<<"CNodeDefManager::updateTextures(): Updating " + <<"textures in node definitions"<<std::endl; + for(u16 i=0; i<=MAX_CONTENT; i++) + { + ContentFeatures *f = &m_content_features[i]; + for(u16 j=0; j<6; j++) + tsrc->updateAP(f->tiles[j].texture); + if(f->special_atlas) + tsrc->updateAP(*(f->special_atlas)); + } +#endif + } private: ContentFeatures m_content_features[MAX_CONTENT+1]; }; |