1.2.0 Bugfix: Icons not fading in log and funky shader stuff

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

1.2.0 Bugfix: Icons not fading in log and funky shader stuff

#1 Post by Marson »

This happens in 1.1.5 and 1.2.0.

In a number of log lines, an icon will be prepended to the name of an entity or talent.
If the entity has a shader on it, it's icon won't fade when the rest of the log line does. If that line is at the top or sometimes bottom of the log, it can cause the shader effect to apply to other UI elements (all on the same Z plane, maybe?). In the example below, it's a multi-hued crystal that happened to be on red when I took the screenshot.
tome-1.2.0-1400351243a.png
tome-1.2.0-1400351243a.png (143.01 KiB) Viewed 1009 times
engine.Entity:toScreen() calls core.map.mapObjectsToScreen() with allow_shader set to false. I'm not sure why that flag is being ignored, but setting it to true actually prevents the shader leak. The icon still won't fade, but replacing engine/LogDisplay.lua line 259 with the following both prevents the shader leak and fades out the icons on my system. It's more of a hack solution, but I didn't see anything wrong that jumped out at me in map_objects_toscreen() in map.c

v1.2.0 test8

Code: Select all

    if fade > 0.2 then
      for di = 1, #item._dduids do
        item._dduids[di].e:toScreen(nil, self.display_x + item._dduids[di].x, h, item._dduids[di].w, item._dduids[di].w, fade, false, true)
      end
    end

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: 1.2.0 Bugfix: Icons not fading in log and funky shader s

#2 Post by darkgod »

nice find, thanks!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: 1.2.0 Bugfix: Icons not fading in log and funky shader s

#3 Post by Marson »

No problem. I suspect the real issue is somewhere in map.c, but my C is way too rusty.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: 1.2.0 Bugfix: Icons not fading in log and funky shader s

#4 Post by darkgod »

Fixed it already dont worry :) A reproducible case was all I needed :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Marson
Uruivellas
Posts: 645
Joined: Thu Jan 16, 2014 4:56 am

Re: 1.2.0 Bugfix: Icons not fading in log and funky shader s

#5 Post by Marson »

darkgod wrote:Fixed it already dont worry :) A reproducible case was all I needed :)
Yay!

Post Reply