[Scummvm-cvs-logs] CVS: scummvm/backends/dc dc.h,1.11,1.12 dcmain.cpp,1.7,1.8 audio.cpp,1.4,1.5

Marcus Comstedt marcus_c at users.sourceforge.net
Wed Jun 18 14:07:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/dc
In directory sc8-pr-cvs1:/tmp/cvs-serv881

Modified Files:
	dc.h dcmain.cpp audio.cpp 
Log Message:
Added some missing methods and a constructor.

Index: dc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/dc.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- dc.h	29 May 2003 22:34:32 -0000	1.11
+++ dc.h	18 Jun 2003 21:06:03 -0000	1.12
@@ -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 @@
   
   // 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

Index: dcmain.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/dcmain.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dcmain.cpp	29 May 2003 21:45:22 -0000	1.7
+++ dcmain.cpp	18 Jun 2003 21:06:03 -0000	1.8
@@ -42,6 +42,16 @@
 	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)
 {

Index: audio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/audio.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- audio.cpp	29 May 2003 22:34:32 -0000	1.4
+++ audio.cpp	18 Jun 2003 21:06:03 -0000	1.5
@@ -49,10 +49,19 @@
   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();





More information about the Scummvm-git-logs mailing list