Skip to main content

Module lighting

Module lighting 

Source
Expand description

Lights: named recipes for shading pictures, read from a RON file of name: (grey: 0.35, tint: (0.62, 0.56, 0.46)) entries. Look data only: a game’s rules never see it. As a format (ADR-0007): LightingRon.

Structs§

Light
One light: how a picture’s colours change in it. Each pixel goes grey of the way to its own grey, then its red, green and blue are multiplied by tint. The numbers are thousandths (0 to 1000), so a light is a plain value a frame item can carry and compare.
Lighting
Every light, by name.
LightingRon
A lights’ file (lights, .ron), checked as from_source says, with the light a map that names none is in.

Functions§

from_source
Parses lights’ file source, attributing errors to file. Every number must be from 0 to 1, and there must be a light called default: the light of a map that names none. Reports every problem found.