aboutsummaryrefslogtreecommitdiff
path: root/builtin
ModeNameSize
-rw-r--r--auth.lua5626logplain
-rw-r--r--builtin.lua1174logplain
-rw-r--r--chatcommands.lua22607logplain
-rw-r--r--deprecated.lua1483logplain
-rw-r--r--detached_inventory.lua536logplain
-rw-r--r--falling.lua5015logplain
-rw-r--r--features.lua622logplain
-rw-r--r--item.lua13786logplain
-rw-r--r--item_entity.lua3286logplain
-rw-r--r--misc.lua2669logplain
-rw-r--r--misc_helpers.lua2214logplain
-rw-r--r--misc_register.lua10033logplain
-rw-r--r--privileges.lua1740logplain
-rw-r--r--serialize.lua7856logplain
-rw-r--r--static_spawn.lua915logplain
id='n233' href='#n233'>233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "light.h"

#if 1
// Middle-raised variation of a_n+1 = a_n * 0.786
// Length of LIGHT_MAX+1 means LIGHT_MAX is the last value.
// LIGHT_SUN is read as LIGHT_MAX from here.
u8 light_decode_table[LIGHT_MAX+1] = 
{
8,
11+2,
14+7,
18+10,
22+15,
29+20,
37+20,
47+15,
60+10,
76+7,
97+5,
123+2,
157,
200,
255,
};
#endif

#if 0
/*
Made using this and:
- adding 220 as the second last one
- replacing the third last one (212) with 195

#!/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