Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ function love.conf(t)
t.title = "AStarDemo"
t.author = "MarekkPie"
t.identity = nil
t.version = "0.8.0"
t.version = "11.3.0"
t.console = false
t.screen.width = 800
t.screen.height = 800
t.screen.fullscreen = false
t.screen.vsync = true
t.screen.fsaa = 0
t.window.width = 800
t.window.height = 800
t.window.fullscreen = false
t.window.vsync = true
t.window.fsaa = 0
t.modules.joystick = false
t.modules.audio = false
t.modules.keyboard = true
Expand Down
6 changes: 3 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function love.mousepressed(x,y,b)
local gr, gc = findGridPosition(x, y, wallMap, NODEWIDTH, NODEHEIGHT)
if gr ~= -1 then
if love.keyboard.isDown("rshift", "lshift") then
if b == "l" then
if b == 1 then
if not (gc == startGridPos.c and gr == startGridPos.r) and
not (gc == exitGridPos.c and gr == exitGridPos.r) then
if wallMap[gr][gc].wall then
Expand All @@ -311,11 +311,11 @@ function love.mousepressed(x,y,b)
end
else
if not wallMap[gr][gc].wall then
if b == "l" and
if b == 1 and
not (gc == exitGridPos.c and gr == exitGridPos.r) then
startGridPos.c = gc
startGridPos.r = gr
elseif b == "r" and
elseif b == 2 and
not (gc == startGridPos.c and gr == startGridPos.r) then
exitGridPos.c = gc
exitGridPos.r = gr
Expand Down