From ca457b3d0ed3dc6309e46633a2b467e3f9261753 Mon Sep 17 00:00:00 2001 From: esquizo Date: Sun, 17 May 2026 12:21:44 -0300 Subject: libphysics: consertada a colisão com o tilemap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O tamanho do mapa não tava sendo configurado nas variáveis --- libphysics/_map.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libphysics/_map.c') diff --git a/libphysics/_map.c b/libphysics/_map.c index 06d3cad..3057bf4 100644 --- a/libphysics/_map.c +++ b/libphysics/_map.c @@ -15,6 +15,9 @@ phxsetmap(int w, int h, int *tiles) if(phxmapbuffer) free(phxmapbuffer); + phxmapwidth = w; + phxmapheight = h; + phxmapbuffer = malloc(w * h * sizeof(phxmapbuffer[0])); memcpy(phxmapbuffer, tiles, sizeof(phxmapbuffer[0]) * w * h); } -- cgit v1.2.3