Macaw OS C reference

Function openlevel

#include <macawlevel.h>
int openlevel(const char *path);

Reads a .lvl file, builds it, and puts on its baked light from the .lit file next to it (and its baked probes from the .prb file, if the light went on). This is the usual way to start: the level is ready to draw and bump into straight away.

Parameters

pathconst char *
The level's file name, like "/system/maps/sample.lvl".

Returns int

The level's number, or 0 if it couldn't be opened (levelerror says why).

In Opening, saving and building, with loadlevel, newlevel, savelevel, buildlevel, freelevel, levelerror, levelbuilt, levellit, levelpath, levellitpath, levelprobepath.