diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-05-17 12:21:44 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-05-17 12:22:15 -0300 |
| commit | ca457b3d0ed3dc6309e46633a2b467e3f9261753 (patch) | |
| tree | a362a1ac4ce80cfe28129a2153989396f0255d79 /libphysics/_map.c | |
| parent | b67f9b6b48715b325c3a2b3b5274467c778917a5 (diff) | |
libphysics: consertada a colisão com o tilemap
O tamanho do mapa não tava sendo configurado nas variáveis
Diffstat (limited to 'libphysics/_map.c')
| -rw-r--r-- | libphysics/_map.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |
