summaryrefslogtreecommitdiff
path: root/src/light.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-18 13:10:37 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-18 13:10:37 +0200
commit15a43c5ed02130f1b1e07a0385530da197b0c846 (patch)
tree94851572e9e711dd5c5f5d6ef2e84680166de35b /src/light.cpp
parent385dd9917fd4ced23a704f0566779d58f5a6b727 (diff)
downloadminetest-15a43c5ed02130f1b1e07a0385530da197b0c846.tar.gz
minetest-15a43c5ed02130f1b1e07a0385530da197b0c846.tar.bz2
minetest-15a43c5ed02130f1b1e07a0385530da197b0c846.zip
before adding day/night lighting
--HG-- rename : data/light.png => data/cloud.png
Diffstat (limited to 'src/light.cpp')
-rw-r--r--src/light.cpp112
1 files changed, 33 insertions, 79 deletions
diff --git a/src/light.cpp b/src/light.cpp
index a9fe023ef..03821a672 100644
--- a/src/light.cpp
+++ b/src/light.cpp
@@ -19,49 +19,45 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "light.h"
-/*
-
-#!/usr/bin/python
-
-from math import *
-from sys import stdout
-
-# We want 0 at light=0 and 255 at light=LIGHT_MAX
-LIGHT_MAX = 15
-
-L = []
-for i in range(1,LIGHT_MAX+1):
- L.append(int(round(255.0 * 0.69 ** (i-1))))
- L.append(0)
-
-L.reverse()
-for i in L:
- stdout.write(str(i)+",\n")
-
-*/
-
-/*
- The first value should be 0, the last value should be 255.
-*/
+// LIGHT_MAX is 15, 0-15 is 16 values
/*u8 light_decode_table[LIGHT_MAX+1] =
{
0,
-2,
-3,
-4,
-6,
9,
-13,
-19,
-28,
-40,
-58,
-84,
-121,
-176,
+12,
+14,
+16,
+20,
+26,
+34,
+45,
+61,
+81,
+108,
+143,
+191,
255,
};*/
+u8 light_decode_table[LIGHT_MAX+1] =
+{
+0,
+5,
+12,
+22,
+35,
+50,
+65,
+85,
+100,
+120,
+140,
+160,
+185,
+215,
+255,
+};
+#if 0
/*
#!/usr/bin/python
@@ -100,48 +96,6 @@ u8 light_decode_table[LIGHT_MAX+1] =
191,
255,
};
-
-/*
-#!/usr/bin/python
-
-from math import *
-from sys import stdout
-
-# We want 0 at light=0 and 255 at light=LIGHT_MAX
-LIGHT_MAX = 14
-#FACTOR = 0.69
-FACTOR = 0.75
-
-maxlight = 255
-minlight = 8
-
-L = []
-for i in range(1,LIGHT_MAX+1):
- L.append(minlight+int(round((maxlight-minlight) * FACTOR ** (i-1))))
- #L.append(int(round(255.0 * FACTOR ** (i-1))))
-L.append(minlight)
-
-L.reverse()
-for i in L:
- stdout.write(str(i)+",\n")
-*/
-/*u8 light_decode_table[LIGHT_MAX+1] =
-{
-8,
-14,
-16,
-18,
-22,
-27,
-33,
-41,
-52,
-67,
-86,
-112,
-147,
-193,
-255,
-};*/
+#endif