[Scummvm-devel] Bugs #888248 and #1202071

Torbjorn.E.Andersson at personec.com Torbjorn.E.Andersson at personec.com
Wed May 25 06:44:27 CEST 2005


Since there has been some discussion about fixing old bugs, I would be
very grateful if someone could help me fix:

[ 888248 ] SAM: Savage Jungle Inn music glitch
https://sourceforge.net/tracker/index.php?func=detail&aid=888248&group_id=37116&atid=418820

[ 1202071 ] SAM: Failure to change music at Frog Rock
https://sourceforge.net/tracker/index.php?func=detail&aid=1202071&group_id=37116&atid=418820

I believe both of these bugs are related to the very same instruction in
doCommand(). When param = 1 and cmd = 1:

case 1:
    if (g_scumm->_gameId == GID_SAMNMAX)
        player->jump(a[3] - 1, (a[4] - 1) * 4 + a[5], ((a[6] * player->getTicksPerBeat()) >> 2) + a[7]);
    else
        player->setPriority(a[2]);
    return 0;

As far as I can tell the first parameter (track) to jump() is correct. It's
the second and third that are wildly wrong.

In the first bug, the four position parameters are 3, 4, 300, and 0.
In the second bug, they are 10, 4, 400, and 1.
In all other cases where I've seen it used, they are 2, 1, 0, 0.

The bug reports themselves have some more information.

Note that in both bugs it's the largest parameter that gets multiplied by
the number of ticks per beat, 480. This seems unlikely to me, but it's
apparently not as simple as just swapping the byte order.

It's annoying to be so close - I think - to the solution, yet so utterly
unable to take that final step...

Torbjörn




More information about the Scummvm-devel mailing list