C reference / Levels / Opening, saving and building
Module Opening, saving and building #include <macawlevel.h>
Functions
openlevel 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). loadlevel Reads a .lvl file into a level table without building it. newlevel Makes an empty level, with no brushes or entities, for building from code. savelevel Writes a level's table to a .lvl file, which Brushwork can open. buildlevel Builds a level's table into a level that draws and collides. freelevel Lets go of a level and everything built for it. levelerror Gives the message from the last call that didn't work, such as a file that wasn't there. levelbuilt Tells you whether a level has been built, so whether it can draw and collide yet. levellit Tells you whether a level has baked light on it, from its .lit file, levelsetlight or a finished bake. levelpath Gives the file a level was opened or loaded from. levellitpath Gives the file a level's baked light is kept in: the same name with .lit in place of .lvl. levelprobepath Gives the file a level's baked reflection probes are kept in: the same name with .prb in place of .lvl.
Previous Baked reflectionsNext Drawing