[Scummvm-cvs-logs] SF.net SVN: scummvm:[40084] scummvm/trunk/sound/softsynth/adlib.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Apr 22 22:51:34 CEST 2009


Revision: 40084
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40084&view=rev
Author:   lordhoto
Date:     2009-04-22 20:51:33 +0000 (Wed, 22 Apr 2009)

Log Message:
-----------
Rename adlib_read to adlib_get_reg_value, since it return the (cached) register value, which can not be achieved by read AdLib read.

Modified Paths:
--------------
    scummvm/trunk/sound/softsynth/adlib.cpp

Modified: scummvm/trunk/sound/softsynth/adlib.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/adlib.cpp	2009-04-22 20:18:12 UTC (rev 40083)
+++ scummvm/trunk/sound/softsynth/adlib.cpp	2009-04-22 20:51:33 UTC (rev 40084)
@@ -599,9 +599,9 @@
 	void adlib_key_off(int chan);
 	void adlib_note_on(int chan, byte note, int mod);
 	void adlib_note_on_ex(int chan, byte note, int mod);
-	int adlib_read_param(int chan, byte data);
+	int adlib_get_reg_value_param(int chan, byte data);
 	void adlib_setup_channel(int chan, AdlibInstrument * instr, byte vol_1, byte vol_2);
-	byte adlib_read(byte reg) {
+	byte adlib_get_reg_value(byte reg) {
 		return _adlib_reg_cache[reg];
 	}
 	void adlib_set_param(int channel, byte param, int value);
@@ -1135,7 +1135,7 @@
 
 void MidiDriver_ADLIB::adlib_key_off(int chan){
 	byte reg = chan + 0xB0;
-	adlib_write(reg, adlib_read(reg) & ~0x20);
+	adlib_write(reg, adlib_get_reg_value(reg) & ~0x20);
 }
 
 byte MidiDriver_ADLIB::struct10_ontimer(Struct10 *s10, Struct11 *s11) {
@@ -1212,7 +1212,7 @@
 	if (as->d)
 		value = as->d - value;
 	reg += as->a;
-	adlib_write(reg, (adlib_read(reg) & ~as->c) | (((byte)value) << as->b));
+	adlib_write(reg, (adlib_get_reg_value(reg) & ~as->c) | (((byte)value) << as->b));
 }
 
 void MidiDriver_ADLIB::adlib_key_onoff(int channel) {
@@ -1220,7 +1220,7 @@
 	byte reg = channel + 0xB0;
 	assert(channel >= 0 && channel < 9);
 
-	val = adlib_read(reg);
+	val = adlib_get_reg_value(reg);
 	adlib_write(reg, val & ~0x20);
 	adlib_write(reg, val | 0x20);
 }
@@ -1289,7 +1289,7 @@
 		oct <<= 2;
 	notex = note2 % 12 + 3;
 
-	old = adlib_read(channel + 0xB0);
+	old = adlib_get_reg_value(channel + 0xB0);
 	if (old & 0x20) {
 		old &= ~0x20;
 		if (oct > old) {
@@ -1498,7 +1498,7 @@
 		s11->s10->unk3 = 0;
 		break;
 	default:
-		s10->start_value = adlib_read_param(voice->_channel, s11->param);
+		s10->start_value = adlib_get_reg_value_param(voice->_channel, s11->param);
 	}
 
 	struct10_init(s10, ie);
@@ -1529,7 +1529,7 @@
 	struct10_setup(s10);
 }
 
-int MidiDriver_ADLIB::adlib_read_param(int chan, byte param) {
+int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
 	const AdlibSetParams *as;
 	byte val;
 	byte channel;
@@ -1553,7 +1553,7 @@
 	}
 
 	as = &adlib_setparam_table[param];
-	val = adlib_read(channel + as->a);
+	val = adlib_get_reg_value(channel + as->a);
 	val &= as->c;
 	val >>= as->b;
 	if (as->d)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list