FBEAR: Fix for MIDI piano notes (DOS version)
|Reported by:||eriktorbjorn||Owned by:||Kirben|
|Game:||Fatty Bear's Birthday Surprise|
English DOS version of Fatty Bear's Birthday Surprise Current ScummVM SVN (trunk)
This patch is just proof-of-concept. It's not meant to be final.
In the DOS version of Fatty Bear's Birthday Surprise, when you play the piano it will either use a digitized sound, which is handled correctly, or a MIDI sound, which always plays the same note. This patch attempts to fix that.
Based on observation, before playing a note the game will set variable 173. For the lowest note, it sets it to 431. The next is 432, etc. I don't know the significance of these values. They don't seem to bear any relation to MIDI note values, but I've adjusted the note so that the sound when selecting the piano instrument is the same as the sound when hitting the middle key, just like the other instruments.
The variable is reset to 0 immediately afterwards. I'm speculating that we somehow need to transfer the value of this variable to the IMuse player, and adjust each "note on" event accordingly. That's pretty much what this patch does, but the actual method could probably be a bit nicer.
The Windows version of the game seems to use digitazed sounds throughout, so that version works fine already as far as I know.
Ticket imported from: #2876221. Ticket imported from: patches/1205.