From 9fff52daa2df79133a29ff94d340bdaf406eb514 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 27 Jan 2023 21:53:57 +0000 Subject: multitudinous things --- client/drawing.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'client/drawing.lua') 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 -- cgit v1.2.3