[Scummvm-cvs-logs] CVS: scummvm/common system.h,1.43,1.44 timer.cpp,1.14,1.15
Max Horn
fingolfin at users.sourceforge.net
Sat Sep 27 09:55:03 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/dc audio.cpp,1.7,1.8 dc.h,1.15,1.16 dcmain.cpp,1.16,1.17 time.cpp,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.31,1.32 morphos.h,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv9475
Modified Files:
system.h timer.cpp
Log Message:
OSystem changes: removed create_thread() method (not needed anymore; 'pure' threads aren't very portable anyway, better we only use timers); introduced OSystem::TimerProc type
Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/system.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- system.h 20 Sep 2003 00:47:18 -0000 1.43
+++ system.h 27 Sep 2003 16:54:11 -0000 1.44
@@ -33,15 +33,14 @@
* and use it to interact with the system.
*
* In particular, a backend provides a video surface for ScummVM to draw in;
- * methods to create threads and timers, to handle user input events,
+ * methods to create timers, to handle user input events,
* control audio CD playback, and sound output.
*/
class OSystem {
public:
typedef struct Mutex *MutexRef;
- typedef int ThreadProc(void *param);
- typedef void SoundProc(void *param, byte *buf, int len);
- //typedef int TimerProc(int interval);
+ typedef void (*SoundProc)(void *param, byte *buf, int len);
+ typedef int (*TimerProc)(int interval);
/**
* The types of events backends can generate.
@@ -213,7 +212,7 @@
- /** @name Events and Threads */
+ /** @name Events and Time */
//@{
/** Get the number of milliseconds since the program was started. */
@@ -222,16 +221,8 @@
/** Delay/sleep for the specified amount of milliseconds. */
virtual void delay_msecs(uint msecs) = 0;
- /**
- * Create a thread with the given entry procedure.
- * @param proc the thread main procedure
- * @param param an arbitrary parameter which is stored and passed to proc
- * @return
- */
- virtual void create_thread(ThreadProc *proc, void *param) = 0;
-
- /** Add a new callback timer. */
- virtual void set_timer(int timer, int (*callback)(int)) = 0;
+ /** Set the timer callback. */
+ virtual void set_timer(TimerProc callback, int interval) = 0;
/**
* Get the next event in the event queue.
@@ -253,7 +244,7 @@
* @param param an arbitrary parameter which is stored and passed to proc.
* @param format the sample type format.
*/
- virtual bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format) = 0;
+ virtual bool set_sound_proc(SoundProc proc, void *param, SoundFormat format) = 0;
/**
* Remove any audio callback previously set via set_sound_proc, thus effectively
Index: timer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/timer.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- timer.cpp 10 Sep 2003 12:43:53 -0000 1.14
+++ timer.cpp 27 Sep 2003 16:54:11 -0000 1.15
@@ -46,7 +46,7 @@
_thisTime = _system->get_msecs();
// Set the timer last, after everything has been initialised
- _system->set_timer(10, &timer_handler);
+ _system->set_timer(&timer_handler, 10);
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/dc audio.cpp,1.7,1.8 dc.h,1.15,1.16 dcmain.cpp,1.16,1.17 time.cpp,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.31,1.32 morphos.h,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list