[Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.13,1.14 morphos_start.cpp,1.9,1.10

Ruediger Hanke tomjoad at users.sourceforge.net
Mon Dec 2 11:09:52 CET 2002


Update of /cvsroot/scummvm/scummvm/backends/morphos
In directory sc8-pr-cvs1:/tmp/cvs-serv14842

Modified Files:
	morphos.cpp morphos_start.cpp 
Log Message:
Latest MorphOS changes from my harddisk ...

Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- morphos.cpp	15 Nov 2002 15:06:19 -0000	1.13
+++ morphos.cpp	2 Dec 2002 19:03:03 -0000	1.14
@@ -47,8 +47,6 @@
 #include <proto/cdda.h>
 #include <proto/cybergraphics.h>
 
-#include <emul/emulinterface.h>
-
 #include <time.h>
 
 #include "morphos.h"
@@ -66,17 +64,6 @@
 										  { TAG_DONE,		   0 }
 										};
 
-TagItem musicProcTags[] = { { NP_Entry,       0							       	  },
-									 { NP_Name,        (ULONG)"ScummVM Music Thread"  },
-									 { NP_Priority,    60 							        },
-									 {	TAG_DONE,       0 					       		  }
-								  };
-TagItem soundProcTags[] = { { NP_Entry,       0							       	  },
-									 { NP_Name,        (ULONG)"ScummVM Sound Thread"  },
-									 { NP_Priority,    0  							        },
-									 { TAG_DONE,       0 					       		  }
-								  };
-
 #define BLOCKSIZE_X	32
 #define BLOCKSIZE_Y	8
 
@@ -188,7 +175,7 @@
 	if (ScummMusicThread)
 	{
 		Signal((Task *) ScummMusicThread, SIGBREAKF_CTRL_C);
-		ObtainSemaphore(&ScummMusicThreadRunning);	 /* Wait for thread to finish */
+		ObtainSemaphore(&ScummMusicThreadRunning);    /* Wait for thread to finish */
 		ReleaseSemaphore(&ScummMusicThreadRunning);
 	}
 
@@ -270,10 +257,11 @@
 
 void OSystem_MorphOS::delay_msecs(uint msecs)
 {
-	TimerIORequest->tr_node.io_Command = TR_ADDREQUEST;
+/*	  TimerIORequest->tr_node.io_Command = TR_ADDREQUEST;
 	TimerIORequest->tr_time.tv_secs = 0;
 	TimerIORequest->tr_time.tv_micro = msecs*1000;
-	DoIO((IORequest *) TimerIORequest);
+	DoIO((IORequest *) TimerIORequest);*/
+	TimeDelay(UNIT_MICROHZ, 0, msecs*1000);
 }
 
 void OSystem_MorphOS::set_timer(int timer, int (*callback)(int))
@@ -283,15 +271,10 @@
 
 void *OSystem_MorphOS::create_thread(ThreadProc *proc, void *param)
 {
-	static EmulFunc ThreadEmulFunc;
-
-	ThreadEmulFunc.Trap      = TRAP_FUNC;
-	ThreadEmulFunc.Address	 = (ULONG)proc;
-	ThreadEmulFunc.StackSize = 16000;
-	ThreadEmulFunc.Extension = 0;
-	ThreadEmulFunc.Arg1	    = (ULONG)param;
-	musicProcTags[0].ti_Data = (ULONG)&ThreadEmulFunc;
-	ScummMusicThread = CreateNewProc(musicProcTags);
+	ScummMusicThread = CreateNewProcTags(NP_Entry, (ULONG) proc, NP_CodeType, CODETYPE_PPC,
+													 NP_Name, (ULONG) "ScummVM Music Thread",
+													 NP_Priority, 80, NP_StackSize, 32000,
+													 NP_PPC_Arg1, (ULONG) param, TAG_DONE);
 	return ScummMusicThread;
 }
 
@@ -1300,24 +1283,17 @@
 
 bool OSystem_MorphOS::set_sound_proc(void *param, OSystem::SoundProc *proc, byte format)
 {
-	static EmulFunc MySoundEmulFunc;
-
 	SoundProc = proc;
 	SoundParam = param;
 
 	/*
 	 * Create Sound Thread
 	 */
-	MySoundEmulFunc.Trap      = TRAP_FUNC;
-	MySoundEmulFunc.Address	  = (ULONG)&morphos_sound_thread;
-	MySoundEmulFunc.StackSize = 8192;
-	MySoundEmulFunc.Extension = 0;
-	MySoundEmulFunc.Arg1	     = (ULONG)this;
-	MySoundEmulFunc.Arg2	     = AHIST_S16S;
-
-	soundProcTags[0].ti_Data = (ULONG)&MySoundEmulFunc;
-	ScummSoundThread = CreateNewProc(soundProcTags);
-
+	ScummSoundThread = CreateNewProcTags(NP_Entry, (ULONG) &morphos_sound_thread,
+													 NP_CodeType, CODETYPE_PPC,
+													 NP_Name, (ULONG) "ScummVM Sound Thread",
+													 NP_PPC_Arg1, (ULONG) this,
+													 NP_PPC_Arg2, AHIST_S16S, TAG_DONE);
 	if (!ScummSoundThread)
 	{
 		puts("Failed to create sound thread");

Index: morphos_start.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_start.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- morphos_start.cpp	15 Nov 2002 15:05:34 -0000	1.9
+++ morphos_start.cpp	2 Dec 2002 19:03:07 -0000	1.10
@@ -31,7 +31,6 @@
 #include <proto/exec.h>
 #include <proto/dos.h>
 #include <proto/cdda.h>
-#include <proto/cybergraphics.h>
 #include <proto/icon.h>
 
 #include "stdafx.h"
@@ -44,7 +43,7 @@
 extern "C" WBStartup *_WBenchMsg;
 
 // For command line parsing
-static STRPTR usageTemplate = "STORY/A,DATAPATH/K,WINDOW/S,SCALER/K,AMIGA/S,MIDIUNIT/K/N,MUSIC/K,MUSICVOL/K/N,SFXVOL/K/N,TEMPO/K/N,TALKSPEED/K/N,NOSUBTITLES=NST/S";
+static STRPTR usageTemplate = "STORY,DATAPATH/K,WINDOW/S,SCALER/K,AMIGA/S,MIDIUNIT/K/N,MUSIC/K,MUSICVOL/K/N,SFXVOL/K/N,TEMPO/K/N,TALKSPEED/K/N,NOSUBTITLES=NST/S";
 typedef enum { USG_STORY = 0,	 USG_DATAPATH,  USG_WINDOW,  USG_SCALER, 	  USG_AMIGA,  USG_MIDIUNIT,  USG_MUSIC,   USG_MUSICVOL, USG_SFXVOL,    USG_TEMPO,   USG_TALKSPEED, USG_NOSUBTITLES } usageFields;
 static LONG	args[13] =  { (ULONG) NULL, (ULONG) NULL, FALSE, (ULONG) NULL, false, (ULONG) NULL, (ULONG) NULL, (ULONG) NULL, (ULONG) NULL,	(ULONG) NULL, (ULONG) NULL, false };
 static RDArgs *ScummArgs = NULL;
@@ -64,7 +63,6 @@
 
 Library *CDDABase = NULL;
 Library *TimerBase = NULL;
-struct Library* CyberGfxBase = NULL;
 
 OSystem_MorphOS *TheSystem = NULL;
 
@@ -118,9 +116,6 @@
 
 	if (CDDABase)
 		CloseLibrary(CDDABase);
-
-	if (CyberGfxBase)
-		CloseLibrary(CyberGfxBase);
 }
 
 static STRPTR FindMusicDriver(STRPTR argval)
@@ -254,10 +249,6 @@
 	char musicvol[6], sfxvol[6], talkspeed[12], tempo[12], scaler[14];
 	int argc = 0;
 
-	CyberGfxBase = OpenLibrary("cybergraphics.library",50);
-	if (CyberGfxBase == NULL)
-		exit(1);
-
 	InitSemaphore(&ScummSoundThreadRunning);
 	InitSemaphore(&ScummMusicThreadRunning);
 
@@ -365,7 +356,8 @@
 		sprintf(talkspeed, "-y%d", ScummTalkSpeed);
 		argv[argc++] = talkspeed;
 	}
-	argv[argc++] = ScummStory;
+	if (ScummStory)
+		argv[argc++] = ScummStory;
 
 	return morphos_main(argc, argv);
 }





More information about the Scummvm-git-logs mailing list