[Scummvm-cvs-logs] CVS: scummvm/backends/midi adlib.cpp,NONE,1.1
Jamieson Christian
jamieson630 at users.sourceforge.net
Thu Nov 21 11:07:06 CET 2002
Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1:/tmp/cvs-serv4323/scummvm/backends/midi
Added Files:
adlib.cpp
Log Message:
Revamped Adlib functionality.
IMuseAdlib is defunct.
New MidiDriver_ADLIB device.
Simon 1/2 now supports Adlib.
--- NEW FILE: adlib.cpp ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2001 Ludvig Strigeus
* Copyright (C) 2001/2002 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/backends/midi/adlib.cpp,v 1.1 2002/11/21 19:06:42 jamieson630 Exp $
[...1327 lines suppressed...]
if (as->d)
val = as->d - val;
return val;
}
void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod)
{
int code;
assert(chan >= 0 && chan < 9);
code = (note << 7) + mod;
curnote_table[chan] = code;
adlib_playnote(chan, channel_table_2[chan] + code);
}
void MidiDriver_ADLIB::part_set_instrument(AdlibPart *part, Instrument * instr)
{
Instrument *i = &part->_part_instr;
memcpy(i, instr, sizeof(Instrument));
}
More information about the Scummvm-git-logs
mailing list