diff options
author | ubq323 <ubq323@ubq323.website> | 2023-01-27 21:53:57 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-01-27 22:03:22 +0000 |
commit | 9fff52daa2df79133a29ff94d340bdaf406eb514 (patch) | |
tree | ab695c761cd325c76a9607dcba7c5f750e9910fd /client/drawing.lua | |
parent | d0916d568a00f5171b96fbc3bfc19ff263affc27 (diff) |
multitudinous things
Diffstat (limited to 'client/drawing.lua')
-rw-r--r-- | client/drawing.lua | 15 |
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 |