Opened 20 years ago

Closed 20 years ago

#1368 closed defect

MIVGA: Guybrush shrinks & grows near end of game

Reported by: SF/billyhuk Owned by: Kirben
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 1

Description

This bug is for both the English PC VGA and EGA floppy versions of Monkey Island 1, using Windows 98. When alerting LeChuck of your arrival, there is then meant to be a closeup of Guybrush walking towards LeChuck and stopping. What happens at the moment is that Guybrush suddenly shrinks to half the size he usually is while walking, and then 'snaps' back to normal size after stopping walking. Both the VGA and EGA versions have been tested with both the current CVS build and 0.5.1.

Ticket imported from: #869003. Ticket imported from: bugs/1368.

Attachments (2)

monkeyVGA.s02 (7.4 KB ) - added by SF/billyhuk 20 years ago.
This is for the VGA version. Select any dialogue option, and you will see the bug in action.
monkeyega.s04 (6.8 KB ) - added by SF/billyhuk 20 years ago.
This is for the EGA version. Selech any dialogue option, and you will see the bug in action.

Download all attachments as: .zip

Change History (15)

by SF/billyhuk, 20 years ago

Attachment: monkeyVGA.s02 added

This is for the VGA version. Select any dialogue option, and you will see the bug in action.

comment:1 by fingolfin, 20 years ago

Summary: Guybrush shrinks & grows near end of gameMIVGA: Guybrush shrinks & grows near end of game

comment:2 by fingolfin, 20 years ago

Sadly, I only have the german monkeyvga. Maybe if you have a savegame for monkeyega, you could attach that? Thanks!

comment:3 by eriktorbjorn, 20 years ago

Maybe you could get there with the appropriate boot parameter? I can reproduce the bug with "-d 0 -b 8989" or, if you want to start from a slightly earlier point "-d 0 -b 8889" should work as well.

There's a list of boot parameters at http://www.scummbar.com/resources/articles/index.php?newssniffer=readarticle&article=1027

by SF/billyhuk, 20 years ago

Attachment: monkeyega.s04 added

This is for the EGA version. Selech any dialogue option, and you will see the bug in action.

comment:4 by eriktorbjorn, 20 years ago

I don't know what the correct fix is, but this is what appears to happen:

Guybrush walks towards the end of the church, shrinking in the process.

When he enters the next room, his ignoreBoxes flag has been set, which prevents setupActorScale() from changing his size.

Once he reaches his destination, ignoreBoxes is cleared which causes him to snap back to his correct size.

comment:5 by fingolfin, 20 years ago

i can reproduce the problem. But I am sure that the ignoreboxes flag isn't reset by changing the room (after all, the room takes care to explicitly clear it - which is the moment Guybrush snaps back to this proper size). And I am also pretty (though not absolutly) sure that the scale is never set in a way which ignores the "IgnoreBox" bit (except by the ActorOps.Init opcode).

Did anybody check if this works fine in the original?

comment:6 by eriktorbjorn, 20 years ago

> Did anybody check if this works fine in the original?

I played it in DOSBox (fortunately one of the Monkey Island fan sites had a savegame near the end). It worked fine. Guybrush shrinks as he walks towards the far end of the church (just like in ScummVM), but unlike in ScummVM he doesn't appear to be scaled down when he walks up to confront LeChuck.

ScummVM does draw him at the correct height once he stopped. His feet should be at about the same level as LeChuck's, and the top of his head should be just at the lower edge of the flowers.

So the only difference appears to be that short walk with ignoreBoxes set to true.

comment:7 by fingolfin, 20 years ago

> ScummVM does draw him at the correct height once he stopped.

-> this is so because at that point the script specifically clears the ignoreBox bit. Which is why I believe the bit is set all the time.

Furthermore, I can't find any spot in the original engine where the scale would be reset... guess I need to look again. Hrm.

comment:8 by eriktorbjorn, 20 years ago

On a slightly unrelated note, the CD version does not have this glitch in ScummVM. I think this is because there the entry script for room 45 (the far end of the church) explicitly calls ActorOps(VAR_EGO,[Scale(255,255)]). At least that was the only script change I noticed that looked important.

comment:9 by fingolfin, 20 years ago

Summary: MIVGA: Guybrush shrinks & grows near end of gameMIVGA: Guybrush shrinks & grows near end of game

comment:10 by SF/madm00se, 20 years ago

So, I found the cause of the little bug. The problem is that monkeyvga doesn't calculate the actual costume scale until it's time to draw the actor. (ie it doesn't go through the scaletable until it's time to draw and the actual scale value isn't stored on the actor.)

The only other place in monkeyvga that uses the actual scale besides the drawing code is actorWalkStep, which looks it up in the scaletable itself.

When Guybrush walks up towards the end of the room, his scale is set to 0x8000 (ie use scaletable 1) and he shrinks as he should. When he changes room this value remains. Therefore he autoscales in room 45 too and is properly sized.

In the current implementation, which is correct for later version of sputm, the scale value is directly calculated on the actor and Guybrush retains that value instead as he crosses into the new room.

I think that if we want to support both ways of doing this without hacks, the easist way would be to store both the boxscale and the actual scale on the actor (in setupActorScale) and use the appropriate one in drawActorCostume. We just need to find out which sputm versions use which method.

comment:11 by SF/madm00se, 20 years ago

A bug fix implementing the earlier sputm behaviour next to the new one. It's limited to monkeyvga for now but it probably applies to others too, although they may not depend on it.

http://madmoose.dk/scummvm/monkeyvga-scale-fix.diff

This is a pretty big fix for a pretty small problem, though. As Fingolfin said on #scummvm, if this place in monkeyvga is the only place this bug shows, a quick workaround might be a better solution.

comment:12 by Kirben, 20 years ago

Owner: set to Kirben
Status: newclosed

comment:13 by Kirben, 20 years ago

Patch added to ScummVM CVS. The changes should apply to all scumm4 games.

Note: See TracTickets for help on using tickets.