fix constant naming

This commit is contained in:
Peter Nerlich
2020-11-12 10:05:34 +01:00
committed by GitHub
parent 45aa9c4a67
commit e777c20b41

View File

@ -21,7 +21,7 @@ else
end end
-- CONSTANTS -- CONSTANTS
local LCD_WITH = 100 local LCD_WIDTH = 100
local LCD_PADDING = 8 local LCD_PADDING = 8
local LINE_LENGTH = 12 local LINE_LENGTH = 12
@ -87,7 +87,7 @@ local generate_line = function(s, ypos)
width = width - 1 width = width - 1
local texture = "" local texture = ""
local xpos = math.floor((LCD_WITH - 2 * LCD_PADDING - width) / 2 + LCD_PADDING) local xpos = math.floor((LCD_WIDTH - 2 * LCD_PADDING - width) / 2 + LCD_PADDING)
for ii = 1, #parsed do for ii = 1, #parsed do
texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png" texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png"
xpos = xpos + CHAR_WIDTH + 1 xpos = xpos + CHAR_WIDTH + 1
@ -96,7 +96,7 @@ local generate_line = function(s, ypos)
end end
local generate_texture = function(lines) local generate_texture = function(lines)
local texture = "[combine:"..LCD_WITH.."x"..LCD_WITH local texture = "[combine:"..LCD_WIDTH.."x"..LCD_WIDTH
local ypos = 16 local ypos = 16
for i = 1, #lines do for i = 1, #lines do
texture = texture..generate_line(lines[i], ypos) texture = texture..generate_line(lines[i], ypos)