Ticket #9100: fbear-dos-piano.diff
File fbear-dos-piano.diff, 4.4 KB (added by , 15 years ago) |
---|
-
engines/scumm/imuse/imuse_player.cpp
73 73 _transpose(0), 74 74 _detune(0), 75 75 _vol_eff(0), 76 _base_note(0), 76 77 _track_index(0), 77 78 _loop_to_beat(0), 78 79 _loop_from_beat(0), … … 252 253 break; 253 254 254 255 case 0x9: // Key On 256 param1 += _base_note; 255 257 if (!_scanning) { 256 258 if (_isMT32 && !_se->isNativeMT32()) 257 259 param2 = (((param2 * 3) >> 2) + 32) & 0x7F; … … 562 564 part->set_transpose(b); 563 565 } 564 566 567 void Player::setBaseNote(int baseNote) { 568 _base_note = baseNote; 569 } 570 565 571 bool Player::jump(uint track, uint beat, uint tick) { 566 572 if (!_parser) 567 573 return false; -
engines/scumm/imuse/imuse.cpp
443 443 _tempoFactor = value; 444 444 break; 445 445 446 case IMuse::PROP_NOTE_BASE: 447 _noteBase = value; 448 break; 449 446 450 case IMuse::PROP_NATIVE_MT32: 447 451 _native_mt32 = (value > 0); 448 452 Instrument::nativeMT32(_native_mt32); … … 603 607 if (!player) 604 608 return false; 605 609 610 player->setBaseNote(_noteBase); 611 _noteBase = 0; 612 606 613 // WORKAROUND: This is to work around a problem at the Dino Bungie 607 614 // Memorial. 608 615 // -
engines/scumm/imuse/imuse_internal.h
186 186 int8 _transpose; 187 187 int8 _detune; 188 188 byte _vol_eff; 189 int _base_note; 189 190 190 191 uint _track_index; 191 192 uint _loop_to_beat; … … 275 276 void setPriority(int pri); 276 277 void setSpeed(byte speed); 277 278 int setTranspose(byte relative, int b); 279 void setBaseNote(int baseNote); 278 280 int setVolume(byte vol); 279 281 bool startSound(int sound, MidiDriver *midi, bool passThrough); 280 282 int getMusicTimer() const; … … 419 421 bool _initialized; 420 422 421 423 int _tempoFactor; 424 int _noteBase; 422 425 423 426 int _player_limit; // Limits how many simultaneous music tracks are played 424 427 bool _recycle_players; // Can we stop a player in order to start another one? -
engines/scumm/imuse/imuse.h
59 59 PROP_LIMIT_PLAYERS, 60 60 PROP_RECYCLE_PLAYERS, 61 61 PROP_DIRECT_PASSTHROUGH, 62 PROP_GAME_ID 62 PROP_GAME_ID, 63 PROP_NOTE_BASE 63 64 }; 64 65 65 66 public: -
engines/scumm/scumm.h
1383 1383 1384 1384 // Exists both in V7 and in V72HE: 1385 1385 byte VAR_NUM_GLOBAL_OBJS; 1386 byte VAR_MIDI_NOTE; // Fatty Bear's Birthday Surprise 1386 1387 }; 1387 1388 1388 1389 } // End of namespace Scumm -
engines/scumm/he/sound_he.cpp
741 741 } 742 742 else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) { 743 743 if (_vm->_imuse) { 744 int noteBase = _vm->VAR(_vm->VAR_MIDI_NOTE); 745 if (noteBase) 746 noteBase -= 442; 744 747 _vm->_imuse->stopSound(_currentMusic); 745 748 _currentMusic = soundID; 749 _vm->_imuse->property(IMuse::PROP_NOTE_BASE, noteBase); 746 750 _vm->_imuse->startSound(soundID); 747 751 } 748 752 } -
engines/scumm/he/intern_he.h
68 68 protected: 69 69 virtual void setupOpcodes(); 70 70 71 virtual void setupScummVars(); 72 71 73 virtual void saveOrLoad(Serializer *s); 72 74 73 75 void localizeArray(int slot, byte scriptSlot); -
engines/scumm/vars.cpp
206 206 } 207 207 } 208 208 209 void ScummEngine_v 70he::setupScummVars() {209 void ScummEngine_v60he::setupScummVars() { 210 210 ScummEngine_v6::setupScummVars(); 211 211 212 VAR_MIDI_NOTE = 173; 213 } 214 215 void ScummEngine_v70he::setupScummVars() { 216 ScummEngine_v60he::setupScummVars(); 217 212 218 VAR_CURRENTDRIVE = 0xFF; 213 219 VAR_MUSIC_TIMER = 0xFF; 214 220