[Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.19,1.20 morphos_start.cpp,1.12,1.13 morphos_timer.cpp,1.8,1.9

Ruediger Hanke tomjoad at users.sourceforge.net
Sat Apr 26 04:44:08 CEST 2003


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

Modified Files:
	morphos.cpp morphos_start.cpp morphos_timer.cpp 
Log Message:
Whatever I changed since last commit ...

Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- morphos.cpp	8 Mar 2003 06:52:13 -0000	1.19
+++ morphos.cpp	26 Apr 2003 11:43:44 -0000	1.20
@@ -22,6 +22,7 @@
  */
 
 #include "stdafx.h"
+#include "engine.h"
 #include "common/util.h"
 #include "scumm/scumm.h"
 
@@ -54,9 +55,6 @@
 #include "morphos_sound.h"
 #include "morphos_scaler.h"
 
-static TagItem FindCDTags[] = { { CDFA_VolumeName, 0 },
-										  { TAG_DONE,        0 }
-										};
 static TagItem PlayTags[] =   { { CDPA_StartTrack, 1 },
 										  { CDPA_StartFrame, 0 },
 										  { CDPA_EndTrack,   1 },
@@ -65,6 +63,11 @@
 										  { TAG_DONE,		   0 }
 										};
 
+static CONST_STRPTR MonkeyCDIDs[] = { "ID2500496F035CBC", "ID250040360345DB", NULL };
+static CONST_STRPTR LoomCDIDs[]   = { NULL };
+static CONST_STRPTR MonkeyNames[] = { "Monkey1CD", "Madness", NULL };
+static CONST_STRPTR LoomNames[]   = { "LoomCD", NULL };
+
 #define BLOCKSIZE_X	32
 #define BLOCKSIZE_Y	8
 
@@ -352,16 +355,54 @@
 			return 1;
 
 		case PROP_OPEN_CD:
-			FindCDTags[0].ti_Data = (ULONG) ((GameID == GID_LOOM256) ? "LoomCD" : "Monkey1CD");
+		{
+			CONST_STRPTR *ids = NULL, *names = NULL;
+
+			switch (GameID)
+			{
+				case GID_MONKEY:
+					ids = MonkeyCDIDs;
+					names = MonkeyNames;
+					break;
+
+				case GID_LOOM256:
+					ids = LoomCDIDs;
+					names = LoomNames;
+					break;
+			}
+
 			if (!CDDABase) CDDABase = OpenLibrary("cdda.library", 2);
 			if (CDDABase)
 			{
-				CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
-				if (!CDrive && GameID == GID_MONKEY)
+				CDrive = NULL;
+				if (ids)
 				{
-					FindCDTags[0].ti_Data = (ULONG) "Madness";
-					CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
+					int i = 0;
+
+					while (ids[i] && !CDrive)
+					{
+						TagItem FindCDTags[] =  { { CDFA_CDID, (ULONG) ids[i] },
+														  { TAG_DONE,  0      }
+														};
+						CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
+						i++;
+					}
 				}
+
+				if (!CDrive && names)
+				{
+					int i = 0;
+
+					while (names[i] && !CDrive)
+					{
+						TagItem FindCDTags[] =  { { CDFA_VolumeName, (ULONG) names[i] },
+														  { TAG_DONE,        0        }
+														};
+						CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
+						i++;
+					}
+				}
+
 				if (CDrive)
 				{
 					if (!CDDA_ObtainDriveA(CDrive, CDDA_SHARED_ACCESS, NULL))
@@ -384,6 +425,7 @@
 			else
 				warning( "Failed to open cdda.library - cd audio will not play" );
 			break;
+		}
 
 		case PROP_SHOW_DEFAULT_CURSOR:
 			if (value->show_cursor)
@@ -809,7 +851,7 @@
 					}
 
 					event->kbd.ascii = charbuf;
-					event->kbd.keycode = event->kbd.ascii;
+					event->kbd.keycode = charbuf;
 				}
 				break;
 			}
@@ -1506,11 +1548,6 @@
 
 	do
 	{
-/*		  for (x = 0; x < ScummBufferWidth; x++)
-		{
-			*buf++ = (src[0]*31/255 << 11) | (src[1]*63/255 << 5) | src[2]*31/255;
-			src += 3;
-		}*/
 		for (x = 0; x < pitch; x++)
 		{
 			*buf++ = (src[0]*31/255 << 11) | (src[1]*63/255 << 5) | src[2]*31/255;
@@ -1528,7 +1565,6 @@
 	LONG last_col[2] = { -1, -1 };
 	LONG last_pen[2] = { -1, -1 };
 
-	printf("copy_rect_overlay(%d, %d, %d, %d, %d)\n", pitch, x, y, w, h);
 	if (w > pitch) w = pitch;
 	bmap = (UBYTE*) AllocVec(w*h, MEMF_ANY);
 	if (bmap)

Index: morphos_start.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_start.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- morphos_start.cpp	30 Jan 2003 22:32:26 -0000	1.12
+++ morphos_start.cpp	26 Apr 2003 11:43:44 -0000	1.13
@@ -35,6 +35,7 @@
 
 #include "stdafx.h"
 #include "scumm/scumm.h"
+#include "common/scaler.h"
 #include "sound/mididrv.h"
 #include "morphos.h"
 #include "morphos_scaler.h"

Index: morphos_timer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_timer.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- morphos_timer.cpp	25 Jan 2003 21:17:00 -0000	1.8
+++ morphos_timer.cpp	26 Apr 2003 11:43:44 -0000	1.9
@@ -40,7 +40,7 @@
 	TimerServiceThread = CreateNewProcTags(NP_Entry, 	 (ULONG) TimerService,
 														NP_CodeType, CODETYPE_PPC,
 														NP_Name,  	 (ULONG) "ScummVM Timer Service",
-														NP_Priority, 50,
+														NP_Priority, 20,
 														NP_PPC_Arg1, (ULONG) this,
 														NP_PPC_Arg2, (ULONG) engine,
 														TAG_DONE





More information about the Scummvm-git-logs mailing list