Function importmapimage
#include <macaw.h>int importmapimage(const char *path, int tilesize);
Reads a picture of a whole level (a PNG) and cuts it into tiles. Each different tile becomes a sprite, numbered 1, 2, 3 in the order they're first met, and see-through tiles are 0.
Parameters
pathconst char *- The PNG file's path, from your program's folder unless it starts with
/. tilesizeint- How many pixels across each tile is, from 4 to 64, or 0 for 16. Other sizes are made 16 x 16.
Returns int
A number for the imported map, or 0 if it couldn't be read.
In Maps made elsewhere, with importmap, imap_layers, imap_layername, imap_size, imap_get, imap_picture, imap_used, imap_notes, imap_note, imap_free.