Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5395 closed defect (fixed)

Iceman graphics glitch

Reported by: SF/psycrow7 Owned by: wjp
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: Codename: ICEMAN

Description

Test with ScummVM 1.2.0pre52937

At the very beginning of the game the door to the cabana is displayed wrong in two different scenes. I've attached four different screen shots. The two "bad" shots are what ScummVM currently displays and the two "good" shots are what it should look like.

Ticket imported from: #3078365. Ticket imported from: bugs/5395.

Attachments (5)

bad-01.png (10.5 KB ) - added by SF/psycrow7 9 years ago.
Fist incorrect shot
bad-02.png (12.1 KB ) - added by SF/psycrow7 9 years ago.
Second incorrect shot
Good-01.png (10.2 KB ) - added by SF/psycrow7 9 years ago.
fist correct correct shot
Good-02.png (12.1 KB ) - added by SF/psycrow7 9 years ago.
Second correct shot
debug.patch (3.2 KB ) - added by digitall 9 years ago.
Patch to aid debug

Download all attachments as: .zip

Change History (13)

by SF/psycrow7, 9 years ago

Attachment: bad-01.png added

Fist incorrect shot

by SF/psycrow7, 9 years ago

Attachment: bad-02.png added

Second incorrect shot

by SF/psycrow7, 9 years ago

Attachment: Good-01.png added

fist correct correct shot

by SF/psycrow7, 9 years ago

Attachment: Good-02.png added

Second correct shot

comment:1 by m-kiewitz, 9 years ago

the 2nd near shot of the door gets broken by the current undithering code. If you turn off undithering BEFORE reaching that scene, the door will get shown correctly.

The 1st shot of the door having some white in it seems to be caused by some issue in the picture drawing code. SCI Viewer shows the same white spot.

comment:2 by m-kiewitz, 9 years ago

close-up of door (2nd shot) is now fixed in r53522

comment:3 by digitall, 9 years ago

Replicated first bug on Linux x86_32 with: ScummVM 1.3.0git3520-g36e3ded-dirty (Mar 2 2011 14:47:17) Features compiled in: Vorbis FLAC MP3 ALSA SEQ TiMidity RGB zLib FluidSynth Theora

The second bug is still fixed. Ran with valgrind and no memory issues are associated with the first bad drawing. Will look at the SCI drawing code to see if I can spot the cause of this issue.

comment:4 by digitall, 9 years ago

Have identified the picture with the error as resource 2 of type Pic i.e. draw_pic 2 shows this. This is of size 13078 and located in resource.002.

Further tracing shows that this is a EGA Vector Resource View of type 0x1fe. Enabling "pic_visualise 1" and some modifications to the rendering routine in engines/sci/engine/picture.cpp allows the rendering to be followed in slow time, the error seems to occurs somewhere between position 9280 and 11900 in the input stream, but the exact point where the rendering goes wrong is not totally obvious and would need close comparison to the original picture.

Attaching debugging patch to aid further investigation by the SCI team.

by digitall, 9 years ago

Attachment: debug.patch added

Patch to aid debug

comment:5 by wjp, 9 years ago

Owner: set to wjp

comment:6 by wjp, 9 years ago

Thanks for the assistance. It was the flood fill at 9284.

The issue is that our flood fill code doesn't handle dithered EGA graphics properly at all. I know how to fix it, but it will take a bit of time. This was never implemented properly in our "new" gui code (isFillMatch), while it was present in freesci (IS_BOUNDARY).

comment:7 by wjp, 9 years ago

Fixed in b40b87fdb5b4ee869cce55d852af409896b20c98

comment:8 by wjp, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.