#2734 closed defect (fixed)
No Music in Simon1
Reported by: | athrxx | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | normal | Component: | Engine: AGOS |
Version: | Keywords: | ||
Cc: | Game: | Simon the Sorcerer 1 |
Description
I don't know if I am the only one who encountered this, but when compiling with Visual C++ 7.1 and turning on optimizations (one or more of /O1 /O2 /Ox, /Og) the midi music in Simon 1 won't play (Simon 2 works fine).
The offending lines are lines 482 and 489 in simon\midi.cpp. The problem seems to be the order in which the methods that are passed as arguments are called.
Changing both lines from
in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
to
uint32 offset = in->readUint32BE(); in->seek(offset + in->pos(), SEEK_SET);
solves the problem. The uint32 should obviously be declared only once.
Ticket imported from: #1520629. Ticket imported from: bugs/2734.
Change History (5)
comment:1 by , 18 years ago
comment:3 by , 18 years ago
Ok, I'll close the bug, then. Thanks for spotting it!
I've committed the fix to both trunk and branch, which means that if there is a ScummVM 0.9.1 (which seems very likely to me) the fix will be there, as well.
comment:4 by , 18 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 18 years ago
Component: | Engine: AGI → Engine: AGOS |
---|---|
Game: | Leisure Suit Larry 1 → Simon the Sorcerer 1 |
This should work as well:
in->seek(in->readUint32BE(), SEEK_CUR);
I'm going to make that change. Please let me know how that turns out.