#include #include #include #include #include "dat.h" int *phxmapbuffer; int phxmapwidth, phxmapheight; void phxsetmap(int w, int h, int *tiles) { if(phxmapbuffer) free(phxmapbuffer); phxmapbuffer = malloc(w * h * sizeof(phxmapbuffer[0])); memcpy(phxmapbuffer, tiles, sizeof(phxmapbuffer[0]) * w * h); }