mirror of
https://github.com/minetest-mods/digilines.git
synced 2025-06-29 23:10:27 +02:00
Compare commits
2 Commits
master
...
pr_98_fix_
Author | SHA1 | Date | |
---|---|---|---|
1874389eeb | |||
5ab9274739 |
4
init.lua
4
init.lua
@ -12,10 +12,6 @@ digilines.mcl = minetest.get_modpath("mcl_core")
|
||||
if minetest.get_modpath("default") then digilines.sounds = default end
|
||||
if digilines.mcl then digilines.sounds = mcl_sounds end
|
||||
|
||||
-- Show a more helpful error message to the player
|
||||
assert(digilines.sounds,
|
||||
"Digilines requires Minetest Game or a VoxeLibre (-compatible) game.")
|
||||
|
||||
-- Backwards compatibility code.
|
||||
-- We define a proxy table whose methods can be called with the
|
||||
-- `foo:bar` notation, and it will redirect the call to the
|
||||
|
6
lcd.lua
6
lcd.lua
@ -162,11 +162,7 @@ local generate_line = function(s, ypos)
|
||||
end
|
||||
|
||||
local generate_texture = function(lines)
|
||||
-- Active Mip Mapping ruins the text due to nearby transparent pixels at a distance.
|
||||
-- Using `lcd_anyside.png` as base image fixes this (see issue #58)
|
||||
local texture = ("lcd_anyside.png^[resize:%dx%d^[combine:%dx%d"):format(
|
||||
LCD_WIDTH, LCD_WIDTH, LCD_WIDTH, LCD_WIDTH
|
||||
)
|
||||
local texture = "[combine:"..LCD_WIDTH.."x"..LCD_WIDTH
|
||||
local ypos = math.floor((LCD_WIDTH - LINE_HEIGHT*NUMBER_OF_LINES) / 2)
|
||||
for i = 1, #lines do
|
||||
texture = texture..generate_line(lines[i], ypos)
|
||||
|
Reference in New Issue
Block a user