From 97702f11ea016ca2e395f71f03c3fc3a2ee929ca Mon Sep 17 00:00:00 2001 From: esquizo Date: Sun, 17 May 2026 12:02:56 -0300 Subject: adicionado libphysics --- libphysics/_map.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libphysics/_map.c (limited to 'libphysics/_map.c') diff --git a/libphysics/_map.c b/libphysics/_map.c new file mode 100644 index 0000000..06d3cad --- /dev/null +++ b/libphysics/_map.c @@ -0,0 +1,20 @@ +#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); +} -- cgit v1.2.3