Module Baking light and the built level
#include <macawlevel.h>Baking light works out how the level's lamps, glowing faces and sky light every surface, bounces and shadows included, and keeps the result. It takes a while, so it's done a step at a time. These calls need a built level.
Functions
- levelbake
- Starts baking a level's light.
- levelbakestep
- Bakes for a little while.
- levellightdata
- Gives a level's baked light as bytes, to save in its
.litfile. - levelsetlight
- Puts baked light back on a level, from bytes
levellightdatagave or a.litfile holds. - levelunbake
- Takes a level's baked light off, back to plain shading.
- levelsetsky
- Puts a sky round a level, from six square pictures, or takes it away.
- levelfacecount
- Tells you how many faces the built level has.
- levelface
- Gives one face of the built level: its corners, its texture and which way it faces.
- levelstat
- Gives a number about the built level, such as
"faces","leaves","portals","luxels"(patches of baked light),"baked"(1 if it's lit),"drawn"(faces drawn last time),"shiny"(shiny faces) or"probes"(cube maps it's been given).