3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 // Middle-raised variation of a_n+1 = a_n * 0.786
24 // Length of LIGHT_MAX+1 means LIGHT_MAX is the last value.
25 // LIGHT_SUN is read as LIGHT_MAX from here.
26 u8 light_decode_table[LIGHT_MAX+1] =
49 - adding 220 as the second last one
50 - replacing the third last one (212) with 195
55 from sys import stdout
57 # We want 0 at light=0 and 255 at light=LIGHT_MAX
62 START_FROM_ZERO = False
66 for i in range(1,LIGHT_MAX+1):
67 L.append(int(round(255.0 * FACTOR ** (i-1))))
70 for i in range(1,LIGHT_MAX+1):
71 L.append(int(round(255.0 * FACTOR ** (i-1))))
76 stdout.write(str(i)+",\n")
78 u8 light_decode_table[LIGHT_MAX+1] =
100 // a_n+1 = a_n * 0.786
101 // Length of LIGHT_MAX+1 means LIGHT_MAX is the last value.
102 // LIGHT_SUN is read as LIGHT_MAX from here.
103 u8 light_decode_table[LIGHT_MAX+1] =
124 // Use for debugging in dark
125 u8 light_decode_table[LIGHT_MAX+1] =
145 // This is reasonable with classic lighting with a light source
146 /*u8 light_decode_table[LIGHT_MAX+1] =
166 // As in minecraft, a_n+1 = a_n * 0.8
167 // NOTE: This doesn't really work that well because this defines
168 // LIGHT_MAX as dimmer than LIGHT_SUN
169 // NOTE: Uh, this has had 34 left out; forget this.
170 /*u8 light_decode_table[LIGHT_MAX+1] =
189 // This was a quick try of more light, manually quickly made
190 /*u8 light_decode_table[LIGHT_MAX+1] =
209 // This was used for a long time, manually made
210 /*u8 light_decode_table[LIGHT_MAX+1] =
229 /*u8 light_decode_table[LIGHT_MAX+1] =
247 /*u8 light_decode_table[LIGHT_MAX+1] =
265 // LIGHT_MAX is 14, 0-14 is 15 values
266 /*u8 light_decode_table[LIGHT_MAX+1] =
290 from sys import stdout
292 # We want 0 at light=0 and 255 at light=LIGHT_MAX
298 for i in range(1,LIGHT_MAX+1):
299 L.append(int(round(255.0 * FACTOR ** (i-1))))
304 stdout.write(str(i)+",\n")
306 u8 light_decode_table[LIGHT_MAX+1] =