summaryrefslogtreecommitdiff
path: root/src/voxel.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-01-24 16:36:58 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-01-24 16:36:58 +0200
commit3909e712a012c11793effc408fd348e438a9ac5b (patch)
tree237daebc0dd1e7053af50962d01d05a5630cff8e /src/voxel.h
parent87554408ca667bfb86a6472d4835a893e457c0ba (diff)
downloadminetest-3909e712a012c11793effc408fd348e438a9ac5b.tar.gz
minetest-3909e712a012c11793effc408fd348e438a9ac5b.tar.bz2
minetest-3909e712a012c11793effc408fd348e438a9ac5b.zip
Faster lighting at map generation time
Diffstat (limited to 'src/voxel.h')
-rw-r--r--src/voxel.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/voxel.h b/src/voxel.h
index c377dfe7a..80d292891 100644
--- a/src/voxel.h
+++ b/src/voxel.h
@@ -323,7 +323,11 @@ public:
emerge(p);
return !(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT);
}*/
- // These are a bit slow and shouldn't be used internally
+
+ /*
+ These are a bit slow and shouldn't be used internally.
+ Use m_data[m_area.index(p)] instead.
+ */
MapNode getNode(v3s16 p)
{
emerge(p);
@@ -396,7 +400,17 @@ public:
*/
void clearFlag(u8 flag);
-
+
+ void unspreadLight(enum LightBank bank, v3s16 p, u8 oldlight,
+ core::map<v3s16, bool> & light_sources);
+ void unspreadLight(enum LightBank bank,
+ core::map<v3s16, u8> & from_nodes,
+ core::map<v3s16, bool> & light_sources);
+
+ void spreadLight(enum LightBank bank, v3s16 p);
+ void spreadLight(enum LightBank bank,
+ core::map<v3s16, bool> & from_nodes);
+
#if 0
// VOXELFLAG_CHECKED2s must usually be cleared before calling
// -1: dead end, 0-255: pressure