Add map() default arguments (#25)

This commit is contained in:
Tobias V. Langhoff 2018-08-09 17:52:12 +02:00 committed by James Coonradt
parent bebfa7f48f
commit ce08ae17d9
1 changed files with 6 additions and 6 deletions

12
api.lua
View File

@ -410,12 +410,12 @@ end
function api.map(cel_x, cel_y, sx, sy, cel_w, cel_h, bitmask)
love.graphics.setShader(pico8.sprite_shader)
cel_x=flr(cel_x)
cel_y=flr(cel_y)
sx=flr(sx)
sy=flr(sy)
cel_w=flr(cel_w)
cel_h=flr(cel_h)
cel_x=flr(cel_x or 0)
cel_y=flr(cel_y or 0)
sx=flr(sx or 0)
sy=flr(sy or 0)
cel_w=flr(cel_w or 128)
cel_h=flr(cel_h or 64)
for y=0, cel_h-1 do
if cel_y+y<64 and cel_y+y>=0 then
for x=0, cel_w-1 do