Joined: Thu Jan 23, 2003 8:13 pmPosts: 1580Location: A shallow water area south of Bree

This isn't technically a bug, since neither the Minimalist nor Classic UI use the engine's built-in log flasher, but it appears in the example module and T2 uses it, and there's something odd in it that I think must be wrong. Here's the code for the LogFlasher:toScreen() method:

Now, if I'm reading this right, because of self.changed being cleared in line (1), the elseif branch at line (2) can never be followed. What's happening here is that the log flasher accumulates log messages side by side and line-wraps them into as many screen-width lines as needed, presumably to display them one line at a time, and that call to self:getNext() in line (2) is where the next line is supposed to be gotten to be displayed (hence the name…); with that line (1) thing, though, it looks like the next line of messages never gets pulled, so only one screen width's worth of log messages ever gets shown, which tracks with my testing. Which in turn means that if a lot of log messages are displayed at once before the log flasher is reset, the ones at the end will be lost.

The question is, what's the intended behavior here? My initial assumption (which I'm going to be implementing in the next T2 module release) is that the flasher is supposed to continue to the next line when the first line is done "flashing" — i.e. when self.flashing counts down to zero. Now, self.flashing is set to 20 when a new log message is added, so at 30fps, that works out to ⅔ second for each line of messages; too fast? too slow?

_________________"Blessed are the yeeks, for they shall inherit Arda..."

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum