Implement new interface functions

svn-id: r8765
This commit is contained in:
Ruediger Hanke 2003-07-05 09:08:38 +00:00
parent c1002b4ad2
commit 12a04c8e52
2 changed files with 28 additions and 0 deletions

View File

@ -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();

View File

@ -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);