#8026 closed patch
Fix for Loom flashlight glitch
Reported by: | eriktorbjorn | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Loom |
Description
When using the Night Vision draft in the tunnels beyond the dragon, the flashlight is drawn correctly, but at the same time the two exits vanish from sight. (They are then redrawn - and removed again - at various points as you walk around.)
Apparently both exits are actors, so what this patch does is to force a full redraw of them whenever a flashlight is drawn. Since the code already calls clear_fullRedraw() shortly afterwards it shouldn't affect anything else.
Unfortunately I can't check if this breaks any other games. Loom is the only one I own that uses the flashlight feature.
I'm attaching a saved game at the entrance to the tunnels. The Night Vision draft is "c d d c".
Ticket imported from: #600645. Ticket imported from: patches/131.
Attachments (3)
Change History (10)
by , 22 years ago
Attachment: | loomlight.diff added |
---|
comment:1 by , 22 years ago
I see the problem occur, but I don't like this patch for it. It works around the problem instead of fixing it, and causes a full redraw on every turn when the flashlight is one, potentially wasting computing resources w/o need (as if it would matter <g>).
Maybe there is no better way, but I'd prefer if we researched this a bit more before just applying this "brute force" fix (and if we apply it, we should put in a comment that explains why it's there).
comment:2 by , 22 years ago
I guess you're right.
When I first suggested the change I thought that the redraw was only triggered when the flashlight square moved. It wasn't until later I realized that it was considerably more often than that.
comment:3 by , 22 years ago
Ok, I think I've figured out what's happening:
When drawFlashlight() is called, the parts of the screen that may be affected by the flashlight are marked as "dirty", so setActorRedrawFlags() is called to ensure that the actors occupying these areas are redrawn.
However, at this point resetActorBgs() has already been called, and processActors() only checks for needRedraw.
So the next time scummLoop() is called, there are potentially actors that should have had their backgrounds reset the last time, and who are no longer marked for redraw.
comment:4 by , 22 years ago
This is a patch I would have attached yesterday, but I messed up my files. It adds two parameters to setActorRedrawFlags() to indicate which of the redraw flags should be updated.
This isn't the only way of fixing the bug, of course, but of the ones I could thing of that seemed least hackish.
comment:6 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:7 by , 6 years ago
Component: | → Engine: SCUMM |
---|---|
Game: | → Loom |
Patch against an August 26 CVS snapshot