diff options
author | Ruediger Hanke | 2003-07-05 09:08:38 +0000 |
---|---|---|
committer | Ruediger Hanke | 2003-07-05 09:08:38 +0000 |
commit | 12a04c8e52013b21aed7c8c2feecdfaa53416779 (patch) | |
tree | a4f5b236853a641fcf3eae49bd89272e8482a92c /backends/morphos | |
parent | c1002b4ad22d6bff69291fff17c44c1386af32ab (diff) | |
download | scummvm-rg350-12a04c8e52013b21aed7c8c2feecdfaa53416779.tar.gz scummvm-rg350-12a04c8e52013b21aed7c8c2feecdfaa53416779.tar.bz2 scummvm-rg350-12a04c8e52013b21aed7c8c2feecdfaa53416779.zip |
Implement new interface functions
svn-id: r8765
Diffstat (limited to 'backends/morphos')
-rw-r--r-- | backends/morphos/morphos.cpp | 25 | ||||
-rw-r--r-- | backends/morphos/morphos.h | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp index 2c9674101d..ebfd651c54 100644 --- a/backends/morphos/morphos.cpp +++ b/backends/morphos/morphos.cpp @@ -343,6 +343,8 @@ void OSystem_MorphOS::delete_mutex(void *mutex) uint32 OSystem_MorphOS::property(int param, Property *value) { + AUTO_LOCK + switch (param) { case PROP_TOGGLE_FULLSCREEN: @@ -362,6 +364,7 @@ uint32 OSystem_MorphOS::property(int param, Property *value) switch (GameID) { case GID_MONKEY: + case GID_MONKEY_SEGA: ids = MonkeyCDIDs; names = MonkeyNames; break; @@ -1426,6 +1429,7 @@ bool OSystem_MorphOS::set_sound_proc(OSystem::SoundProc *proc, void *param, OSys return true; } + void OSystem_MorphOS::fill_sound(byte *stream, int len) { if (SoundProc) @@ -1434,6 +1438,17 @@ void OSystem_MorphOS::fill_sound(byte *stream, int len) memset(stream, 0x0, len); } +void OSystem_MorphOS::clear_sound_proc() +{ + if (ScummSoundThread) + { + Signal((Task *) ScummSoundThread, SIGBREAKF_CTRL_C); + ObtainSemaphore(&ScummSoundThreadRunning); /* Wait for thread to finish */ + ReleaseSemaphore(&ScummSoundThreadRunning); + ScummSoundThread = NULL; + } +} + void OSystem_MorphOS::init_size(uint w, uint h) { if (ScummBuffer) @@ -1511,6 +1526,16 @@ void OSystem_MorphOS::init_size(uint w, uint h) CreateScreen(CSDSPTYPE_KEEP); } +int16 OSystem_MorphOS::get_width() +{ + return ScummScrWidth; +} + +int16 OSystem_MorphOS::get_height() +{ + return ScummScrHeight; +} + void OSystem_MorphOS::show_overlay() { UndrawMouse(); diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h index 2fed3dae28..124e7b17f3 100644 --- a/backends/morphos/morphos.h +++ b/backends/morphos/morphos.h @@ -72,6 +72,8 @@ class OSystem_MorphOS : public OSystem virtual void clear_overlay(); virtual void grab_overlay(int16 *buf, int pitch); virtual void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); + virtual int16 get_height(); + virtual int16 get_width(); // Get the number of milliseconds since the program was started. virtual uint32 get_msecs(); @@ -101,6 +103,7 @@ class OSystem_MorphOS : public OSystem // Set the function to be invoked whenever samples need to be generated virtual bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format); void fill_sound (byte * stream, int len); + void clear_sound_proc(); virtual uint32 property(int param, Property *value); |