diff options
author | Ruediger Hanke | 2002-04-21 16:12:09 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-04-21 16:12:09 +0000 |
commit | 0fb625969cacf1545a1905fa7b57026932d188f6 (patch) | |
tree | 62a44cb7a204503c5d9f60034bd1e466d0744baa /morphos | |
parent | 25eafd60f2d9a3f12eaa7839d7f50e318db55895 (diff) | |
download | scummvm-rg350-0fb625969cacf1545a1905fa7b57026932d188f6.tar.gz scummvm-rg350-0fb625969cacf1545a1905fa7b57026932d188f6.tar.bz2 scummvm-rg350-0fb625969cacf1545a1905fa7b57026932d188f6.zip |
Fixes: cd audio, pointer in Simon, MidiUnit command line option works again
svn-id: r4035
Diffstat (limited to 'morphos')
-rw-r--r-- | morphos/morphos.cpp | 73 | ||||
-rw-r--r-- | morphos/morphos.h | 2 | ||||
-rw-r--r-- | morphos/morphos_sound.cpp | 1 | ||||
-rw-r--r-- | morphos/morphos_start.cpp | 2 |
4 files changed, 43 insertions, 35 deletions
diff --git a/morphos/morphos.cpp b/morphos/morphos.cpp index 98cedc1e2d..6482543d37 100644 --- a/morphos/morphos.cpp +++ b/morphos/morphos.cpp @@ -109,6 +109,7 @@ OSystem_MorphOS::OSystem_MorphOS( int game_id, SCALERTYPE gfx_mode, bool full_sc ScummSoundThread = NULL; ScummWinX = -1; ScummWinY = -1; + ScummDefaultMouse = false; ScummOrigMouse = false; ScummShakePos = 0; ScummPCMode = false; @@ -247,35 +248,32 @@ uint32 OSystem_MorphOS::property(int param, uint32 value) return 1; 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 ) { - 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 ) { - CDrive = CDDA_FindNextDrive( NULL, FindCDTags ); - if( CDrive ) + if( !CDDA_ObtainDrive( CDrive, CDDA_SHARED_ACCESS, NULL ) ) { - 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; + 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; - } + 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" ); + 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; case PROP_SHOW_DEFAULT_CURSOR: @@ -283,6 +281,7 @@ uint32 OSystem_MorphOS::property(int param, uint32 value) ClearPointer( ScummWindow ); else SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 ); + ScummOrigMouse = ScummDefaultMouse = value; break; case PROP_GET_SAMPLE_RATE: @@ -592,8 +591,11 @@ void OSystem_MorphOS::create_screen( CS_DSPTYPE dspType ) exit(1); } - SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 ); - ScummOrigMouse = false; + if( !ScummDefaultMouse ) + { + SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 ); + ScummOrigMouse = false; + } if( ScummScreen == NULL ) { @@ -770,20 +772,23 @@ bool OSystem_MorphOS::poll_event( Event *event ) newx = (ScummMsg->MouseX-ScummWindow->BorderLeft) >> ScummScale; newy = (ScummMsg->MouseY-ScummWindow->BorderTop) >> ScummScale; - if( newx < 0 || newx > 320 || - newy < 0 || newy > 200 - ) + if( !ScummDefaultMouse ) { - if( !ScummOrigMouse ) + if( newx < 0 || newx > 320 || + newy < 0 || newy > 200 + ) { - ScummOrigMouse = true; - ClearPointer( ScummWindow ); + if( !ScummOrigMouse ) + { + ScummOrigMouse = true; + ClearPointer( ScummWindow ); + } + } + else if( ScummOrigMouse ) + { + ScummOrigMouse = false; + SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 ); } - } - else if( ScummOrigMouse ) - { - ScummOrigMouse = false; - SetPointer( ScummWindow, ScummNoCursor, 1, 1, 0, 0 ); } event->event_code = EVENT_MOUSEMOVE; event->mouse.x = newx; diff --git a/morphos/morphos.h b/morphos/morphos.h index 93dad021fa..2406a5b806 100644 --- a/morphos/morphos.h +++ b/morphos/morphos.h @@ -138,6 +138,7 @@ class OSystem_MorphOS : public OSystem USHORT ScummColors16[256]; WORD ScummWinX; WORD ScummWinY; + bool ScummDefaultMouse; bool ScummOrigMouse; int ScummShakePos; bool FullScreenMode; @@ -197,6 +198,7 @@ extern OSystem_MorphOS *TheSystem; extern struct SignalSemaphore ScummMusicThreadRunning; extern struct SignalSemaphore ScummSoundThreadRunning; +extern LONG ScummMidiUnit; extern struct IOMidiRequest *ScummMidiRequest; extern struct timerequest *MusicTimerIORequest; diff --git a/morphos/morphos_sound.cpp b/morphos/morphos_sound.cpp index 67fa0ebaee..da74f786ac 100644 --- a/morphos/morphos_sound.cpp +++ b/morphos/morphos_sound.cpp @@ -56,6 +56,7 @@ static struct MsgPort *MusicTimerMsgPort = NULL; bool init_morphos_music( ULONG MidiUnit ) { + MidiUnit = ScummMidiUnit; // Ugly fix, but ... ScummMidiPort = CreateMsgPort(); if( ScummMidiPort ) { diff --git a/morphos/morphos_start.cpp b/morphos/morphos_start.cpp index 67d49c52be..0dc7d95440 100644 --- a/morphos/morphos_start.cpp +++ b/morphos/morphos_start.cpp @@ -48,7 +48,7 @@ static struct RDArgs *ScummArgs = NULL; static char*ScummStory = NULL; static char*ScummPath = NULL; static STRPTR ScummMusicDriver = NULL; -static LONG ScummMidiUnit = 0; + LONG ScummMidiUnit = 0; static LONG ScummMidiVolume = 0; static LONG ScummMidiTempo = 0; static OSystem_MorphOS::SCALERTYPE ScummGfxScaler = OSystem_MorphOS::ST_INVALID; |