1
0
mirror of https://github.com/mt-mods/led_marquee.git synced 2025-06-29 23:00:56 +02:00

Use hardware overlay instead of an extra face

to display the LEDs, gets rid of Z fighting due
to Irrlicht rounding errors
This commit is contained in:
Vanessa Dannenberg
2019-05-25 03:00:14 -04:00
parent b2defa0eec
commit df30ce9477
2 changed files with 12 additions and 24 deletions

View File

@ -369,23 +369,17 @@ for i = 31, 255 do
local groups = { cracky = 2, not_in_creative_inventory = 1}
local light = LIGHT_MAX-2
local description = S("LED marquee panel ("..i..")")
local tiles = {
{ name="led_marquee_base.png", color="white"},
{ name="led_marquee_leds_off.png", color="white"},
"led_marquee_char_"..i..".png",
}
local leds = "led_marquee_char_"..i..".png"
if i == 31 then
tiles = {
{ name="led_marquee_base.png", color="white"},
{ name="led_marquee_leds_off.png", color="white"},
{
name = "led_marquee_char_31.png",
animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 0.75}
}
leds ={
name = "led_marquee_char_31.png",
animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 0.75}
}
end
local wimage
if i == 32 then
groups = {cracky = 2}
light = nil
@ -397,7 +391,11 @@ for i = 31, 255 do
description = description,
drawtype = "mesh",
mesh = "led_marquee.obj",
tiles = tiles,
tiles = {
{ name = "led_marquee_base.png", color = "white" },
{ name = "led_marquee_leds_off.png", color = "white" }
},
overlay_tiles = { "", leds },
inventory_image = wimage,
wield_image = wimage,
palette="led_marquee_palette.png",