Macaw OS C reference

Function savelevel

#include <macawlevel.h>
int savelevel(int level, const char *path);

Writes a level's table to a .lvl file, which Brushwork can open. It doesn't save the baked light: levellightdata gives you that to keep yourself. Brush corners are written to 4 significant figures and entity numbers to 6, so keep your sizes simple.

Parameters

levelint
The level to save.
pathconst char *
The file to write, usually ending in .lvl.

Returns int

1 if it was saved, or 0 if it couldn't be (levelerror says why).

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