Function levelbake
#include <macawlevel.h>int levelbake(
int level,
const levellightinfo *lights,
int n,
double ambient,
double bounce,
double softness
);
Starts baking a level's light. Then call levelbakestep until it's done.
Parameters
levelint- The level to bake.
lightsconst levellightinfo *- An array of
levellightinfo(see The structs), or NULL for the level's own lamps and area lights. nint- How many lights are in
lights. ambientdouble- The light everywhere, even in shadow; less than 0 for the level's setting (or 0.08).
bouncedouble- How much light bounces off surfaces; less than 0 for the level's setting (or 1).
softnessdouble- The size of lamps that don't give one, so how soft their shadows are; less than 0 for 0.35.
Returns int
1 if baking has started, or 0 if it couldn't (levelerror says why, such as a level too big to light).
In Baking light and the built level, with levelbakestep, levellightdata, levelsetlight, levelunbake, levelsetsky, levelfacecount, levelface, levelstat.