diff --git a/infimap.p8 b/infimap.p8 index 774cc93..7c888d2 100644 --- a/infimap.p8 +++ b/infimap.p8 @@ -3,7 +3,7 @@ version 18 __lua__ #include mapgen.lua #include movement.lua -#include infimap.lua +#include main.lua __gfx__ 000000000000000033333333335555333344443338333333333333e3383333830000000000000000000000000000000000000000000000000000000000000000 00000000000000003333333335554553344444438a833383333e3e9e888338880000000000000000000000000000000000000000000000000000000000000000 diff --git a/infimap.lua b/main.lua similarity index 100% rename from infimap.lua rename to main.lua diff --git a/movement.lua b/movement.lua index 4e8dd17..9453809 100644 --- a/movement.lua +++ b/movement.lua @@ -27,7 +27,7 @@ end function handle_input() - new_pos = camera_pos + local new_pos = {camera_pos[1], camera_pos[2]} if btnp(0) or btnp(1) or btnp(2) or btnp(3) then if btnp(0) then @@ -70,5 +70,5 @@ end -- pos is camera position, meaning the player position is -- pos + {8, 8}. function legal_move(pos) - return fget(mget(pos[1]+8, pos[2]+8), 0) + return not fget(mget(pos[1]+8, pos[2]+8), 0) end