Opened 4 years ago

Closed 9 months ago

#13797 closed defect (fixed)

SCUMM/HE: FREDDI5: Outline of Freddi appears in the leftmost tide pool

Reported by: Thunderforge Owned by: AndywinXp
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Freddi Fish 5

Description (last modified by Thunderforge)

In Freddi Fish 5: The Case of the Creature of Coral Cove (freddicove), when on the screen with the tide pools, the leftmost tide pool contains a "ghost" outline of Freddi.

Reproduction Steps

  1. Load the attached save game or use the debugger and type room 12

Note that in the leftmost tide pool the outline is there. It goes away if the wave comes (by choosing the wrong pool to go to).

Versions Tested

  • Freddi Fish 5: The Case of the Creature of Coral Cove, Steam version
  • ScummVM 2.6.0, Windows x64

Attachments (2)

freddicove-win-us-Freddi5.sg1 (30.3 KB ) - added by Thunderforge 4 years ago.
scummvm-freddicove-win-us-00004.png (2.0 MB ) - added by Thunderforge 4 years ago.

Change History (11)

by Thunderforge, 4 years ago

comment:1 by Thunderforge, 4 years ago

Description: modified (diff)

by Thunderforge, 4 years ago

comment:2 by Thunderforge, 4 years ago

Description: modified (diff)

comment:3 by AndywinXp, 2 years ago

Summary: SCUMM/HE: Outline of Freddi appears in the leftmost tide poolSCUMM/HE: FREDDI5: Outline of Freddi appears in the leftmost tide pool

comment:4 by Thunderforge, 2 years ago

Tested with 2024-04-27 build (master build following 2.8.1) and the issue still exists.

comment:5 by AndywinXp, 2 years ago

I know 🙂

comment:6 by Thunderforge, 2 years ago

Sorry if that sounded demanding. Since the bug reported a year and a half ago, I figured it would be good to retest and confirm that the bug was still happening, and not that other changes resulted in it being fixed.

comment:7 by AndywinXp, 2 years ago

No worries, I'm actually a bit frustrated with myself because this ticket is one of the target bugs which I hoped I would have killed with my latest graphics PR, but it didn't work out 😂

comment:8 by AndywinXp, 2 years ago

So, this is a sprite image of the mudskipper which the scripts EXPLICITLY ask the engine to render (function renderSprites(), image 495 state 15):

Script# 2067
[0000] (37) dim2dim2Array.dword(roomvar3,0,15,0,0,1)
[000E] (BF) startScriptQuick2(53,[])
ERROR: No items on stack to pop!
[0015] (47) roomarray3[**** INVALID DATA ****] = 0
[0018] (B6) printDebug.begin()
[001A] (B6) printDebug.msg("all sprites untouchable 1")
[0036] (43) localvar0 = 1
[003B] (5D) while (localvar0 <= 15) {
[0044] (BF)   startScriptQuick2(53,[])
ERROR: No items on stack to pop!
[004C] (47)   roomarray3[**** INVALID DATA ****] = localvar0
[004F] (0C)   dup[1] = roomarray3[localvar0]
[0056] (26)   setSpriteInfo.setRange(dup[1],dup[1])
[0058] (26)   setSpriteInfo.resetSprite()
[005A] (26)   setSpriteInfo.setImage(495)
[005F] (26)   setSpriteInfo.setImageState(localvar0)
[0064] (26)   setSpriteInfo.setUpdateType(1)
[0068] (26)   setSpriteInfo.setAutoAnimFlag(0)
[006C] (26)   setSpriteInfo.setPriority(-5)
[0071] (26)   setSpriteInfo.setGroup(17)
[0075] (26)   setSpriteInfo.setPosition(0,0)
[007B] (4B)   array260[roomarray3[localvar0]][1] = 2054
[0089] (4F)   localvar0++
[008C] (**) }
[008F] (66) stopObjectCodeB()
END

And guess what happens when I debug the original executable? It follows this sprite's rendering pipeline aaaall the way to the end :-) and yet the original doesn't show this thing on screen :-)

I'm giving up, I've been behind this ticket for months and this still makes no sense...

comment:9 by AndywinXp, 9 months ago

Owner: set to AndywinXp
Resolution: fixed
Status: newclosed

In 99f45887:

SCUMM/HE: FREDDI5: Fix #13797

Yet another case of "surely we don't need this part from the source code". :)

This fixes #13797:
"SCUMM/HE: FREDDI5: Outline of Freddi appears in the leftmost tide pool"

Turns out their own qsort algo behaves quite differently when several sprites
have the same priority assigned to them.

Note: See TracTickets for help on using tickets.