Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API
[oweals/minetest.git] / src / clientmap.h
index 29ebed15988d94488df41634b648a69ba2296a8b..7f63704d3cb9f30188d0ebb18e562df2c7be2143 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Minetest-c55
-Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_extrabloated.h"
 #include "map.h"
+#include <set>
+#include <map>
 
 struct MapDrawControl
 {
@@ -113,7 +115,8 @@ public:
        {
                return m_box;
        }
-
+       
+       void updateDrawList(video::IVideoDriver* driver);
        void renderMap(video::IVideoDriver* driver, s32 pass);
 
        int getBackgroundBrightness(float max_d, u32 daylight_factor,
@@ -127,7 +130,7 @@ public:
        // Check if sector was drawn on last render()
        bool sectorWasDrawn(v2s16 p)
        {
-               return (m_last_drawn_sectors.find(p) != NULL);
+               return (m_last_drawn_sectors.find(p) != m_last_drawn_sectors.end());
        }
        
 private:
@@ -141,8 +144,10 @@ private:
        v3f m_camera_direction;
        f32 m_camera_fov;
        JMutex m_camera_mutex;
+
+       std::map<v3s16, MapBlock*> m_drawlist;
        
-       core::map<v2s16, bool> m_last_drawn_sectors;
+       std::set<v2s16> m_last_drawn_sectors;
 };
 
 #endif