aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/savefile.cpp5
-rw-r--r--common/savefile.h4
-rw-r--r--common/system.cpp4
-rw-r--r--common/system.h10
-rw-r--r--common/timer.cpp12
-rw-r--r--common/timer.h6
6 files changed, 30 insertions, 11 deletions
diff --git a/common/savefile.cpp b/common/savefile.cpp
index e5b7a3501c..72a855972c 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -32,6 +32,8 @@
#endif
+namespace Common {
+
const char *SaveFileManager::getSavePath() const {
#if defined(__PALM_OS__)
@@ -195,3 +197,6 @@ SaveFile *DefaultSaveFileManager::makeSaveFile(const char *filename, bool saveOr
}
return sf;
}
+
+
+} // End of namespace Common
diff --git a/common/savefile.h b/common/savefile.h
index e8496a8a4c..06f1a03f24 100644
--- a/common/savefile.h
+++ b/common/savefile.h
@@ -27,6 +27,8 @@
#include "common/stream.h"
+namespace Common {
+
/**
* A class which allows game engines to load game state data.
* That typically means "save games", but also includes things like the
@@ -94,4 +96,6 @@ protected:
SaveFile *makeSaveFile(const char *filename, bool saveOrLoad);
};
+} // End of namespace Common
+
#endif
diff --git a/common/system.cpp b/common/system.cpp
index b40e30185f..16b707e79e 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -89,6 +89,6 @@ void OSystem::displayMessageOnOSD(const char *msg) {
dialog.runModal();
}
-SaveFileManager *OSystem::getSavefileManager() {
- return new DefaultSaveFileManager();
+Common::SaveFileManager *OSystem::getSavefileManager() {
+ return new Common::DefaultSaveFileManager();
}
diff --git a/common/system.h b/common/system.h
index 0be620b788..3566f5ea14 100644
--- a/common/system.h
+++ b/common/system.h
@@ -29,10 +29,12 @@
#include "common/singleton.h"
namespace Graphics {
-struct Surface;
-} // end of namespace Graphics
+ struct Surface;
+}
-class SaveFileManager;
+namespace Common {
+ class SaveFileManager;
+}
/**
* Interface for ScummVM backends. If you want to port ScummVM to a system
@@ -897,7 +899,7 @@ public:
virtual void displayMessageOnOSD(const char *msg);
/** Savefile management. */
- virtual SaveFileManager *getSavefileManager();
+ virtual Common::SaveFileManager *getSavefileManager();
//@}
};
diff --git a/common/timer.cpp b/common/timer.cpp
index 2075243106..6c298bde77 100644
--- a/common/timer.cpp
+++ b/common/timer.cpp
@@ -26,6 +26,8 @@
#include "common/util.h"
#include "common/system.h"
+namespace Common {
+
Timer *g_timer = NULL;
Timer::Timer(OSystem *system) :
@@ -55,7 +57,7 @@ Timer::~Timer() {
_system->setTimerCallback(0, 0);
{
- Common::StackLock lock(_mutex);
+ StackLock lock(_mutex);
for (int i = 0; i < MAX_TIMERS; i++) {
_timerSlots[i].procedure = NULL;
_timerSlots[i].interval = 0;
@@ -71,7 +73,7 @@ int Timer::timer_handler(int t) {
}
int Timer::handler(int t) {
- Common::StackLock lock(_mutex);
+ StackLock lock(_mutex);
uint32 interval, l;
_lastTime = _thisTime;
@@ -96,7 +98,7 @@ int Timer::handler(int t) {
bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon) {
assert(interval > 0);
- Common::StackLock lock(_mutex);
+ StackLock lock(_mutex);
for (int l = 0; l < MAX_TIMERS; l++) {
if (!_timerSlots[l].procedure) {
@@ -113,7 +115,7 @@ bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon)
}
void Timer::removeTimerProc(TimerProc procedure) {
- Common::StackLock lock(_mutex);
+ StackLock lock(_mutex);
for (int l = 0; l < MAX_TIMERS; l++) {
if (_timerSlots[l].procedure == procedure) {
@@ -125,4 +127,6 @@ void Timer::removeTimerProc(TimerProc procedure) {
}
}
+} // End of namespace Common
+
#endif
diff --git a/common/timer.h b/common/timer.h
index d509402314..8e79c3e2bc 100644
--- a/common/timer.h
+++ b/common/timer.h
@@ -33,13 +33,15 @@
class OSystem;
+namespace Common {
+
class Timer {
public:
typedef void (*TimerProc)(void *refCon);
private:
OSystem *_system;
- Common::Mutex _mutex;
+ Mutex _mutex;
void *_timerHandler;
int32 _thisTime;
int32 _lastTime;
@@ -81,6 +83,8 @@ protected:
extern Timer *g_timer;
+} // End of namespace Common
+
#endif
#endif