diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-13 03:19:12 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-13 03:19:12 +0200 |
commit | 571fb14f9480a0fd70d7cfeb0484c9513153c33a (patch) | |
tree | 64601662d351d986fbadaef2c410c90a38241634 /src/light.cpp | |
parent | 47a593b5197393d8f8cdfe18b1aa46b8bc1f3fb6 (diff) | |
download | minetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.tar.gz minetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.tar.bz2 minetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.zip |
working nicely
Diffstat (limited to 'src/light.cpp')
-rw-r--r-- | src/light.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/light.cpp b/src/light.cpp index 5fd0ce54f..a9fe023ef 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -101,4 +101,47 @@ u8 light_decode_table[LIGHT_MAX+1] = 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, +};*/ + |