diff options
author | Marcus Comstedt | 2006-10-22 17:58:38 +0000 |
---|---|---|
committer | Marcus Comstedt | 2006-10-22 17:58:38 +0000 |
commit | fbb5a2d7730ff34bd558b8e4a8aa0b68d41318b5 (patch) | |
tree | 824fabd9ab13692e3a268ab693e553b8691f633b /backends/platform/dc/dc.h | |
parent | 43fac9ab3da947e502e7abfeff74b5e4d536c219 (diff) | |
download | scummvm-rg350-fbb5a2d7730ff34bd558b8e4a8aa0b68d41318b5.tar.gz scummvm-rg350-fbb5a2d7730ff34bd558b8e4a8aa0b68d41318b5.tar.bz2 scummvm-rg350-fbb5a2d7730ff34bd558b8e4a8aa0b68d41318b5.zip |
Modularization.
svn-id: r24453
Diffstat (limited to 'backends/platform/dc/dc.h')
-rw-r--r-- | backends/platform/dc/dc.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index aaf505bd64..0178a99567 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -38,9 +38,23 @@ class Interactive class OSystem_Dreamcast : public OSystem { + private: + + // Set function that generates samples + typedef void (*SoundProc)(void *param, byte *buf, int len); + bool setSoundCallback(SoundProc proc, void *param); + void clearSoundCallback(); + + // Add a callback timer + typedef int (*TimerProc)(int interval); + void setTimerCallback(TimerProc callback, int timer); + + Common::SaveFileManager *createSavefileManager(); + public: OSystem_Dreamcast(); + virtual void initBackend(); // Determine whether the backend supports the specified feature. bool hasFeature(Feature f); @@ -114,10 +128,6 @@ class OSystem_Dreamcast : public OSystem { // Returns true if an event was retrieved. bool pollEvent(Event &event); - // Set function that generates samples - bool setSoundCallback(SoundProc proc, void *param); - void clearSoundCallback(); - // Determine the output sample rate. Audio data provided by the sound // callback will be played using this rate. int getOutputSampleRate() const; @@ -167,9 +177,6 @@ class OSystem_Dreamcast : public OSystem { b = ((color<<4)&0xf0)|(color&0x0f); } - // Add a callback timer - void setTimerCallback(TimerProc callback, int timer); - // Mutex handling MutexRef createMutex(); void lockMutex(MutexRef mutex); @@ -180,9 +187,10 @@ class OSystem_Dreamcast : public OSystem { // given value. void setWindowCaption(const char *caption); - // Savefile handling - Common::SaveFileManager *getSavefileManager(); - + // Modulatized backend + Common::SaveFileManager *getSavefileManager() { return _savefile; } + Audio::Mixer *getMixer() { return _mixer; } + Common::TimerManager *getTimerManager() { return _timer; } // Extra SoftKbd support void mouseToSoftKbd(int x, int y, int &rx, int &ry) const; @@ -190,6 +198,9 @@ class OSystem_Dreamcast : public OSystem { private: + Common::SaveFileManager *_savefile; + Audio::Mixer *_mixer; + Common::TimerManager *_timer; SoftKeyboard _softkbd; int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y; |