aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2003-05-29 21:45:26 +0000
committerMax Horn2003-05-29 21:45:26 +0000
commitf0a9f4fb2c5203fbd97130a8198d7ef9e1ce713a (patch)
treedfa2ea727d3c8e4e95329fde007a7402e65c0a25 /backends
parent417ec3a58816cbfd6c880b84474581a8e07bc40e (diff)
downloadscummvm-rg350-f0a9f4fb2c5203fbd97130a8198d7ef9e1ce713a.tar.gz
scummvm-rg350-f0a9f4fb2c5203fbd97130a8198d7ef9e1ce713a.tar.bz2
scummvm-rg350-f0a9f4fb2c5203fbd97130a8198d7ef9e1ce713a.zip
added some doxygen comments to common/system.h; cleaned up the OSystem interface a bit
svn-id: r8116
Diffstat (limited to 'backends')
-rw-r--r--backends/PalmOS/Src/palm.cpp6
-rw-r--r--backends/PalmOS/Src/palm.h6
-rw-r--r--backends/dc/dc.h4
-rw-r--r--backends/dc/dcmain.cpp6
-rw-r--r--backends/gp32/gp32.cpp6
-rw-r--r--backends/gp32/gp32.h4
-rw-r--r--backends/morphos/morphos.cpp5
-rw-r--r--backends/morphos/morphos.h4
-rw-r--r--backends/null/null.cpp2
-rw-r--r--backends/sdl/sdl-common.cpp4
-rw-r--r--backends/sdl/sdl-common.h4
-rw-r--r--backends/wince/wince.cpp9
-rw-r--r--backends/wince/wince.h2
-rw-r--r--backends/x11/x11.cpp10
14 files changed, 34 insertions, 38 deletions
diff --git a/backends/PalmOS/Src/palm.cpp b/backends/PalmOS/Src/palm.cpp
index d105c9c1de..6d46ce31de 100644
--- a/backends/PalmOS/Src/palm.cpp
+++ b/backends/PalmOS/Src/palm.cpp
@@ -515,12 +515,10 @@ void OSystem_PALMOS::delay_msecs(uint msecs) {
SysTaskDelay((SysTicksPerSecond()*msecs)/1000);
}
-void *OSystem_PALMOS::create_thread(ThreadProc *proc, void *param) {
+void OSystem_PALMOS::create_thread(ThreadProc *proc, void *param) {
_thread.active = true;
_thread.proc = proc;
_thread.param = param;
-
- return 0;
}
void OSystem_PALMOS::set_timer(int timer, int (*callback)(int))
@@ -536,7 +534,7 @@ void OSystem_PALMOS::set_timer(int timer, int (*callback)(int))
}
/* Mutex handling */
-void *OSystem_PALMOS::create_mutex(void)
+void *OSystem_PALMOS::create_mutex()
{
return NULL;
}
diff --git a/backends/PalmOS/Src/palm.h b/backends/PalmOS/Src/palm.h
index 18f846be15..fcfb2014a7 100644
--- a/backends/PalmOS/Src/palm.h
+++ b/backends/PalmOS/Src/palm.h
@@ -77,7 +77,7 @@ public:
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
@@ -105,7 +105,7 @@ public:
void set_timer(int timer, int (*callback)(int));
// Mutex handling
- void *create_mutex(void);
+ void *create_mutex();
void lock_mutex(void *mutex);
void unlock_mutex(void *mutex);
void delete_mutex(void *mutex);
@@ -140,7 +140,7 @@ protected:
bool _overlay_visible;
private:
- typedef void (OSystem_PALMOS::*RendererProc)(void);
+ typedef void (OSystem_PALMOS::*RendererProc)();
RendererProc _renderer_proc;
UInt8 *_sndDataP, *_sndTempP;
diff --git a/backends/dc/dc.h b/backends/dc/dc.h
index 7b9f6a0d86..5dff783657 100644
--- a/backends/dc/dc.h
+++ b/backends/dc/dc.h
@@ -41,7 +41,7 @@ class OSystem_Dreamcast : public OSystem {
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
@@ -80,7 +80,7 @@ class OSystem_Dreamcast : public OSystem {
virtual void set_timer(int timer, int (*callback)(int));
// Mutex handling
- virtual void *create_mutex(void);
+ virtual void *create_mutex();
virtual void lock_mutex(void *mutex);
virtual void unlock_mutex(void *mutex);
virtual void delete_mutex(void *mutex);
diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp
index 78768a79d2..c83271b294 100644
--- a/backends/dc/dcmain.cpp
+++ b/backends/dc/dcmain.cpp
@@ -118,13 +118,13 @@ void OSystem_Dreamcast::quit() {
exit(0);
}
-void *OSystem_Dreamcast::create_thread(ThreadProc *proc, void *param) {
+void OSystem_Dreamcast::create_thread(ThreadProc *proc, void *param) {
warning("Creating a thread! (not supported.)\n");
}
/* Mutex handling */
-void *OSystem_Dreamcast::create_mutex(void)
+void *OSystem_Dreamcast::create_mutex()
{
return NULL;
}
@@ -142,7 +142,7 @@ void OSystem_Dreamcast::delete_mutex(void *mutex)
}
-void dc_init_hardware(void)
+void dc_init_hardware()
{
#ifndef NOSERIAL
serial_init(57600);
diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp
index 133907b425..62b10b9a95 100644
--- a/backends/gp32/gp32.cpp
+++ b/backends/gp32/gp32.cpp
@@ -685,7 +685,7 @@ void OSystem_GP32::undraw_mouse() { //return; //fixme!
///SDL_UnlockSurface(sdl_tmpscreen);
}
-char * SDL_GetError(void) {
+char * SDL_GetError() {
// implement
return NULL;
@@ -860,7 +860,7 @@ void OSystem_GP32::delay_msecs(uint msecs) {
}
// Create a thread
-void* OSystem_GP32::create_thread(ThreadProc *proc, void *param) { return NULL;}
+void OSystem_GP32::create_thread(ThreadProc *proc, void *param) { }
// Get the next event.
// Returns true if an event was retrieved.
@@ -1075,7 +1075,7 @@ void OSystem_GP32::update_cdrom() { }
void OSystem_GP32::set_timer(int timer, int (*callback)(int)) { }
// Mutex handling
-void* OSystem_GP32::create_mutex(void) { }
+void* OSystem_GP32::create_mutex() { }
void OSystem_GP32::lock_mutex(void *mutex) { }
void OSystem_GP32::unlock_mutex(void *mutex) { }
void OSystem_GP32::delete_mutex(void *mutex) { }
diff --git a/backends/gp32/gp32.h b/backends/gp32/gp32.h
index da69b2fedd..686ece4f27 100644
--- a/backends/gp32/gp32.h
+++ b/backends/gp32/gp32.h
@@ -71,7 +71,7 @@ public:
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
@@ -102,7 +102,7 @@ public:
void set_timer(int timer, int (*callback)(int));
// Mutex handling
- void *create_mutex(void);
+ void *create_mutex();
void lock_mutex(void *mutex);
void unlock_mutex(void *mutex);
void delete_mutex(void *mutex);
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp
index 91215f0cd1..34dde38f3f 100644
--- a/backends/morphos/morphos.cpp
+++ b/backends/morphos/morphos.cpp
@@ -308,16 +308,15 @@ void OSystem_MorphOS::set_timer(int timer, int (*callback)(int))
warning("set_timer() unexpectedly called");
}
-void *OSystem_MorphOS::create_thread(ThreadProc *proc, void *param)
+void OSystem_MorphOS::create_thread(ThreadProc *proc, void *param)
{
ScummMusicThread = CreateNewProcTags(NP_Entry, (ULONG) proc, NP_CodeType, CODETYPE_PPC,
NP_Name, (ULONG) "ScummVM Music Thread",
NP_Priority, 60, NP_StackSize, 32000,
NP_PPC_Arg1, (ULONG) param, TAG_DONE);
- return ScummMusicThread;
}
-void *OSystem_MorphOS::create_mutex(void)
+void *OSystem_MorphOS::create_mutex()
{
SignalSemaphore *sem = (SignalSemaphore *) AllocVec(sizeof (SignalSemaphore), MEMF_PUBLIC);
diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h
index 71985b263e..6327edd647 100644
--- a/backends/morphos/morphos.h
+++ b/backends/morphos/morphos.h
@@ -83,13 +83,13 @@ class OSystem_MorphOS : public OSystem
virtual void set_timer(int timer, int (*callback)(int));
// Mutex handling
- virtual void *create_mutex(void);
+ virtual void *create_mutex();
virtual void lock_mutex(void *mutex);
virtual void unlock_mutex(void *mutex);
virtual void delete_mutex(void *mutex);
// Create a thread
- virtual void *create_thread(ThreadProc *proc, void *param);
+ virtual void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
diff --git a/backends/null/null.cpp b/backends/null/null.cpp
index 38c595a4c2..4878ebeffa 100644
--- a/backends/null/null.cpp
+++ b/backends/null/null.cpp
@@ -40,7 +40,7 @@ public:
void set_shake_pos(int shake_pos) {}
uint32 get_msecs();
void delay_msecs(uint msecs);
- void *create_thread(ThreadProc *proc, void *param) { return NULL; }
+ void create_thread(ThreadProc *proc, void *param) { }
bool poll_event(Event *event) { return false; }
bool set_sound_proc(void *param, SoundProc *proc, byte sound) {}
void quit() { exit(1); }
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 78820dc27b..f9096c098c 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -496,8 +496,8 @@ void OSystem_SDL_Common::delay_msecs(uint msecs) {
SDL_Delay(msecs);
}
-void *OSystem_SDL_Common::create_thread(ThreadProc *proc, void *param) {
- return SDL_CreateThread(proc, param);
+void OSystem_SDL_Common::create_thread(ThreadProc *proc, void *param) {
+ SDL_CreateThread(proc, param);
}
static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode)
diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h
index 5ce2166c79..71a44d46f6 100644
--- a/backends/sdl/sdl-common.h
+++ b/backends/sdl/sdl-common.h
@@ -71,7 +71,7 @@ public:
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
@@ -103,7 +103,7 @@ public:
void set_timer(int timer, int (*callback)(int));
// Mutex handling
- void *create_mutex(void);
+ void *create_mutex();
void lock_mutex(void *mutex);
void unlock_mutex(void *mutex);
void delete_mutex(void *mutex);
diff --git a/backends/wince/wince.cpp b/backends/wince/wince.cpp
index 0e0ca66ccd..6db546172e 100644
--- a/backends/wince/wince.cpp
+++ b/backends/wince/wince.cpp
@@ -71,7 +71,7 @@ typedef BOOL (*tSHCreateMenuBar)(void*);
/*
// Dynamically linked SDLAudio
-typedef void (*tSDL_AudioQuit)(void);
+typedef void (*tSDL_AudioQuit)();
typedef int (*tSDL_Init)(Uint32);
typedef void (*tSDL_PauseAudio)(int);
typedef int (*tSDL_OpenAudio)(SDL_AudioSpec*, SDL_AudioSpec*);
@@ -439,7 +439,7 @@ SoundProc *real_soundproc;
extern void startFindGame();
extern void displayGameInfo();
-extern bool loadGameSettings(void);
+extern bool loadGameSettings();
extern void setFindGameDlgHandle(HWND);
extern void getSelectedGame(int, char*, TCHAR*, char*);
extern void runGame(char*);
@@ -448,7 +448,7 @@ extern void palette_update();
extern void own_soundProc(void *buffer, byte *samples, int len);
-extern int chooseGame(void);
+extern int chooseGame();
//#define SHMenuBar_GetMenu(hWndMB,ID_MENU) (HMENU)SendMessage((hWndMB), SHCMBM_GETSUBMENU, (WPARAM)0, (LPARAM)ID_MENU)
@@ -1623,12 +1623,11 @@ void OSystem_WINCE3::delay_msecs(uint msecs) {
Sleep(msecs);
}
-void *OSystem_WINCE3::create_thread(ThreadProc *proc, void *param) {
+void OSystem_WINCE3::create_thread(ThreadProc *proc, void *param) {
// needed for emulated MIDI support (Sam'n'Max)
HANDLE handle;
handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)proc, param, 0, NULL);
SetThreadPriority(handle, THREAD_PRIORITY_NORMAL);
- return handle;
}
int mapKey(int key, byte mod)
diff --git a/backends/wince/wince.h b/backends/wince/wince.h
index d9a71e6d35..9af0e4e81b 100644
--- a/backends/wince/wince.h
+++ b/backends/wince/wince.h
@@ -109,7 +109,7 @@ public:
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp
index bd8a541e0f..106b0e7138 100644
--- a/backends/x11/x11.cpp
+++ b/backends/x11/x11.cpp
@@ -89,7 +89,7 @@ public:
void delay_msecs(uint msecs);
// Create a thread
- void *create_thread(ThreadProc *proc, void *param);
+ void create_thread(ThreadProc *proc, void *param);
// Get the next event.
// Returns true if an event was retrieved.
@@ -121,7 +121,7 @@ public:
void set_timer(int timer, int (*callback) (int));
// Mutex handling
- void *create_mutex(void);
+ void *create_mutex();
void lock_mutex(void *mutex);
void unlock_mutex(void *mutex);
void delete_mutex(void *mutex);
@@ -302,7 +302,7 @@ void OSystem_X11::create_empty_cursor()
XDefineCursor(display, window, cursor);
}
-OSystem *OSystem_X11_create(void)
+OSystem *OSystem_X11_create()
{
return OSystem_X11::create(0, 0);
}
@@ -765,7 +765,7 @@ void OSystem_X11::set_shake_pos(int shake_pos)
new_shake_pos = shake_pos;
}
-void *OSystem_X11::create_thread(ThreadProc *proc, void *param)
+void OSystem_X11::create_thread(ThreadProc *proc, void *param)
{
pthread_t *thread = (pthread_t *) malloc(sizeof(pthread_t));
if (pthread_create(thread, NULL, (void *(*)(void *))proc, param))
@@ -1029,7 +1029,7 @@ void OSystem_X11::set_timer(int timer, int (*callback) (int))
}
}
-void *OSystem_X11::create_mutex(void)
+void *OSystem_X11::create_mutex()
{
pthread_mutex_t *mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(mutex, NULL);