Ticket #8089: imuse.docommand256.diff

File imuse.docommand256.diff, 2.0 KB (added by SF/jamieson630, 22 years ago)

Patch against iMuse.cpp 1.54 (October 12, 2002)

  • scummvm/scumm/imuse.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
    retrieving revision 1.54
    diff -u -r1.54 imuse.cpp
     
    14381442                        return get_sound_status(b);
    14391443                case 14:
    14401444                        // Sam and Max: Volume Fader?
    1441                         for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
    1442                                 if (player->_active && player->_id == (uint16)b) {
    1443                                         player->fade_vol(e, f);
    1444                                         return 0;
     1445                        if (f != 0) {
     1446                                for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
     1447                                        if (player->_active && player->_id == (uint16)b) {
     1448                                                player->fade_vol(e, f);
     1449                                                return 0;
     1450                                        }
    14451451                                }
    14461452                        }
    14471453                        return -1;
     
    14911497                        warning("IMuseInternal::do_command invalid command %d", cmd);
    14921498                }
    14931499        } else if (param == 1) {
    1494 
    14951500                if ((1 << cmd) & (0x783FFF)) {
    14961501                        player = get_player_byid(b);
    14971502                        if (!player)
     
    15061511
    15071512                switch (cmd) {
    15081513                case 0:
    1509                         return player->get_param(c, d);
     1514                        if (g_scumm->_features & GID_SAMNMAX)
     1515                                return player->_def_do_command_trigger;
     1516                        else
     1517                                return player->get_param(c, d);
    15101518                case 1:
    15111519                        if (g_scumm->_features & GID_SAMNMAX) // Jamieson630: Nasty
    15121520                                player->jump (d - 1, (e - 1) * 4 + f, ((g * player->_ticks_per_beat) >> 2) + h);
     
    21372152                        if (_def_do_command_trigger && *p == _def_do_command_trigger) {
    21382153                                _def_do_command_trigger = 0;
    21392154                                _se->do_command (_deferred_do_command [0],
    2140                                             _deferred_do_command [1],
    2141                                             _deferred_do_command [2],
    2142                                             _deferred_do_command [3],
    2143                                             0, 0, 0, 0);
     2155                                                 _deferred_do_command [1],
     2156                                                 _deferred_do_command [2],
     2157                                                 _deferred_do_command [3],
     2158                                                 0, 0, 0, 0);
     2159                        } else {
     2160                                _def_do_command_trigger = *p;
    21442161                        } // end if
    21452162                } // end if
    21462163                break;