Macaw OS C reference

Function levelbakestep

#include <macawlevel.h>
int levelbakestep(
    int level,
    double ms,
    double *progress,
    char *what,
    int size
);

Bakes for a little while. Call it once a frame until it returns 1; then the level is lit.

Parameters

levelint
The level being baked.
msdouble
How long to bake for, in milliseconds (0 or less means 30).
progressdouble *
The address of a double for how far it's got, from 0 to 1, or NULL.
whatchar *
Where text saying what it's doing goes (like "bouncing light"), or NULL.
sizeint
How many bytes what holds.

Returns int

1 once the baking is done, or 0 while there's more to do.

In Baking light and the built level, with levelbake, levellightdata, levelsetlight, levelunbake, levelsetsky, levelfacecount, levelface, levelstat.