Opened 22 years ago
Closed 22 years ago
#437 closed defect (fixed)
LOOM: Flashlight glitch
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Loom |
Description
When a line of text is removed while in a dark room, that area is repainted with the lit room's background, not the dark room's. See screenshots.
The problem is that restoreBG() is restoring the wrong background. I can work around this by putting this code at the top of the function:
if (!(_vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_screen) && _vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_flashlight) { _fullRedraw = true; return; }
But that seems like an ugly hack to me. Surely there has to be a better way than this?
Ticket imported from: #601139. Ticket imported from: bugs/437.
Attachments (3)
Change History (12)
by , 22 years ago
Attachment: | scr0000.png added |
---|
comment:1 by , 22 years ago
I dindn't notice this problem ni CVS from 7th November. Could anyone please cheack for it, too?
comment:2 by , 22 years ago
I can still reproduce it. It happens if you move Bobbin to the lower part of the screen (so that the message is printed in the picture, rather than under it) and then provoke him into saying something, e.g. by making him spin a draft without pointing at anything first.
So it's not something you'd be likely to notice unless you were looking for it.
comment:3 by , 22 years ago
Fingolfin, you looked at the flashlight code recently (for that indy
bug) - I don't suppose you have any insight on this?
At worst, can we setup some different dirtyrects, or invalidate the charset-mask rectangle, instead of just doing a COMPLETE redraw...?
comment:4 by , 22 years ago
Owner: | set to |
---|
comment:5 by , 22 years ago
Well, while the lights are off, all background is black, except for where the flashlight is. Since the flashlight is redrawn everytime anyway, we could just add a check in restoreBG() and if lights are off, just clear the background to black instead of drawin the "real" back image.
However, that is *not* what the original code does as far as I can tell (at least in Monkey Island), so I wonder what is the real problem... hmm
comment:6 by , 22 years ago
Owner: | removed |
---|
comment:8 by , 22 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:9 by , 22 years ago
Actually, after looking closer, I saw VAR_V5_DRAWFLAGS being used in restorBG (but commented out)... gues what, that's the same as VAR_CURRENT_LIGHTS :-)
Sure enough, this fixes the problem. A somewhat related problem remains: the flashlight removes any text it moves over, i.e. a text masking issue. Looking into that one now.
Screenshot, with a line of text being displayed