Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#4302 closed defect (fixed)

IHNM: Fade glitch when Benny falls asleep

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: SAGA
Version: Keywords:
Cc: Game: I Have No Mouth

Description

Current SVN version English version of the game

In the scene where Benny goes to sleep, the game is supposed to fade the palette down a bit (probably to signify night time), and then back up. In ScummVM, it seems it doesn't fade it down far enough, and when it fades back up it starts from a much darker palette than the one it faded down to. This could indicate a bug in Gfx::palFade().

Ticket imported from: #2748110. Ticket imported from: bugs/4302.

Attachments (3)

ihnm.s70 (20.6 KB ) - added by eriktorbjorn 16 years ago.
Savegame before going to sleep
s_001.png (119.2 KB ) - added by eriktorbjorn 16 years ago.
Screenshot from DOSBox of the scene at its darkest
ihnm-palette.diff (1.7 KB ) - added by eriktorbjorn 16 years ago.
Patch against current SVN

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 16 years ago

Attachment: ihnm.s70 added

Savegame before going to sleep

by eriktorbjorn, 16 years ago

Attachment: s_001.png added

Screenshot from DOSBox of the scene at its darkest

comment:1 by eriktorbjorn, 16 years ago

Summary: IHNM: Fade glitchIHNM: Fade glitch when Benny falls asleep

comment:2 by eriktorbjorn, 16 years ago

I believe the problem is (at least) twofold:

1) I can't help feeling there's something off with the "Exponential fade" part of the code. When percent is 0.5, fpercent will be 0.25 when fading up and 0.75 when fading down. Is that right?

2) The sfScriptFade() function makes a copy of _currentPalette, presumably so that it can leave the real palette alone. But then palFade() modifies _currentPalette, so that when it's setting up the fade up, _currentPalette is the darkened palette.

I'm going to attach a patch that seems to fix the problem, but I don't want to commit it without input from someone a lot more familiar with the SAGA engine than I am.

by eriktorbjorn, 16 years ago

Attachment: ihnm-palette.diff added

Patch against current SVN

comment:3 by eriktorbjorn, 16 years ago

Committed my patch after discussing it with [md5]. It may not be exactly like the original, but at least it looks a lot closer to it now.

comment:4 by eriktorbjorn, 16 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.