summaryrefslogtreecommitdiff
path: root/client/drawing.lua
diff options
context:
space:
mode:
Diffstat (limited to 'client/drawing.lua')
-rw-r--r--client/drawing.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/client/drawing.lua b/client/drawing.lua
index e65e716..29069e7 100644
--- a/client/drawing.lua
+++ b/client/drawing.lua
@@ -13,12 +13,13 @@ for i=0,5 do
table.insert(corners,y)
end
-local function draw_hex(cpos,size)
+local function draw_hex(cpos,color,thick)
love.graphics.push()
- love.graphics.setLineWidth(0.1)
+ love.graphics.setLineWidth(thick or 0.1)
love.graphics.translate(cpos.x,cpos.y)
- love.graphics.scale(size)
- love.graphics.setColor(love.math.colorFromBytes(0xe7,0x9e,0))
+ if color then love.graphics.setColor(color) else
+ love.graphics.setColor(love.math.colorFromBytes(0xe7,0x9e,0))
+ end
love.graphics.polygon("fill",corners)
love.graphics.setColor(0,0,0)
love.graphics.polygon("line",corners)
@@ -26,12 +27,12 @@ local function draw_hex(cpos,size)
end
local function draw_chunk(the_chunk)
- for q = 0,chunk.SIZE-1 do
- for r = 0,chunk.SIZE-1 do
+ for q = 0,31 do
+ for r = 0,31 do
local t = the_chunk.tiles[chunk.index(q,r)]
if t then
local p = coords.Hex.make(q,r):to_pos()
- draw_hex(p*10,10)
+ draw_hex(p)
end
end
end