[Scummvm-cvs-logs] scummvm master -> 27af596ee978e2d9d8570ff8a2a17fe650f514fb

m-kiewitz m_kiewitz at users.sourceforge.net
Sat Jun 27 19:02:33 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
27af596ee9 SHERLOCK: SS: mt32 driver cleanup


Commit: 27af596ee978e2d9d8570ff8a2a17fe650f514fb
    https://github.com/scummvm/scummvm/commit/27af596ee978e2d9d8570ff8a2a17fe650f514fb
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-27T19:02:14+02:00

Commit Message:
SHERLOCK: SS: mt32 driver cleanup

- use proper naming conventions
- remove _MT32 variable, use _nativeMT32 instead

Changed paths:
    engines/sherlock/scalpel/drivers/mt32.cpp



diff --git a/engines/sherlock/scalpel/drivers/mt32.cpp b/engines/sherlock/scalpel/drivers/mt32.cpp
index feabb89..33e7671 100644
--- a/engines/sherlock/scalpel/drivers/mt32.cpp
+++ b/engines/sherlock/scalpel/drivers/mt32.cpp
@@ -34,7 +34,7 @@ namespace Sherlock {
 
 #define SHERLOCK_MT32_CHANNEL_COUNT 16
 
-const byte mt32_reverbDataSysEx[] = {
+const byte mt32ReverbDataSysEx[] = {
 	0x10, 0x00, 0x01, 0x01, 0x05, 0x05, 0xFF
 };
 
@@ -43,7 +43,6 @@ public:
 	MidiDriver_MT32() {
 		_driver = NULL;
 		_isOpen = false;
-		_MT32 = false;
 		_nativeMT32 = false;
 		_baseFreq = 250;
 
@@ -86,7 +85,6 @@ public:
 protected:
 	Common::Mutex _mutex;
 	MidiDriver *_driver;
-	bool _MT32;
 	bool _nativeMT32;
 
 	bool _isOpen;
@@ -99,7 +97,7 @@ private:
 public:
 	void uploadMT32Patches(byte *driverData, int32 driverSize);
 
-	void MT32SysEx(const byte *&dataPtr, int32 &bytesLeft);
+	void mt32SysEx(const byte *&dataPtr, int32 &bytesLeft);
 };
 
 MidiDriver_MT32::~MidiDriver_MT32() {
@@ -123,12 +121,10 @@ int MidiDriver_MT32::open() {
 
 	switch (musicType) {
 	case MT_MT32:
-		_MT32       = true;
-		_nativeMT32 = false;
+		_nativeMT32 = true;
 		break;
 	case MT_GM:
 		if (ConfMan.getBool("native_mt32")) {
-			_MT32       = true;
 			_nativeMT32 = true;
 		}
 		break;
@@ -147,7 +143,7 @@ int MidiDriver_MT32::open() {
 	if (ret)
 		return ret;
 
-	if (_MT32)
+	if (_nativeMT32)
 		_driver->sendMT32Reset();
 	else
 		_driver->sendGMReset();
@@ -174,10 +170,10 @@ void MidiDriver_MT32::newMusicData(byte *musicData, int32 musicDataSize) {
 	// that's why we don't implement this
 
 	// Also send these bytes to MT32 (SysEx) - seems to be reverb configuration
-	if (_MT32) {
-		const byte *reverbData = mt32_reverbDataSysEx;
-		int32       reverbDataSize = sizeof(mt32_reverbDataSysEx);
-		MT32SysEx(reverbData, reverbDataSize);
+	if (_nativeMT32) {
+		const byte *reverbData = mt32ReverbDataSysEx;
+		int32       reverbDataSize = sizeof(mt32ReverbDataSysEx);
+		mt32SysEx(reverbData, reverbDataSize);
 	}
 }
 
@@ -185,7 +181,7 @@ void MidiDriver_MT32::uploadMT32Patches(byte *driverData, int32 driverSize) {
 	if (!_driver)
 		return;
 
-	if (!_MT32)
+	if (!_nativeMT32)
 		return;
 
 	// patch data starts at offset 0x863
@@ -196,7 +192,7 @@ void MidiDriver_MT32::uploadMT32Patches(byte *driverData, int32 driverSize) {
 	int32       bytesLeft = driverSize - 0x863;
 
 	while(1) {
-		MT32SysEx(patchPtr, bytesLeft);
+		mt32SysEx(patchPtr, bytesLeft);
 
 		assert(bytesLeft);
 		if (*patchPtr == 0x80) // List terminator
@@ -204,7 +200,7 @@ void MidiDriver_MT32::uploadMT32Patches(byte *driverData, int32 driverSize) {
 	}
 }
 
-void MidiDriver_MT32::MT32SysEx(const byte *&dataPtr, int32 &bytesLeft) {
+void MidiDriver_MT32::mt32SysEx(const byte *&dataPtr, int32 &bytesLeft) {
 	byte   sysExMessage[270];
 	uint16 sysExPos      = 0;
 	byte   sysExByte     = 0;






More information about the Scummvm-git-logs mailing list