Page 1 of 1

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

Posted: Sat May 17, 2014 6:47 pm
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

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

Posted: Sun May 18, 2014 12:09 pm
by darkgod
nice find, thanks!

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

Posted: Sun May 18, 2014 4:07 pm
by Marson
No problem. I suspect the real issue is somewhere in map.c, but my C is way too rusty.

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

Posted: Sun May 18, 2014 8:40 pm
by darkgod
Fixed it already dont worry :) A reproducible case was all I needed :)

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

Posted: Sun May 18, 2014 9:11 pm
by Marson
darkgod wrote:Fixed it already dont worry :) A reproducible case was all I needed :)
Yay!