[Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos_sound.cpp,1.4,1.5 morphos_sound.h,1.1,1.2 morphos_start.cpp,1.4,1.5 MorphOS.readme,1.1.1.1,1.2

Ruediger Hanke tomjoad at users.sourceforge.net
Wed Oct 2 16:34:03 CEST 2002


Update of /cvsroot/scummvm/scummvm/backends/morphos
In directory usw-pr-cvs1:/tmp/cvs-serv4669

Modified Files:
	morphos_sound.cpp morphos_sound.h morphos_start.cpp 
	MorphOS.readme 
Log Message:
Renamed new AMidi to Etude

Index: morphos_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_sound.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- morphos_sound.cpp	15 Sep 2002 09:16:28 -0000	1.4
+++ morphos_sound.cpp	2 Oct 2002 23:30:37 -0000	1.5
@@ -27,7 +27,7 @@
 #include <dos/dos.h>
 #include <exec/memory.h>
 #include <devices/ahi.h>
-#include <devices/amidi.h>
+#include <devices/etude.h>
 
 #include <clib/alib_protos.h>
 #include <proto/exec.h>
@@ -53,43 +53,40 @@
 static MsgPort 	   *ScummMidiPort = NULL;
 		 IOMidiRequest *ScummMidiRequest = NULL;
 
-		 Device        *AMidiBase = NULL;
+		 Device        *EtudeBase = NULL;
 
-bool init_morphos_music(ULONG MidiUnit)
+bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags)
 {
-	if (ScummMusicDriver && !stricmp(ScummMusicDriver, "-eamidi"))	  // just as ugly as the line below ...
+	MidiUnit = ScummMidiUnit;	// Ugly fix, but ...
+	ScummMidiPort = CreateMsgPort();
+	if (ScummMidiPort)
 	{
-		MidiUnit = ScummMidiUnit;	// Ugly fix, but ...
-		ScummMidiPort = CreateMsgPort();
-		if (ScummMidiPort)
+		ScummMidiRequest = (IOMidiRequest *) CreateIORequest(ScummMidiPort, sizeof (IOMidiRequest));
+		if (ScummMidiRequest)
 		{
-			ScummMidiRequest = (IOMidiRequest *) CreateIORequest(ScummMidiPort, sizeof (IOMidiRequest));
-			if (ScummMidiRequest)
-			{
-				ScummMidiRequest->amr_Version = 2;
-				if (OpenDevice("amidi.device", MidiUnit, (IORequest *) ScummMidiRequest, 0))
-				{
-					DeleteIORequest((IORequest *) ScummMidiRequest);
-					DeleteMsgPort(ScummMidiPort);
-					ScummMidiRequest = NULL;
-					ScummMidiPort = NULL;
-				}
-				AMidiBase = ScummMidiRequest->amr_Std.io_Device;
-			}
-			else
+			ScummMidiRequest->emr_Version = 1;
+			if (OpenDevice(ETUDENAME, MidiUnit, (IORequest *) ScummMidiRequest, DevFlags))
 			{
+				DeleteIORequest((IORequest *) ScummMidiRequest);
 				DeleteMsgPort(ScummMidiPort);
+				ScummMidiRequest = NULL;
 				ScummMidiPort = NULL;
 			}
+			EtudeBase = ScummMidiRequest->emr_Std.io_Device;
 		}
-
-		if (!ScummMidiRequest)
+		else
 		{
-			warning("Could not open AMidi - music will not play");
-			return false;
+			DeleteMsgPort(ScummMidiPort);
+			ScummMidiPort = NULL;
 		}
 	}
 
+	if (!ScummMidiRequest)
+	{
+		warning("Could not open Etude - music will not play");
+		return false;
+	}
+
 	return true;
 }
 
@@ -101,7 +98,9 @@
 		CloseDevice((IORequest *) ScummMidiRequest);
 		DeleteIORequest((IORequest *) ScummMidiRequest);
 		DeleteMsgPort(ScummMidiPort);
-		AMidiBase = NULL;
+		ScummMidiRequest = NULL;
+		ScummMidiPort = NULL;
+		EtudeBase = NULL;
 	}
 }
 

Index: morphos_sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_sound.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- morphos_sound.h	22 Aug 2002 12:12:41 -0000	1.1
+++ morphos_sound.h	2 Oct 2002 23:30:37 -0000	1.2
@@ -25,12 +25,12 @@
 #define MORPHOS_SOUND_H
 
 #include <exec/semaphores.h>
-#include <devices/amidi.h>
+#include <devices/etude.h>
 
 class OSystem_MorphOS;
 
 int morphos_sound_thread(OSystem_MorphOS *syst, ULONG SampleType);
-bool init_morphos_music(ULONG MidiUnit);
+bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags);
 void exit_morphos_music();
 
 extern SignalSemaphore ScummMusicThreadRunning;

Index: morphos_start.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_start.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- morphos_start.cpp	23 Sep 2002 19:22:49 -0000	1.4
+++ morphos_start.cpp	2 Oct 2002 23:30:37 -0000	1.5
@@ -117,7 +117,7 @@
 static STRPTR FindMusicDriver(STRPTR argval)
 {
 	if (!stricmp(argval, "off"))  	return "-enull";
-	if (!stricmp(argval, "midi"))	 	return "-eamidi";
+	if (!stricmp(argval, "midi"))	 	return "-eetude";
 	if (!stricmp(argval, "midiemu"))	return "-emidiemu";
 	if (!stricmp(argval, "adlib")) 	return "-eadlib";
 

Index: MorphOS.readme
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/MorphOS.readme,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- MorphOS.readme	21 Aug 2002 16:07:14 -0000	1.1.1.1
+++ MorphOS.readme	2 Oct 2002 23:30:37 -0000	1.2
@@ -1,7 +1,7 @@
 This directory contains the source for the MorphOS port of ScummVM. To build, you
-must have a proper Geek Gadgets installation. Just type "make" in the MorphOS
-subdirectory. If you don't have the includes for AMidi 2 and cdda.library, check
-my webpage. If they aren't uploaded yet, feel free to e-mail me.
+must have a proper Geek Gadgets installation. If you don't have the includes for
+Etude and cdda.library, check my webpage. If they aren't uploaded yet, feel free
+to e-mail me.
 
 You don't have to build ScummVM yourself. The latest official and CVS binaries are
 available from my website at:





More information about the Scummvm-git-logs mailing list