summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-13 10:57:55 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:40 +0200
commit64996422c00ddb70cfc8aee7da7b62485b8b0416 (patch)
treefdaa59ba3c52069f8935cf5d8d1cd63752edb149 /src/main.cpp
parentf8c9b703798873c6e958560341105069dca8f86c (diff)
downloadminetest-64996422c00ddb70cfc8aee7da7b62485b8b0416.tar.gz
minetest-64996422c00ddb70cfc8aee7da7b62485b8b0416.tar.bz2
minetest-64996422c00ddb70cfc8aee7da7b62485b8b0416.zip
Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuff
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b959d8c64..6b0cc1f83 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -365,11 +365,6 @@ SUGG: Restart irrlicht completely when coming back to main menu from game.
TODO: Merge bahamada's audio stuff (clean patch available)
-TODO: Move content_features to mapnode_content_features.{h,cpp} or so
-
-TODO: Fix item use() stuff; dropping a stack of cooked rats and eating
- it gives 3 hearts and consumes all the rats.
-
Making it more portable:
------------------------
@@ -439,6 +434,8 @@ Doing currently:
#include "settings.h"
#include "profiler.h"
#include "log.h"
+#include "mapnode_contentfeatures.h" // For init_contentfeatures
+#include "content_mapnode.h" // For content_mapnode_init
// This makes textures
ITextureSource *g_texturesource = NULL;
@@ -1278,8 +1275,10 @@ int main(int argc, char *argv[])
These are needed for unit tests at least.
*/
- // Initial call with g_texturesource not set.
- init_mapnode();
+ // Initialize content feature table
+ init_contentfeatures();
+ // Initialize mapnode content without textures (with g_texturesource=NULL)
+ content_mapnode_init();
// Must be called before g_texturesource is created
// (for texture atlas making)
init_mineral();
@@ -1482,7 +1481,8 @@ int main(int argc, char *argv[])
Preload some textures and stuff
*/
- init_mapnode(); // Second call with g_texturesource set
+ // Initialize mapnode content with textures (with g_texturesource!=NULL)
+ content_mapnode_init();
/*
GUI stuff
@@ -1658,7 +1658,10 @@ int main(int argc, char *argv[])
break;
// Initialize mapnode again to enable changed graphics settings
- init_mapnode();
+ // Initialize content feature table
+ init_contentfeatures();
+ // Initialize mapnode content with textures (with g_texturesource!=NULL)
+ content_mapnode_init();
/*
Run game