aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMarcus Comstedt2003-06-18 21:06:03 +0000
committerMarcus Comstedt2003-06-18 21:06:03 +0000
commit7d6717eaa7f25da077722a7d48c7237b20a6c5f1 (patch)
tree01f6323b3ad1e5c6dc80117fd0cc945a2f10070f /backends
parentac23e56e85c909996c6facee902da7d65db81306 (diff)
downloadscummvm-rg350-7d6717eaa7f25da077722a7d48c7237b20a6c5f1.tar.gz
scummvm-rg350-7d6717eaa7f25da077722a7d48c7237b20a6c5f1.tar.bz2
scummvm-rg350-7d6717eaa7f25da077722a7d48c7237b20a6c5f1.zip
Added some missing methods and a constructor.
svn-id: r8540
Diffstat (limited to 'backends')
-rw-r--r--backends/dc/audio.cpp9
-rw-r--r--backends/dc/dc.h5
-rw-r--r--backends/dc/dcmain.cpp10
3 files changed, 24 insertions, 0 deletions
diff --git a/backends/dc/audio.cpp b/backends/dc/audio.cpp
index 526d8cbbef..23af162e9a 100644
--- a/backends/dc/audio.cpp
+++ b/backends/dc/audio.cpp
@@ -49,11 +49,20 @@ bool OSystem_Dreamcast::set_sound_proc(SoundProc *proc, void *param, SoundFormat
return true;
}
+void OSystem_Dreamcast::clear_sound_proc()
+{
+ _sound_proc = NULL;
+ _sound_proc_param = NULL;
+}
+
void OSystem_Dreamcast::checkSound()
{
int n;
int curr_ring_buffer_samples;
+ if(!_sound_proc)
+ return;
+
if(read_sound_int(&SOUNDSTATUS->mode) != MODE_PLAY)
start_sound();
diff --git a/backends/dc/dc.h b/backends/dc/dc.h
index 56cdb8dd00..775c33b54f 100644
--- a/backends/dc/dc.h
+++ b/backends/dc/dc.h
@@ -6,12 +6,16 @@
class OSystem_Dreamcast : public OSystem {
public:
+ OSystem_Dreamcast();
+
// Set colors of the palette
void set_palette(const byte *colors, uint start, uint num);
// Set the size of the video bitmap.
// Typically, 320x200
void init_size(uint w, uint h);
+ int16 get_height() { return _screen_h; }
+ int16 get_width() { return _screen_w; }
// Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap
@@ -49,6 +53,7 @@ class OSystem_Dreamcast : public OSystem {
// Set function that generates samples
bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format);
+ void clear_sound_proc();
// Poll cdrom status
// Returns true if cd audio is playing
diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp
index c83271b294..5832167ac7 100644
--- a/backends/dc/dcmain.cpp
+++ b/backends/dc/dcmain.cpp
@@ -42,6 +42,16 @@ OSystem *OSystem_Dreamcast::create() {
return syst;
}
+OSystem_Dreamcast::OSystem_Dreamcast()
+ : screen(NULL), mouse(NULL), overlay(NULL), _ms_buf(NULL),
+ _sound_proc(NULL), _timer_active(false)
+{
+ memset(screen_tx, 0, sizeof(screen_tx));
+ memset(mouse_tx, 0, sizeof(screen_tx));
+ memset(ovl_tx, 0, sizeof(screen_tx));
+}
+
+
/* CD Audio */
static bool find_track(int track, int &first_sec, int &last_sec)
{