aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-05-10 23:17:38 +0000
committerMax Horn2005-05-10 23:17:38 +0000
commit72f4c03b0b9a6918a359b967ebc400a2701981d9 (patch)
tree6686cad5726244b7d9d3a4adddde8dea92ce7843 /scumm
parentb75c969e666b9f262a05e0d1e54d56f7d3e45441 (diff)
downloadscummvm-rg350-72f4c03b0b9a6918a359b967ebc400a2701981d9.tar.gz
scummvm-rg350-72f4c03b0b9a6918a359b967ebc400a2701981d9.tar.bz2
scummvm-rg350-72f4c03b0b9a6918a359b967ebc400a2701981d9.zip
Moved (In/Out)SaveFile(Manager) and Timer to namespace Common
svn-id: r18038
Diffstat (limited to 'scumm')
-rw-r--r--scumm/saveload.cpp8
-rw-r--r--scumm/saveload.h12
-rw-r--r--scumm/script_v5.cpp4
-rw-r--r--scumm/scumm.h10
-rw-r--r--scumm/smush/smush_player.cpp2
-rw-r--r--scumm/thumbnail.cpp4
6 files changed, 22 insertions, 18 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 8dc0039969..af9cfaf26c 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -68,7 +68,7 @@ void ScummEngine::requestLoad(int slot) {
bool ScummEngine::saveState(int slot, bool compat) {
char filename[256];
- OutSaveFile *out;
+ Common::OutSaveFile *out;
SaveGameHeader hdr;
makeSavegameName(filename, slot, compat);
@@ -94,7 +94,7 @@ bool ScummEngine::saveState(int slot, bool compat) {
bool ScummEngine::loadState(int slot, bool compat) {
char filename[256];
- InSaveFile *in;
+ Common::InSaveFile *in;
int i, j;
SaveGameHeader hdr;
int sb, sh;
@@ -365,7 +365,7 @@ void ScummEngine::listSavegames(bool *marks, int num) {
bool ScummEngine::getSavegameName(int slot, char *desc) {
char filename[256];
- InSaveFile *in;
+ Common::InSaveFile *in;
SaveGameHeader hdr;
int len;
@@ -402,7 +402,7 @@ bool ScummEngine::getSavegameName(int slot, char *desc) {
Graphics::Surface *ScummEngine::loadThumbnailFromSlot(int slot) {
char filename[256];
- InSaveFile *in;
+ Common::InSaveFile *in;
SaveGameHeader hdr;
int len;
diff --git a/scumm/saveload.h b/scumm/saveload.h
index 79cfb43cef..51df8865be 100644
--- a/scumm/saveload.h
+++ b/scumm/saveload.h
@@ -24,8 +24,10 @@
#include "common/scummsys.h"
-class InSaveFile;
-class OutSaveFile;
+namespace Common {
+ class InSaveFile;
+ class OutSaveFile;
+}
namespace Scumm {
@@ -126,7 +128,7 @@ typedef void *SerializerLoadReference(void *me, byte type, int ref);
class Serializer {
public:
- Serializer(InSaveFile *in, OutSaveFile *out, uint32 savegameVersion)
+ Serializer(Common::InSaveFile *in, Common::OutSaveFile *out, uint32 savegameVersion)
: _loadStream(in), _saveStream(out), _save_ref(0), _load_ref(0), _ref_me(0),
_savegameVersion(savegameVersion)
{ }
@@ -155,8 +157,8 @@ public:
void loadBytes(void *b, int len);
protected:
- InSaveFile *_loadStream;
- OutSaveFile *_saveStream;
+ Common::InSaveFile *_loadStream;
+ Common::OutSaveFile *_saveStream;
uint32 _savegameVersion;
void saveArrayOf(void *b, int len, int datasize, byte filetype);
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index fd35a7117e..b868cf2420 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1948,7 +1948,7 @@ void ScummEngine_v5::o5_roomOps() {
case 13: // SO_SAVE_STRING
{
- OutSaveFile *file;
+ Common::OutSaveFile *file;
char filename[256], *s;
a = getVarOrDirectByte(PARAM_1);
@@ -1967,7 +1967,7 @@ void ScummEngine_v5::o5_roomOps() {
}
case 14: // SO_LOAD_STRING
{
- InSaveFile *file;
+ Common::InSaveFile *file;
char filename[256], *s;
a = getVarOrDirectByte(PARAM_1);
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 53ae24ab94..c5b341a393 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -37,8 +37,10 @@ namespace GUI {
}
using GUI::Dialog;
class GameDetector;
-class InSaveFile;
-class OutSaveFile;
+namespace Common {
+ class InSaveFile;
+ class OutSaveFile;
+}
namespace Scumm {
@@ -593,8 +595,8 @@ public:
Graphics::Surface *loadThumbnailFromSlot(int slot);
protected:
- Graphics::Surface *loadThumbnail(InSaveFile *file);
- void saveThumbnail(OutSaveFile *file);
+ Graphics::Surface *loadThumbnail(Common::InSaveFile *file);
+ void saveThumbnail(Common::OutSaveFile *file);
protected:
/* Script VM - should be in Script class */
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index bfce7499e9..e49cf081bc 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -283,7 +283,7 @@ void SmushPlayer::init() {
_vm->gdi._numStrips = _vm->virtscr[0].w / 8;
_smixer = new SmushMixer(_vm->_mixer);
- g_timer->installTimerProc(&timerCallback, _speed, this);
+ Common::g_timer->installTimerProc(&timerCallback, _speed, this);
_initDone = true;
}
diff --git a/scumm/thumbnail.cpp b/scumm/thumbnail.cpp
index dbe21698ed..81aa830ce4 100644
--- a/scumm/thumbnail.cpp
+++ b/scumm/thumbnail.cpp
@@ -54,7 +54,7 @@ inline void colorToRGB(uint16 color, uint8 &r, uint8 &g, uint8 &b) {
b = ((color&0x1F) << 3);
}
-Graphics::Surface *ScummEngine::loadThumbnail(InSaveFile *file) {
+Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
ThumbnailHeader header;
header.type = file->readUint32BE();
if (header.type != MKID('THMB'))
@@ -97,7 +97,7 @@ Graphics::Surface *ScummEngine::loadThumbnail(InSaveFile *file) {
return thumb;
}
-void ScummEngine::saveThumbnail(OutSaveFile *file) {
+void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
Graphics::Surface thumb;
if (!createThumbnailFromScreen(&thumb))