aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-14 00:19:48 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:41 +0200
commitabceeee92f99b84ebb79968269835a4f509bfb90 (patch)
tree669edeca68fae4eb086ac4e4c1846b55d3aa779d /src/main.cpp
parent5fc791ac9a15ea6f234ca2d23041c83679255746 (diff)
downloadminetest-abceeee92f99b84ebb79968269835a4f509bfb90.tar.gz
minetest-abceeee92f99b84ebb79968269835a4f509bfb90.tar.bz2
minetest-abceeee92f99b84ebb79968269835a4f509bfb90.zip
Create framework for getting rid of global definitions of node/tool/item/whatever types
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6b0cc1f83..63dc94955 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -385,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
@@ -437,9 +437,6 @@ Doing currently:
#include "mapnode_contentfeatures.h" // For init_contentfeatures
#include "content_mapnode.h" // For content_mapnode_init
-// This makes textures
-ITextureSource *g_texturesource = NULL;
-
/*
Settings.
These are loaded from the config file.
@@ -1275,11 +1272,11 @@ int main(int argc, char *argv[])
These are needed for unit tests at least.
*/
- // 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
+ // Initialize content feature table without textures
+ init_contentfeatures(NULL);
+ // Initialize mapnode content without textures
+ content_mapnode_init(NULL);
+ // Must be called before texturesource is created
// (for texture atlas making)
init_mineral();
@@ -1430,9 +1427,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,13 +1472,6 @@ int main(int argc, char *argv[])
skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255,0,0,0));
/*
- Preload some textures and stuff
- */
-
- // Initialize mapnode content with textures (with g_texturesource!=NULL)
- content_mapnode_init();
-
- /*
GUI stuff
*/
@@ -1657,12 +1644,6 @@ int main(int argc, char *argv[])
if(device->run() == false)
break;
- // Initialize mapnode again to enable changed graphics settings
- // Initialize content feature table
- init_contentfeatures();
- // Initialize mapnode content with textures (with g_texturesource!=NULL)
- content_mapnode_init();
-
/*
Run game
*/