mirror of
https://github.com/minetest-mods/digilines.git
synced 2025-07-01 16:00:22 +02:00
fix constant naming
This commit is contained in:
6
lcd.lua
6
lcd.lua
@ -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)
|
||||||
|
Reference in New Issue
Block a user