aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/n64
diff options
context:
space:
mode:
authorMax Horn2011-06-07 10:55:58 +0200
committerMax Horn2011-06-07 14:57:57 +0200
commit9e1ed9ee6a3a6d3bd788fe16b93b5a9392330f2e (patch)
treec59c543258cccde626d8bae06057c3aae6719c87 /backends/platform/n64
parent14f0a0c6823dc899a78e3a627200ad1337181b1a (diff)
downloadscummvm-rg350-9e1ed9ee6a3a6d3bd788fe16b93b5a9392330f2e.tar.gz
scummvm-rg350-9e1ed9ee6a3a6d3bd788fe16b93b5a9392330f2e.tar.bz2
scummvm-rg350-9e1ed9ee6a3a6d3bd788fe16b93b5a9392330f2e.zip
N64: Use OSystem's 'slots' for timer/savefile manager
Diffstat (limited to 'backends/platform/n64')
-rw-r--r--backends/platform/n64/osys_n64.h6
-rw-r--r--backends/platform/n64/osys_n64_base.cpp22
-rw-r--r--backends/platform/n64/osys_n64_utilities.cpp1
3 files changed, 6 insertions, 23 deletions
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index f22b221ccc..b338887e56 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -27,8 +27,6 @@
#include "common/config-manager.h"
#include "backends/base-backend.h"
-#include "backends/saves/default/default-saves.h"
-#include "backends/timer/default/default-timer.h"
#include "base/main.h"
@@ -75,9 +73,7 @@ enum GraphicModeID {
class OSystem_N64 : public BaseBackend, public PaletteManager {
protected:
- Common::SaveFileManager *_savefile;
Audio::MixerImpl *_mixer;
- Common::TimerManager *_timer;
FilesystemFactory *_fsFactory;
struct display_context * _dc; // Display context for N64 on screen buffer switching
@@ -201,10 +197,8 @@ public:
virtual void quit();
- virtual Common::SaveFileManager *getSavefileManager();
virtual Audio::Mixer *getMixer();
virtual void getTimeAndDate(TimeDate &t) const;
- virtual Common::TimerManager *getTimerManager();
virtual void setTimerCallback(TimerProc callback, int interval);
FilesystemFactory *getFilesystemFactory();
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 62fe145bcc..8a2d415d75 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -30,6 +30,8 @@
#include "pakfs_save_manager.h"
#include "framfs_save_manager.h"
#include "backends/fs/n64/n64-fs-factory.h"
+#include "backends/saves/default/default-saves.h"
+#include "backends/timer/default/default-timer.h"
typedef unsigned long long uint64;
@@ -137,9 +139,7 @@ OSystem_N64::OSystem_N64() {
_mouseMaxX = _overlayWidth;
_mouseMaxY = _overlayHeight;
- _savefile = 0;
_mixer = 0;
- _timer = 0;
_dirtyOffscreen = false;
@@ -154,9 +154,7 @@ OSystem_N64::OSystem_N64() {
}
OSystem_N64::~OSystem_N64() {
- delete _savefile;
delete _mixer;
- delete _timer;
delete _fsFactory;
}
@@ -170,7 +168,7 @@ void OSystem_N64::initBackend() {
if (FRAM_Detect()) { // Use FlashRAM
initFramFS();
- _savefile = new FRAMSaveManager();
+ _savefileManager = new FRAMSaveManager();
} else { // Use PakFS
// Init Controller Pak
initPakFs();
@@ -185,10 +183,10 @@ void OSystem_N64::initBackend() {
}
}
- _savefile = new PAKSaveManager();
+ _savefileManager = new PAKSaveManager();
}
- _timer = new DefaultTimerManager();
+ _timerManager = new DefaultTimerManager();
setTimerCallback(&timer_handler, 10);
@@ -851,21 +849,11 @@ void OSystem_N64::quit() {
return;
}
-Common::SaveFileManager *OSystem_N64::getSavefileManager() {
- assert(_savefile);
- return _savefile;
-}
-
Audio::Mixer *OSystem_N64::getMixer() {
assert(_mixer);
return _mixer;
}
-Common::TimerManager *OSystem_N64::getTimerManager() {
- assert(_timer);
- return _timer;
-}
-
void OSystem_N64::getTimeAndDate(TimeDate &t) const {
// No RTC inside the N64, read mips timer to simulate
// passing of time, not a perfect solution, but can't think
diff --git a/backends/platform/n64/osys_n64_utilities.cpp b/backends/platform/n64/osys_n64_utilities.cpp
index 8d9f0471d3..0622e6423d 100644
--- a/backends/platform/n64/osys_n64_utilities.cpp
+++ b/backends/platform/n64/osys_n64_utilities.cpp
@@ -21,6 +21,7 @@
*/
#include "osys_n64.h"
+#include "backends/timer/default/default-timer.h"
void checkTimers(void) {
OSystem_N64 *osys = (OSystem_N64 *)g_system;