No Music in Simon1
|Reported by:||athrxx||Owned by:||eriktorbjorn|
|Game:||Simon the Sorcerer 1|
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);
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.