summaryrefslogtreecommitdiff
path: root/src/light.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-26 15:38:42 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-26 15:38:42 +0300
commitffb1128951638fb462fe1e24aa2963aab6246b07 (patch)
treef83596d4e7f3a509c255c87a2f42b8f497fb0e1b /src/light.cpp
parent664eb4f7c58cf9d879e9435a207da2e5f80fe9bc (diff)
downloadminetest-ffb1128951638fb462fe1e24aa2963aab6246b07.tar.gz
minetest-ffb1128951638fb462fe1e24aa2963aab6246b07.tar.bz2
minetest-ffb1128951638fb462fe1e24aa2963aab6246b07.zip
tested out and commented out some new stuff for the terrain generator, to be used in the future.
Diffstat (limited to 'src/light.cpp')
-rw-r--r--src/light.cpp64
1 files changed, 43 insertions, 21 deletions
diff --git a/src/light.cpp b/src/light.cpp
index 5dade2e16..f214d6ea0 100644
--- a/src/light.cpp
+++ b/src/light.cpp
@@ -19,27 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "light.h"
-// This is reasonable with classic lighting with a light source
-/*u8 light_decode_table[LIGHT_MAX+1] =
-{
-2,
-3,
-4,
-6,
-9,
-13,
-18,
-25,
-32,
-35,
-45,
-57,
-69,
-79,
-255
-};*/
-
-
+#if 1
// This is good
// a_n+1 = a_n * 0.786
// Length of LIGHT_MAX+1 means LIGHT_MAX is the last value.
@@ -62,6 +42,48 @@ u8 light_decode_table[LIGHT_MAX+1] =
200,
255,
};
+#else
+// Use for debugging in dark
+u8 light_decode_table[LIGHT_MAX+1] =
+{
+58,
+64,
+72,
+80,
+88,
+98,
+109,
+121,
+135,
+150,
+167,
+185,
+206,
+229,
+255,
+};
+#endif
+
+// This is reasonable with classic lighting with a light source
+/*u8 light_decode_table[LIGHT_MAX+1] =
+{
+2,
+3,
+4,
+6,
+9,
+13,
+18,
+25,
+32,
+35,
+45,
+57,
+69,
+79,
+255
+};*/
+
// As in minecraft, a_n+1 = a_n * 0.8
// NOTE: This doesn't really work that well because this defines