[Scummvm-cvs-logs] CVS: scummvm/backends/dc dc.h,1.33,1.34 dcmain.cpp,1.27,1.28 display.cpp,1.27,1.28 input.cpp,1.18,1.19 time.cpp,1.7,1.8 vmsave.cpp,1.18,1.19

Max Horn fingolfin at users.sourceforge.net
Tue Sep 28 13:28:20 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/dc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3612/backends/dc

Modified Files:
	dc.h dcmain.cpp display.cpp input.cpp time.cpp vmsave.cpp 
Log Message:
Rename remaining OSystem methods to match our coding guidelines

Index: dc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/dc.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- dc.h	4 Sep 2004 01:30:59 -0000	1.33
+++ dc.h	28 Sep 2004 20:19:21 -0000	1.34
@@ -87,17 +87,17 @@
   void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
   
   // Shaking is used in SCUMM. Set current shake position.
-  void set_shake_pos(int shake_pos);
+  void setShakePos(int shake_pos);
 
   // Get the number of milliseconds since the program was started.
-  uint32 get_msecs();
+  uint32 getMillis();
   
   // Delay for a specified amount of milliseconds
-  void delay_msecs(uint msecs);
+  void delayMillis(uint msecs);
   
   // Get the next event.
   // Returns true if an event was retrieved.	
-  bool poll_event(Event *event);
+  bool pollEvent(Event &event);
   
   // Set function that generates samples 
   bool setSoundCallback(SoundProc proc, void *param);
@@ -112,16 +112,16 @@
 
   // Poll cdrom status
   // Returns true if cd audio is playing
-  bool poll_cdrom();
+  bool pollCD();
 
   // Play cdrom audio track
-  void play_cdrom(int track, int num_loops, int start_frame, int duration);
+  void playCD(int track, int num_loops, int start_frame, int duration);
   
   // Stop cdrom audio track
-  void stop_cdrom();
+  void stopCD();
 
   // Update cdrom audio status
-  void update_cdrom();
+  void updateCD();
 
   // Quit
   void quit();
@@ -147,7 +147,7 @@
   void setWindowCaption(const char *caption);
 
   // Savefile handling
-  SaveFileManager *get_savefile_manager();
+  SaveFileManager *getSavefileManager();
 
 
   static OSystem *create();

Index: dcmain.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/dcmain.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- dcmain.cpp	26 Aug 2004 21:51:26 -0000	1.27
+++ dcmain.cpp	28 Sep 2004 20:19:22 -0000	1.28
@@ -78,7 +78,7 @@
   return false;
 }
 
-void OSystem_Dreamcast::play_cdrom(int track, int num_loops, int start_frame, int duration)
+void OSystem_Dreamcast::playCD(int track, int num_loops, int start_frame, int duration)
 {
   int first_sec, last_sec;
 #if 1
@@ -95,18 +95,18 @@
   play_cdda_sectors(first_sec, last_sec, num_loops);
 }
 
-void OSystem_Dreamcast::stop_cdrom()
+void OSystem_Dreamcast::stopCD()
 {
   stop_cdda();
 }
 
-bool OSystem_Dreamcast::poll_cdrom()
+bool OSystem_Dreamcast::pollCD()
 {
   extern int getCdState();
   return getCdState() == 3;
 }
 
-void OSystem_Dreamcast::update_cdrom()
+void OSystem_Dreamcast::updateCD()
 {
   // Dummy.  The CD drive takes care of itself.
 }

Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/display.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- display.cpp	4 Sep 2004 01:30:59 -0000	1.27
+++ display.cpp	28 Sep 2004 20:19:22 -0000	1.28
@@ -238,7 +238,7 @@
   memcpy(_ms_buf, buf, w * h);
 }
 
-void OSystem_Dreamcast::set_shake_pos(int shake_pos)
+void OSystem_Dreamcast::setShakePos(int shake_pos)
 {
   _current_shake_pos = shake_pos;
 }

Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/input.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- input.cpp	14 Mar 2004 22:16:22 -0000	1.18
+++ input.cpp	28 Sep 2004 20:19:22 -0000	1.19
@@ -170,7 +170,7 @@
   return 0;
 }
 
-bool OSystem_Dreamcast::poll_event(Event *event)
+bool OSystem_Dreamcast::pollEvent(Event &event)
 {
   unsigned int t = Timer();
 
@@ -189,29 +189,29 @@
   setimask(15);
   checkSound();
   int e = handleInput(locked_get_pads(), _ms_cur_x, _ms_cur_y,
-		      event->kbd.flags, (_softkbd_on? &_softkbd : NULL));
+		      event.kbd.flags, (_softkbd_on? &_softkbd : NULL));
   setimask(mask);
   if (_ms_cur_x<0) _ms_cur_x=0;
   if (_ms_cur_x>=_screen_w) _ms_cur_x=_screen_w-1;
   if (_ms_cur_y<0) _ms_cur_y=0;
   if (_ms_cur_y>=_screen_h) _ms_cur_y=_screen_h-1;
-  event->mouse.x = _ms_cur_x;
-  event->mouse.y = _ms_cur_y;
+  event.mouse.x = _ms_cur_x;
+  event.mouse.y = _ms_cur_y;
   if (_overlay_visible) {
-    event->mouse.x -= _overlay_x;
-    event->mouse.y -= _overlay_y;
+    event.mouse.x -= _overlay_x;
+    event.mouse.y -= _overlay_y;
   }
-  event->kbd.ascii = event->kbd.keycode = 0;
+  event.kbd.ascii = event.kbd.keycode = 0;
   if(e<0) {
-    event->event_code = (EventCode)-e;
+    event.event_code = (EventCode)-e;
     return true;
   } else if(e>0) {
     bool processed = false, down = !(e&(1<<30));
     e &= ~(1<<30);
     if(e < 1000) {
-      event->event_code = (down? EVENT_KEYDOWN : EVENT_KEYUP);
-      event->kbd.keycode = e;
-      event->kbd.ascii = (e>='a' && e<='z' && (event->kbd.flags & KBD_SHIFT)?
+      event.event_code = (down? EVENT_KEYDOWN : EVENT_KEYUP);
+      event.kbd.keycode = e;
+      event.kbd.ascii = (e>='a' && e<='z' && (event.kbd.flags & KBD_SHIFT)?
 			  e &~ 0x20 : e);
       processed = true;
     } else if(down) {
@@ -221,12 +221,12 @@
     }
     return processed;
   } else if(_ms_cur_x != _ms_old_x || _ms_cur_y != _ms_old_y) {
-    event->event_code = EVENT_MOUSEMOVE;
+    event.event_code = EVENT_MOUSEMOVE;
     _ms_old_x = _ms_cur_x;
     _ms_old_y = _ms_cur_y;
     return true;
   } else {
-    event->event_code = (EventCode)0;
+    event.event_code = (EventCode)0;
     return false;
   }
 }

Index: time.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/time.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- time.cpp	15 Mar 2004 01:18:37 -0000	1.7
+++ time.cpp	28 Sep 2004 20:19:22 -0000	1.8
@@ -27,7 +27,7 @@
 #include "dc.h"
 
 
-uint32 OSystem_Dreamcast::get_msecs()
+uint32 OSystem_Dreamcast::getMillis()
 {
   static uint32 msecs=0;
   static unsigned int t0=0;
@@ -43,14 +43,14 @@
   return msecs += dm;
 }
 
-void OSystem_Dreamcast::delay_msecs(uint msecs)
+void OSystem_Dreamcast::delayMillis(uint msecs)
 {
-  get_msecs();
+  getMillis();
   unsigned int t, start = Timer();
   int time = (((unsigned int)msecs)*100000U)>>11;
   while(((int)((t = Timer())-start))<time)
     checkSound();
-  get_msecs();
+  getMillis();
 }
 
 void OSystem_Dreamcast::setTimerCallback(TimerProc callback, int timer)

Index: vmsave.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/vmsave.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- vmsave.cpp	26 Aug 2004 21:56:25 -0000	1.18
+++ vmsave.cpp	28 Sep 2004 20:19:22 -0000	1.19
@@ -341,7 +341,7 @@
     tryList(prefix, marks, num, i);
 }
 
-SaveFileManager *OSystem_Dreamcast::get_savefile_manager()
+SaveFileManager *OSystem_Dreamcast::getSavefileManager()
 {
   return new VMSaveManager();
 }





More information about the Scummvm-git-logs mailing list