diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-14 21:41:30 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:42 +0200 |
commit | c6fd2986d4261cf742d3bc21e8c12be59ab89f95 (patch) | |
tree | ef6ce8210f7f017bce42a024b75a44e73b5ab139 /src/gamedef.h | |
parent | abceeee92f99b84ebb79968269835a4f509bfb90 (diff) | |
download | minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.gz minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.bz2 minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.zip |
GameDef compiles
Diffstat (limited to 'src/gamedef.h')
-rw-r--r-- | src/gamedef.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gamedef.h b/src/gamedef.h index 86fd1e80f..79f5d188e 100644 --- a/src/gamedef.h +++ b/src/gamedef.h @@ -21,9 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #define GAMEDEF_HEADER class IToolDefManager; -class INodeDefManager; //TODO +class INodeDefManager; //class IItemDefManager; //TODO // Mineral too? +class ITextureSource; /* An interface for fetching game-global definitions like tool and @@ -33,9 +34,20 @@ class INodeDefManager; //TODO class IGameDef { public: + // These are thread-safe IF they are not edited while running threads. + // Thus, first they are set up and then they are only read. virtual IToolDefManager* getToolDefManager()=0; virtual INodeDefManager* getNodeDefManager()=0; //virtual IItemDefManager* getItemDefManager()=0; + + // This is always thread-safe, but referencing the irrlicht texture + // pointers in other threads than main thread will make things explode. + virtual ITextureSource* getTextureSource()=0; + + // Shorthands + IToolDefManager* tdef(){return getToolDefManager();} + INodeDefManager* ndef(){return getNodeDefManager();} + ITextureSource* tsrc(){return getTextureSource();} }; #endif |