3 Copyright (C) 2010 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 General Public License as published by
7 the Free Software Foundation; either version 2 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 General Public License for more details.
15 You should have received a copy of the GNU 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.
27 from sys import stdout
29 # We want 0 at light=0 and 255 at light=LIGHT_MAX
33 for i in range(1,LIGHT_MAX+1):
34 L.append(int(round(255.0 * 0.69 ** (i-1))))
39 stdout.write(str(i)+",\n")
44 The first value should be 0, the last value should be 255.
46 /*u8 light_decode_table[LIGHT_MAX+1] =
69 from sys import stdout
71 # We want 0 at light=0 and 255 at light=LIGHT_MAX
77 for i in range(1,LIGHT_MAX+1):
78 L.append(int(round(255.0 * FACTOR ** (i-1))))
83 stdout.write(str(i)+",\n")
85 u8 light_decode_table[LIGHT_MAX+1] =
108 from sys import stdout
110 # We want 0 at light=0 and 255 at light=LIGHT_MAX
119 for i in range(1,LIGHT_MAX+1):
120 L.append(minlight+int(round((maxlight-minlight) * FACTOR ** (i-1))))
121 #L.append(int(round(255.0 * FACTOR ** (i-1))))
126 stdout.write(str(i)+",\n")
128 /*u8 light_decode_table[LIGHT_MAX+1] =