[Scummvm-cvs-logs] CVS: scummvm/morphos morphos.cpp,1.12,1.13 morphos.h,1.4,1.5 morphos_sound.cpp,1.8,1.9 morphos_start.cpp,1.2,1.3

Ruediger Hanke tomjoad at users.sourceforge.net
Sun Apr 21 09:13:02 CEST 2002


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

Modified Files:
	morphos.cpp morphos.h morphos_sound.cpp morphos_start.cpp 
Log Message:
Fixes: cd audio, pointer in Simon, MidiUnit command line option works again

Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** morphos.cpp	19 Apr 2002 10:18:12 -0000	1.12
--- morphos.cpp	21 Apr 2002 16:12:09 -0000	1.13
***************
*** 110,113 ****
--- 110,114 ----
  	ScummWinX = -1;
  	ScummWinY = -1;
+ 	ScummDefaultMouse = false;
  	ScummOrigMouse = false;
  	ScummShakePos = 0;
***************
*** 248,280 ****
  
  		case PROP_OPEN_CD:
! 			if( value )
  			{
! 				FindCDTags[ 0 ].ti_Data = (ULONG)((GameID == GID_LOOM256) ? "LoomCD" : "Monkey1CD");
! 				if( !CDDABase ) CDDABase = OpenLibrary( "cdda.library", 0 );
! 				if( CDDABase )
  				{
! 					CDrive = CDDA_FindNextDrive( NULL, FindCDTags );
! 					if( CDrive )
  					{
! 						if( !CDDA_ObtainDrive( CDrive, CDDA_SHARED_ACCESS, NULL ) )
! 						{
! 							CDrive = NULL;
! 							warning( "Failed to obtain CD drive - music will not play" );
! 						}
! 						else if( GameID == GID_LOOM256 )
! 						{
! 							// Offset correction *may* be required
! 							struct CDS_TrackInfo ti;
  
! 							if( CDDA_GetTrackInfo( CDrive, 1, 0, &ti ) )
! 								CDDATrackOffset = ti.ti_TrackStart.tm_Format.tm_Frame-22650;
! 						}
  					}
- 					else
- 						warning( "Could not find game CD inserted in CD-ROM drive - cd audio will not play" );
  				}
  				else
! 					warning( "Failed to open cdda.library - cd audio will not play" );
  			}
  			break;
  
--- 249,278 ----
  
  		case PROP_OPEN_CD:
! 			FindCDTags[ 0 ].ti_Data = (ULONG)((GameID == GID_LOOM256) ? "LoomCD" : "Monkey1CD");
! 			if( !CDDABase ) CDDABase = OpenLibrary( "cdda.library", 0 );
! 			if( CDDABase )
  			{
! 				CDrive = CDDA_FindNextDrive( NULL, FindCDTags );
! 				if( CDrive )
  				{
! 					if( !CDDA_ObtainDrive( CDrive, CDDA_SHARED_ACCESS, NULL ) )
  					{
! 						CDrive = NULL;
! 						warning( "Failed to obtain CD drive - music will not play" );
! 					}
! 					else if( GameID == GID_LOOM256 )
! 					{
! 						// Offset correction *may* be required
! 						struct CDS_TrackInfo ti;
  
! 						if( CDDA_GetTrackInfo( CDrive, 1, 0, &ti ) )
! 							CDDATrackOffset = ti.ti_TrackStart.tm_Format.tm_Frame-22650;
  					}
  				}
  				else
! 					warning( "Could not find game CD inserted in CD-ROM drive - cd audio will not play" );
  			}
+ 			else
+ 				warning( "Failed to open cdda.library - cd audio will not play" );
  			break;
  
***************
*** 284,287 ****
--- 282,286 ----
  			else
  				SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 );
+ 			ScummOrigMouse = ScummDefaultMouse = value;
  			break;
  
***************
*** 593,598 ****
  	}
  
! 	SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 );
! 	ScummOrigMouse = false;
  
  	if( ScummScreen == NULL )
--- 592,600 ----
  	}
  
! 	if( !ScummDefaultMouse )
! 	{
! 		SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 );
! 		ScummOrigMouse = false;
! 	}
  
  	if( ScummScreen == NULL )
***************
*** 771,788 ****
  				newy = (ScummMsg->MouseY-ScummWindow->BorderTop) >> ScummScale;
  
! 				if( newx < 0 || newx > 320 ||
! 					 newy < 0 || newy > 200
! 				  )
  				{
! 					if( !ScummOrigMouse )
  					{
! 						ScummOrigMouse = true;
! 						ClearPointer( ScummWindow );
  					}
- 				}
- 				else if( ScummOrigMouse )
- 				{
- 					ScummOrigMouse = false;
- 					SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 );
  				}
  				event->event_code = EVENT_MOUSEMOVE;
--- 773,793 ----
  				newy = (ScummMsg->MouseY-ScummWindow->BorderTop) >> ScummScale;
  
! 				if( !ScummDefaultMouse )
  				{
! 					if( newx < 0 || newx > 320 ||
! 						 newy < 0 || newy > 200
! 					  )
  					{
! 						if( !ScummOrigMouse )
! 						{
! 							ScummOrigMouse = true;
! 							ClearPointer( ScummWindow );
! 						}
! 					}
! 					else if( ScummOrigMouse )
! 					{
! 						ScummOrigMouse = false;
! 						SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 );
  					}
  				}
  				event->event_code = EVENT_MOUSEMOVE;

Index: morphos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** morphos.h	18 Apr 2002 21:40:24 -0000	1.4
--- morphos.h	21 Apr 2002 16:12:09 -0000	1.5
***************
*** 139,142 ****
--- 139,143 ----
  		WORD			    		ScummWinX;
  		WORD			    		ScummWinY;
+ 		bool			    		ScummDefaultMouse;
  		bool			    		ScummOrigMouse;
  		int 			    		ScummShakePos;
***************
*** 198,201 ****
--- 199,203 ----
  extern struct SignalSemaphore ScummSoundThreadRunning;
  
+ extern LONG ScummMidiUnit;
  extern struct IOMidiRequest *ScummMidiRequest;
  extern struct timerequest   *MusicTimerIORequest;

Index: morphos_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos_sound.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** morphos_sound.cpp	19 Apr 2002 10:18:12 -0000	1.8
--- morphos_sound.cpp	21 Apr 2002 16:12:09 -0000	1.9
***************
*** 57,60 ****
--- 57,61 ----
  bool init_morphos_music( ULONG MidiUnit )
  {
+ 	MidiUnit = ScummMidiUnit;	// Ugly fix, but ...
  	ScummMidiPort = CreateMsgPort();
  	if( ScummMidiPort )

Index: morphos_start.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos_start.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** morphos_start.cpp	18 Apr 2002 21:40:24 -0000	1.2
--- morphos_start.cpp	21 Apr 2002 16:12:09 -0000	1.3
***************
*** 49,53 ****
  static char*ScummPath = NULL;
  static STRPTR ScummMusicDriver = NULL;
! static LONG ScummMidiUnit = 0;
  static LONG ScummMidiVolume = 0;
  static LONG ScummMidiTempo = 0;
--- 49,53 ----
  static char*ScummPath = NULL;
  static STRPTR ScummMusicDriver = NULL;
! 		 LONG ScummMidiUnit = 0;
  static LONG ScummMidiVolume = 0;
  static LONG ScummMidiTempo = 0;





More information about the Scummvm-git-logs mailing list