- [NEW] tilemap.new(x,y)
- [CHG] tilemap.new i tilemap.load alliberen la surface anterior (si hi havia) del mapa
This commit is contained in:
2
mini.cpp
2
mini.cpp
@@ -1022,11 +1022,13 @@ void tvline(int x, int y0, int y1, float mx, float my, float mdx, float mdy) {
|
||||
}
|
||||
|
||||
uint8_t mget(int celx, int cely) {
|
||||
if (!map_surface) return 0;
|
||||
if (celx < 0 || celx > (map_surface->w-1) || cely < 0 || cely > (map_surface->h-1)) return 0;
|
||||
return TILES(celx, cely);
|
||||
}
|
||||
|
||||
void mset(int celx, int cely, uint8_t snum) {
|
||||
if (!map_surface) return;
|
||||
if (celx < 0 || celx > (map_surface->w-1) || cely < 0 || cely > (map_surface->h-1)) return;
|
||||
TILES(celx, cely) = snum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user