aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/audio/default/default-audio.cpp (renamed from backends/base-subsys-file.h)18
-rw-r--r--backends/audio/default/default-audio.h (renamed from backends/base-subsys-events.h)16
-rw-r--r--backends/base-subsys-mutex.h38
-rw-r--r--backends/base-subsys-timer.h38
-rw-r--r--backends/mutex/default/default-mutex.cpp (renamed from backends/base-subsys-audio.h)20
-rw-r--r--backends/mutex/default/default-mutex.h (renamed from backends/base-subsys-graphics.h)20
6 files changed, 43 insertions, 107 deletions
diff --git a/backends/base-subsys-file.h b/backends/audio/default/default-audio.cpp
index 98b16c0c63..45abb29f60 100644
--- a/backends/base-subsys-file.h
+++ b/backends/audio/default/default-audio.cpp
@@ -23,16 +23,12 @@
*
*/
-#ifndef BACKENDS_BASE_SUBSYS_FILE_H
-#define BACKENDS_BASE_SUBSYS_FILE_H
+#include "backends/audio/default/default-audio.h"
-#include "common/system.h"
+bool DefaultAudioManager::hasAudioFeature(OSystem::Feature f) {
+ return false;
+}
-class BaseSubSys_File : public virtual OSystem {
-public:
- virtual void fileInit() = 0;
- virtual void fileDone() = 0;
-};
-
-
-#endif
+bool DefaultAudioManager::getAudioFeatureState(OSystem::Feature f) {
+ return false;
+}
diff --git a/backends/base-subsys-events.h b/backends/audio/default/default-audio.h
index fc94fd054c..b271474a5e 100644
--- a/backends/base-subsys-events.h
+++ b/backends/audio/default/default-audio.h
@@ -23,15 +23,21 @@
*
*/
-#ifndef BACKENDS_BASE_SUBSYS_EVENTS_H
-#define BACKENDS_BASE_SUBSYS_EVENTS_H
+#ifndef BACKENDS_AUDIO_DEFAULT_H
+#define BACKENDS_AUDIO_DEFAULT_H
#include "common/system.h"
+#include "common/noncopyable.h"
+#include "sound/mixer_intern.h"
-class BaseSubSys_Events : public virtual OSystem {
+class DefaultAudioManager : Audio::MixerImpl, Common::NonCopyable {
public:
- virtual void eventsInit() = 0;
- virtual void eventsDone() = 0;
+ DefaultAudioManager(OSystem *system, uint sampleRate) : Audio::MixerImpl(system, sampleRate) {}
+ ~DefaultAudioManager() {}
+
+ bool hasAudioFeature(OSystem::Feature f);
+ void setAudioFeatureState(OSystem::Feature f, bool enable) {}
+ bool getAudioFeatureState(OSystem::Feature f);
};
diff --git a/backends/base-subsys-mutex.h b/backends/base-subsys-mutex.h
deleted file mode 100644
index 4a991ba438..0000000000
--- a/backends/base-subsys-mutex.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef BACKENDS_BASE_SUBSYS_MUTEX_H
-#define BACKENDS_BASE_SUBSYS_MUTEX_H
-
-#include "common/system.h"
-
-class BaseSubSys_Mutex : public virtual OSystem {
-public:
- virtual void mutexInit() = 0;
- virtual void mutexDone() = 0;
-};
-
-
-#endif
diff --git a/backends/base-subsys-timer.h b/backends/base-subsys-timer.h
deleted file mode 100644
index c857c49d41..0000000000
--- a/backends/base-subsys-timer.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef BACKENDS_BASE_SUBSYS_TIMER_H
-#define BACKENDS_BASE_SUBSYS_TIMER_H
-
-#include "common/system.h"
-
-class BaseSubSys_Timer : public virtual OSystem {
-public:
- virtual void timerInit() = 0;
- virtual void timerDone() = 0;
-};
-
-
-#endif
diff --git a/backends/base-subsys-audio.h b/backends/mutex/default/default-mutex.cpp
index e3d3a06c01..936ede197a 100644
--- a/backends/base-subsys-audio.h
+++ b/backends/mutex/default/default-mutex.cpp
@@ -23,16 +23,16 @@
*
*/
-#ifndef BACKENDS_BASE_SUBSYS_AUDIO_H
-#define BACKENDS_BASE_SUBSYS_AUDIO_H
+#include "backends/mutex/default/default-mutex.h"
-#include "common/system.h"
+OSystem::MutexRef DefaultMutexManager::createMutex() {
+ return OSystem::MutexRef();
+}
-class BaseSubSys_Audio : public virtual OSystem {
-public:
- virtual void audioInit() = 0;
- virtual void audioDone() = 0;
-};
+bool DefaultMutexManager::hasMutexFeature(OSystem::Feature f) {
+ return false;
+}
-
-#endif
+bool DefaultMutexManager::getMutexFeatureState(OSystem::Feature f) {
+ return false;
+}
diff --git a/backends/base-subsys-graphics.h b/backends/mutex/default/default-mutex.h
index 94acecfd17..bd667eba5b 100644
--- a/backends/base-subsys-graphics.h
+++ b/backends/mutex/default/default-mutex.h
@@ -23,15 +23,25 @@
*
*/
-#ifndef BACKENDS_BASE_SUBSYS_GRAPHICS_H
-#define BACKENDS_BASE_SUBSYS_GRAPHICS_H
+#ifndef BACKENDS_MUTEX_DEFAULT_H
+#define BACKENDS_MUTEX_DEFAULT_H
#include "common/system.h"
+#include "common/noncopyable.h"
-class BaseSubSys_Graphics : public virtual OSystem {
+class DefaultMutexManager : Common::NonCopyable {
public:
- virtual void graphicsInit() = 0;
- virtual void graphicsDone() = 0;
+ DefaultMutexManager() {}
+ ~DefaultMutexManager() {}
+
+ bool hasMutexFeature(OSystem::Feature f);
+ void setMutexFeatureState(OSystem::Feature f, bool enable) {}
+ bool getMutexFeatureState(OSystem::Feature f);
+
+ OSystem::MutexRef createMutex();
+ void lockMutex(OSystem::MutexRef mutex) {}
+ void unlockMutex(OSystem::MutexRef mutex) {}
+ void deleteMutex(OSystem::MutexRef mutex);
};