Improve glass
[oweals/minetest.git] / src / main.cpp
index b959d8c6433eb47cace7361eab82dab9ee67d4c2..c94e903a55840b0a1108c908b62c5bea6d586a11 100644 (file)
@@ -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:
 ------------------------
  
@@ -390,11 +385,11 @@ Doing currently:
 */
 
 #ifdef NDEBUG
-       #ifdef _WIN32
+       /*#ifdef _WIN32
                #pragma message ("Disabling unit tests")
        #else
                #warning "Disabling unit tests"
-       #endif
+       #endif*/
        // Disable unit tests
        #define ENABLE_TESTS 0
 #else
@@ -439,9 +434,8 @@ Doing currently:
 #include "settings.h"
 #include "profiler.h"
 #include "log.h"
-
-// This makes textures
-ITextureSource *g_texturesource = NULL;
+#include "nodedef.h" // For init_contentfeatures
+#include "content_mapnode.h" // For content_mapnode_init
 
 /*
        Settings.
@@ -1278,9 +1272,7 @@ int main(int argc, char *argv[])
                These are needed for unit tests at least.
        */
        
-       // Initial call with g_texturesource not set.
-       init_mapnode();
-       // Must be called before g_texturesource is created
+       // Must be called before texturesource is created
        // (for texture atlas making)
        init_mineral();
 
@@ -1431,9 +1423,6 @@ int main(int argc, char *argv[])
        // Create game callback for menus
        g_gamecallback = new MainGameCallback(device);
        
-       // Create texture source
-       g_texturesource = new TextureSource(device);
-
        /*
                Speed tests (done after irrlicht is loaded to get timer)
        */
@@ -1478,12 +1467,6 @@ int main(int argc, char *argv[])
        skin->setColor(gui::EGDC_3D_HIGH_LIGHT, video::SColor(255,0,0,0));
        skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255,0,0,0));
        
-       /*
-               Preload some textures and stuff
-       */
-
-       init_mapnode(); // Second call with g_texturesource set
-
        /*
                GUI stuff
        */
@@ -1657,9 +1640,6 @@ int main(int argc, char *argv[])
                        if(device->run() == false)
                                break;
                        
-                       // Initialize mapnode again to enable changed graphics settings
-                       init_mapnode();
-
                        /*
                                Run game
                        */