aboutsummaryrefslogtreecommitdiff
path: root/src/mineral.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-01-28 01:38:16 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-01-28 01:38:16 +0200
commit64b59757322e29c331c0a75262baec4382673e6f (patch)
treeb1404f42db92b92202655bdd4f13a6c4c7fdd39d /src/mineral.h
parentbd100c5483eb77a27eeac4e476c81a1bf6afc710 (diff)
downloadminetest-64b59757322e29c331c0a75262baec4382673e6f.tar.gz
minetest-64b59757322e29c331c0a75262baec4382673e6f.tar.bz2
minetest-64b59757322e29c331c0a75262baec4382673e6f.zip
Now texture handling is fast. Also now players are saved on disk.
Diffstat (limited to 'src/mineral.h')
-rw-r--r--src/mineral.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/mineral.h b/src/mineral.h
index e43e48ab8..aa0902e12 100644
--- a/src/mineral.h
+++ b/src/mineral.h
@@ -21,6 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MINERAL_HEADER
#include "inventory.h"
+#include "texture.h"
+#include "irrlichtwrapper.h"
/*
Minerals
@@ -29,22 +31,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
type param.
*/
+// Caches textures
+void init_mineral(IrrlichtWrapper *irrlicht);
+
#define MINERAL_NONE 0
#define MINERAL_COAL 1
#define MINERAL_IRON 2
-inline const char * mineral_block_texture(u8 mineral)
-{
- switch(mineral)
- {
- case MINERAL_COAL:
- return "mineral_coal.png";
- case MINERAL_IRON:
- return "mineral_iron.png";
- default:
- return "";
- }
-}
+#define MINERAL_COUNT 3
+
+textureid_t mineral_block_texture(u8 mineral);
inline CraftItem * getDiggedMineralItem(u8 mineral)
{