reorganized stuff
authorPerttu Ahola <celeron55@gmail.com>
Sun, 26 Jun 2011 15:51:57 +0000 (18:51 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 26 Jun 2011 15:51:57 +0000 (18:51 +0300)
src/main.cpp
src/main.h
src/map.cpp
src/mineral.h

index 9c7cf2e28b85c12666e8e1f167db61e492019803..9fb17e2112c74db887615684ecf3a0c36bb7ddcf 100644 (file)
@@ -427,6 +427,7 @@ TODO: Use MapBlock::resetUsageTimer() in appropriate places
 #include "materials.h"\r
 #include "game.h"\r
 #include "keycode.h"\r
+#include "tile.h"\r
 \r
 // This makes textures\r
 ITextureSource *g_texturesource = NULL;\r
index 450525c26e2d53f37433f2e3ad1c6eefdabed259..b2dee149469e5bbcc84cd94b7debfad7de347322 100644 (file)
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 extern Settings g_settings;
 
 // This makes and maps textures
-#include "tile.h"
+class ITextureSource;
 extern ITextureSource *g_texturesource;
 
 // Global profiler
index a20cd9910e45952aed21ab91cda324bc58f30860..5bf278667f8ea136a05411569fe18c8f894a9961 100644 (file)
@@ -755,6 +755,25 @@ void Map::updateLighting(enum LightBank bank,
 
                }
        }
+       
+       /*
+               Enable this to disable proper lighting for speeding up map
+               generation for testing or whatever
+       */
+#if 0
+       //if(g_settings.get(""))
+       {
+               core::map<v3s16, MapBlock*>::Iterator i;
+               i = blocks_to_update.getIterator();
+               for(; i.atEnd() == false; i++)
+               {
+                       MapBlock *block = i.getNode()->getValue();
+                       v3s16 p = block->getPos();
+                       block->setLightingExpired(false);
+               }
+               return;
+       }
+#endif
 
 #if 0
        {
index 970ff1f7868773a1cf2d194a0bc085d609eb4d5c..61776e669c5d7711f4af23aec4c73a16ead74db6 100644 (file)
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MINERAL_HEADER
 
 #include "inventory.h"
-#include "tile.h"
 
 /*
        Minerals