[Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.28,1.28.2.1 morphos.h,1.16,1.16.2.1 morphos_sound.cpp,1.6,1.6.4.1 morphos_sound.h,1.2,1.2.6.1 morphos_start.cpp,1.15,1.15.2.1
Ruediger Hanke
tomjoad at users.sourceforge.net
Tue Aug 5 12:50:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/backends/morphos
In directory sc8-pr-cvs1:/tmp/cvs-serv14339
Modified Files:
Tag: branch-0-5-0
morphos.cpp morphos.h morphos_sound.cpp morphos_sound.h
morphos_start.cpp
Log Message:
Fixes for 0.5.1
Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.cpp,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- morphos.cpp 22 Jul 2003 22:37:37 -0000 1.28
+++ morphos.cpp 5 Aug 2003 19:49:05 -0000 1.28.2.1
@@ -75,16 +75,15 @@
#define BLOCKS_Y (ScummBufferHeight/BLOCKSIZE_Y)
#define BLOCK_ID(x, y) ((y/BLOCKSIZE_Y)*BLOCKS_X+(x/BLOCKSIZE_X))
-OSystem_MorphOS *OSystem_MorphOS::create(int game_id, SCALERTYPE gfx_scaler, bool full_screen)
+OSystem_MorphOS *OSystem_MorphOS::create(SCALERTYPE gfx_scaler, bool full_screen)
{
- OSystem_MorphOS *syst = new OSystem_MorphOS(game_id, gfx_scaler, full_screen);
+ OSystem_MorphOS *syst = new OSystem_MorphOS(gfx_scaler, full_screen);
return syst;
}
-OSystem_MorphOS::OSystem_MorphOS(int game_id, SCALERTYPE gfx_mode, bool full_screen)
+OSystem_MorphOS::OSystem_MorphOS(SCALERTYPE gfx_mode, bool full_screen)
{
- GameID = game_id;
ScummScreen = NULL;
ScummWindow = NULL;
ScummBuffer = NULL;
@@ -364,6 +363,9 @@
{
CONST_STRPTR *ids = NULL, *names = NULL;
+ if (g_scumm)
+ GameID = g_scumm->_gameId;
+
switch (GameID)
{
case GID_MONKEY:
@@ -467,7 +469,8 @@
void OSystem_MorphOS::stop_cdrom()
{
- CDDA_Stop(CDrive);
+ if (CDrive)
+ CDDA_Stop(CDrive);
}
bool OSystem_MorphOS::poll_cdrom()
@@ -825,14 +828,10 @@
}
else if (MapRawKey(&FakedIEvent, &charbuf, 1, NULL) == 1)
{
- if (qual == KBD_CTRL)
+ if (qual == KBD_CTRL && charbuf == 'z')
{
- switch (charbuf)
- {
- case 'z':
- ReplyMsg((Message *) ScummMsg);
- quit();
- }
+ event->event_code = EVENT_QUIT;
+ break;
}
else if (qual == KBD_ALT)
{
@@ -846,8 +845,8 @@
}
else if (charbuf == 'x')
{
- ReplyMsg((Message *) ScummMsg);
- quit();
+ event->event_code = EVENT_QUIT;
+ break;
}
else if (charbuf == 0x0d)
{
@@ -932,8 +931,8 @@
}
case IDCMP_CLOSEWINDOW:
- ReplyMsg((Message *)ScummMsg);
- exit(0);
+ event->event_code = EVENT_QUIT;
+ break;
}
if (ScummMsg)
Index: morphos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.h,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- morphos.h 22 Jul 2003 20:36:43 -0000 1.16
+++ morphos.h 5 Aug 2003 19:49:06 -0000 1.16.2.1
@@ -36,7 +36,7 @@
class OSystem_MorphOS : public OSystem
{
public:
- OSystem_MorphOS(int game_id, SCALERTYPE gfx_mode, bool full_screen);
+ OSystem_MorphOS(SCALERTYPE gfx_mode, bool full_screen);
virtual ~OSystem_MorphOS();
// Set colors of the palette
@@ -123,7 +123,7 @@
// Quit
virtual void quit();
- static OSystem_MorphOS *create(int game_id, SCALERTYPE gfx_scaler, bool full_screen);
+ static OSystem_MorphOS *create(SCALERTYPE gfx_scaler, bool full_screen);
static bool OpenATimer(MsgPort **port, IORequest **req, ULONG unit, bool required = true);
Index: morphos_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_sound.cpp,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -d -r1.6 -r1.6.4.1
--- morphos_sound.cpp 25 Dec 2002 21:44:59 -0000 1.6
+++ morphos_sound.cpp 5 Aug 2003 19:49:06 -0000 1.6.4.1
@@ -55,9 +55,16 @@
Device *EtudeBase = NULL;
+bool etude_available()
+{
+ bool avail = init_morphos_music(ScummMidiUnit, ETUDEF_DIRECT);
+ if (avail)
+ exit_morphos_music();
+ return avail;
+}
+
bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags)
{
- MidiUnit = ScummMidiUnit; // Ugly fix, but ...
ScummMidiPort = CreateMsgPort();
if (ScummMidiPort)
{
@@ -65,7 +72,7 @@
if (ScummMidiRequest)
{
ScummMidiRequest->emr_Version = 1;
- if (OpenDevice(ETUDENAME, MidiUnit, (IORequest *) ScummMidiRequest, DevFlags))
+ if (OpenDevice(ETUDENAME, ScummMidiUnit, (IORequest *) ScummMidiRequest, DevFlags))
{
DeleteIORequest((IORequest *) ScummMidiRequest);
DeleteMsgPort(ScummMidiPort);
Index: morphos_sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_sound.h,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -d -r1.2 -r1.2.6.1
--- morphos_sound.h 2 Oct 2002 23:30:37 -0000 1.2
+++ morphos_sound.h 5 Aug 2003 19:49:06 -0000 1.2.6.1
@@ -30,6 +30,7 @@
class OSystem_MorphOS;
int morphos_sound_thread(OSystem_MorphOS *syst, ULONG SampleType);
+bool etude_available();
bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags);
void exit_morphos_music();
Index: morphos_start.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_start.cpp,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- morphos_start.cpp 23 Jul 2003 19:19:18 -0000 1.15
+++ morphos_start.cpp 5 Aug 2003 19:49:06 -0000 1.15.2.1
@@ -91,7 +91,7 @@
break;
}
- TheSystem = OSystem_MorphOS::create(game_id, gfx_scaler, full_screen);
+ TheSystem = OSystem_MorphOS::create(gfx_scaler, full_screen);
return TheSystem;
}
@@ -100,9 +100,6 @@
if (TheSystem)
delete TheSystem;
- if (g_engine)
- delete g_engine;
-
if (ScummPath)
FreeVec(ScummPath);
@@ -389,6 +386,13 @@
if (args[USG_NOSUBTITLES]) argv[argc++] = "-n";
if (args[USG_AMIGA]) argv[argc++] = "-a";
if (args[USG_MUSIC]) argv[argc++] = ScummMusicDriver;
+ else
+ {
+ if (etude_available())
+ argv[argc++] = "-eetude";
+ else
+ argv[argc++] = "-eadlib";
+ }
if (ScummGfxScaler != ST_INVALID)
{
sprintf(scaler, "-g%s", MorphOSScaler::GetParamName(ScummGfxScaler));
More information about the Scummvm-git-logs
mailing list