Macaw OS C reference

Function maplayername

#include <macaw.h>
int maplayername(int i, char *buf, int size);

Gives you the name of one of the map's layers, to pass to map or mget.

Parameters

iint
Which layer, counting from 0.
bufchar *
Where to put the layer's name.
sizeint
How many bytes buf holds. A name that's too long is cut short to fit.

Returns int

The whole name's length, or 0 if there's no layer i.

In Sprites and the map, with spr, sprex, sspr, fget, fset, map, mget, mset, mapwidth, mapheight, maplayers.