Macaw OS C reference

Function map

#include <macaw.h>
void map(
    int cx,
    int cy,
    int x,
    int y,
    int cw,
    int ch,
    const char *layer
);

Draws tiles from your program's map, map.map, each one a 16 x 16 sprite. Only the tiles inside the window are drawn, and empty tiles (0) aren't drawn at all.

Parameters

cxint
Which column of the map to start from, counting tiles from 0.
cyint
Which row of the map to start from, counting tiles from 0.
xint
How far from the window's left edge to draw, in pixels.
yint
How far from the window's top to draw, in pixels.
cwint
How many tiles across to draw, or 0 for the layer's whole width.
chint
How many tiles down to draw, or 0 for the layer's whole height.
layerconst char *
The layer's name, like "Terrain", or NULL for the first layer.

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