aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-11-01 16:00:17 +0000
committerMax Horn2010-11-01 16:00:17 +0000
commita1dd7a07a12a0ef3f4ede9d346f590873c83dd2c (patch)
tree30e914654591c5662faa08f89430801c3b441a6d
parent205fc94848c3682444cb5ab294cc66837af4d2d8 (diff)
downloadscummvm-rg350-a1dd7a07a12a0ef3f4ede9d346f590873c83dd2c.tar.gz
scummvm-rg350-a1dd7a07a12a0ef3f4ede9d346f590873c83dd2c.tar.bz2
scummvm-rg350-a1dd7a07a12a0ef3f4ede9d346f590873c83dd2c.zip
ENGINES: Remove some 'using' statements
svn-id: r54001
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/menus.cpp2
-rw-r--r--engines/agos/res.cpp10
-rw-r--r--engines/agos/res_snd.cpp16
-rw-r--r--engines/agos/rooms.cpp42
-rw-r--r--engines/agos/sound.cpp44
-rw-r--r--engines/agos/string.cpp4
-rw-r--r--engines/agos/subroutine.cpp18
-rw-r--r--engines/dialogs.cpp19
-rw-r--r--engines/lure/res.cpp2
-rw-r--r--engines/scumm/dialogs.cpp16
-rw-r--r--engines/scumm/file.cpp2
-rw-r--r--engines/scumm/file_nes.cpp2
13 files changed, 76 insertions, 103 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 10b6416c61..a51536381e 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -43,8 +43,6 @@
#include "sound/mods/protracker.h"
#include "sound/audiocd.h"
-using Common::File;
-
namespace AGOS {
static const GameSpecificSettings simon1_settings = {
diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp
index df837a5e16..5629a1dca6 100644
--- a/engines/agos/menus.cpp
+++ b/engines/agos/menus.cpp
@@ -33,8 +33,6 @@
#include "agos/agos.h"
#include "agos/intern.h"
-using Common::File;
-
namespace AGOS {
void AGOSEngine::loadMenuFile() {
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index cb48e5e50b..5775e71a7a 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -35,8 +35,6 @@
#include "common/zlib.h"
-using Common::File;
-
namespace AGOS {
#ifdef ENABLE_AGOS2
@@ -67,7 +65,7 @@ uint32 AGOSEngine::readUint32Wrapper(const void *src) {
void AGOSEngine::decompressData(const char *srcName, byte *dst, uint32 offset, uint32 srcSize, uint32 dstSize) {
#ifdef USE_ZLIB
- File in;
+ Common::File in;
in.open(srcName);
if (in.isOpen() == false)
error("decompressData: Can't load %s", srcName);
@@ -548,7 +546,7 @@ uint fileReadItemID(Common::SeekableReadStream *in) {
}
void AGOSEngine::openGameFile() {
- _gameFile = new File();
+ _gameFile = new Common::File();
_gameFile->open(getFileName(GAME_GMEFILE));
if (!_gameFile->isOpen())
@@ -783,7 +781,7 @@ void AGOSEngine::loadVGABeardFile(uint16 id) {
uint32 offs, size;
if (getFeatures() & GF_OLD_BUNDLE) {
- File in;
+ Common::File in;
char filename[15];
if (id == 23)
id = 112;
@@ -824,7 +822,7 @@ void AGOSEngine::loadVGABeardFile(uint16 id) {
}
void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
- File in;
+ Common::File in;
char filename[15];
byte *dst;
uint32 file, offs, srcSize, dstSize;
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 6e54d926c4..b4c1455c10 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -35,8 +35,6 @@
#include "sound/mididrv.h"
#include "sound/mods/protracker.h"
-using Common::File;
-
namespace AGOS {
void AGOSEngine_Simon1::playSpeech(uint16 speech_id, uint16 vgaSpriteId) {
@@ -175,7 +173,7 @@ static const ModuleOffs amigaWaxworksOffs[20] = {
void AGOSEngine::playModule(uint16 music) {
char filename[15];
- File f;
+ Common::File f;
uint32 offs = 0;
if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW) {
@@ -262,7 +260,7 @@ void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) {
// TODO: Add support for Desktop Tracker format in Acorn disk version
} else {
char filename[15];
- File f;
+ Common::File f;
sprintf(filename, "MOD%d.MUS", music);
f.open(filename);
if (f.isOpen() == false)
@@ -291,7 +289,7 @@ void AGOSEngine::playMusic(uint16 music, uint16 track) {
_midi.setLoop(true); // Must do this BEFORE loading music.
char filename[15];
- File f;
+ Common::File f;
sprintf(filename, "MOD%d.MUS", music);
f.open(filename);
if (f.isOpen() == false)
@@ -316,7 +314,7 @@ void AGOSEngine::playSting(uint16 soundId) {
char filename[15];
- File mus_file;
+ Common::File mus_file;
uint16 mus_offset;
sprintf(filename, "STINGS%i.MUS", _soundFileId);
@@ -347,7 +345,7 @@ static const byte elvira1_soundTable[100] = {
};
bool AGOSEngine::loadVGASoundFile(uint16 id, uint8 type) {
- File in;
+ Common::File in;
char filename[15];
byte *dst;
uint32 srcSize, dstSize;
@@ -452,7 +450,7 @@ static const char *dimpSoundList[32] = {
void AGOSEngine::loadSoundFile(const char* filename) {
- File in;
+ Common::File in;
in.open(filename);
if (in.isOpen() == false)
@@ -471,7 +469,7 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) {
byte *dst;
if (getGameId() == GID_DIMP) {
- File in;
+ Common::File in;
char filename[15];
assert(sound >= 1 && sound <= 32);
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index 91c8a53681..a2eff06fcc 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -30,24 +30,22 @@
#include "agos/agos.h"
#include "agos/intern.h"
-using Common::File;
-
namespace AGOS {
uint16 AGOSEngine::getBackExit(int n) {
switch (n) {
- case 0:
- return 2;
- case 1:
- return 3;
- case 2:
- return 0;
- case 3:
- return 1;
- case 4:
- return 5;
- case 5:
- return 4;
+ case 0:
+ return 2;
+ case 1:
+ return 3;
+ case 2:
+ return 0;
+ case 3:
+ return 1;
+ case 4:
+ return 5;
+ case 5:
+ return 4;
}
return 0;
@@ -205,13 +203,13 @@ void AGOSEngine_Elvira2::moveDirn(Item *i, uint x) {
if (n == 1) {
sr = (SubSuperRoom *)findChildOfType(p, kSuperRoomType);
switch (x) {
- case 0: a = -(sr->roomX); break;
- case 1: a = 1; break;
- case 2: a = sr->roomX; break;
- case 3: a = 0xFFFF; break;
- case 4: a = -(sr->roomX * sr->roomY); break;
- case 5: a = (sr->roomX * sr->roomY); break;
- default: return;
+ case 0: a = -(sr->roomX); break;
+ case 1: a = 1; break;
+ case 2: a = sr->roomX; break;
+ case 3: a = 0xFFFF; break;
+ case 4: a = -(sr->roomX * sr->roomY); break;
+ case 5: a = (sr->roomX * sr->roomY); break;
+ default: return;
}
_superRoomNumber += a;
}
@@ -366,7 +364,7 @@ bool AGOSEngine::loadRoomItems(uint16 room) {
byte *p;
uint i, minNum, maxNum;
char filename[30];
- File in;
+ Common::File in;
Item *item, *itemTmp;
if (_roomsList == NULL)
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 6ec72814fa..8914470370 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -38,23 +38,21 @@
#include "sound/decoders/vorbis.h"
#include "sound/decoders/wave.h"
-using Common::File;
-
namespace AGOS {
#define SOUND_BIG_ENDIAN true
class BaseSound : Common::NonCopyable {
protected:
- File *_file;
+ Common::File *_file;
uint32 *_offsets;
Audio::Mixer *_mixer;
bool _freeOffsets;
DisposeAfterUse::Flag _disposeFile;
public:
- BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES);
- BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES);
+ BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES);
+ BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES);
virtual ~BaseSound();
void playSound(uint sound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0) {
@@ -64,7 +62,7 @@ public:
virtual Audio::AudioStream *makeAudioStream(uint sound) = 0;
};
-BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse)
+BaseSound::BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse)
: _mixer(mixer), _file(file), _disposeFile(disposeFileAfterUse) {
uint res = 0;
@@ -98,7 +96,7 @@ BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndia
_offsets[res] = _file->size();
}
-BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse)
+BaseSound::BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse)
: _mixer(mixer), _file(file), _disposeFile(disposeFileAfterUse) {
_offsets = offsets;
@@ -225,9 +223,9 @@ static void convertPan(int &pan) {
class WavSound : public BaseSound {
public:
- WavSound(Audio::Mixer *mixer, File *file, uint32 base = 0, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES)
+ WavSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES)
: BaseSound(mixer, file, base, false, disposeFileAfterUse) {}
- WavSound(Audio::Mixer *mixer, File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {}
+ WavSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {}
Audio::AudioStream *makeAudioStream(uint sound);
void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0);
};
@@ -251,7 +249,7 @@ void WavSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ
class VocSound : public BaseSound {
const byte _flags;
public:
- VocSound(Audio::Mixer *mixer, File *file, bool isUnsigned, uint32 base = 0, bool bigEndian = false, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES)
+ VocSound(Audio::Mixer *mixer, Common::File *file, bool isUnsigned, uint32 base = 0, bool bigEndian = false, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES)
: BaseSound(mixer, file, base, bigEndian, disposeFileAfterUse), _flags(isUnsigned ? Audio::FLAG_UNSIGNED : 0) {}
Audio::AudioStream *makeAudioStream(uint sound);
void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0);
@@ -275,7 +273,7 @@ void VocSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ
class RawSound : public BaseSound {
const byte _flags;
public:
- RawSound(Audio::Mixer *mixer, File *file, bool isUnsigned)
+ RawSound(Audio::Mixer *mixer, Common::File *file, bool isUnsigned)
: BaseSound(mixer, file, 0, SOUND_BIG_ENDIAN), _flags(isUnsigned ? Audio::FLAG_UNSIGNED : 0) {}
Audio::AudioStream *makeAudioStream(uint sound);
void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0);
@@ -305,7 +303,7 @@ void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ
class CompressedSound : public BaseSound {
public:
- CompressedSound(Audio::Mixer *mixer, File *file, uint32 base) : BaseSound(mixer, file, base, false) {}
+ CompressedSound(Audio::Mixer *mixer, Common::File *file, uint32 base) : BaseSound(mixer, file, base, false) {}
Common::MemoryReadStream *loadStream(uint sound) const {
if (_offsets == NULL)
@@ -334,7 +332,7 @@ public:
#ifdef USE_MAD
class MP3Sound : public CompressedSound {
public:
- MP3Sound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
+ MP3Sound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
Common::MemoryReadStream *tmp = loadStream(sound);
if (!tmp)
@@ -350,7 +348,7 @@ public:
#ifdef USE_VORBIS
class VorbisSound : public CompressedSound {
public:
- VorbisSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
+ VorbisSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
Common::MemoryReadStream *tmp = loadStream(sound);
if (!tmp)
@@ -366,7 +364,7 @@ public:
#ifdef USE_FLAC
class FLACSound : public CompressedSound {
public:
- FLACSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
+ FLACSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
Common::MemoryReadStream *tmp = loadStream(sound);
if (!tmp)
@@ -379,7 +377,7 @@ public:
///////////////////////////////////////////////////////////////////////////////
#pragma mark -
-static CompressedSound *makeCompressedSound(Audio::Mixer *mixer, File *file, const Common::String &basename) {
+static CompressedSound *makeCompressedSound(Audio::Mixer *mixer, Common::File *file, const Common::String &basename) {
#ifdef USE_FLAC
file->open(basename + ".fla");
if (file->isOpen()) {
@@ -451,7 +449,7 @@ void Sound::loadVoiceFile(const GameSpecificSettings *gss) {
char filename[16];
- File *file = new File();
+ Common::File *file = new Common::File();
if (!_hasVoiceFile) {
_voice = makeCompressedSound(_mixer, file, gss->speech_filename);
@@ -506,7 +504,7 @@ void Sound::loadVoiceFile(const GameSpecificSettings *gss) {
void Sound::loadSfxFile(const GameSpecificSettings *gss) {
char filename[16];
- File *file = new File();
+ Common::File *file = new Common::File();
if (!_hasEffectsFile) {
_effects = makeCompressedSound(_mixer, file, gss->effects_filename);
@@ -540,7 +538,7 @@ void Sound::readSfxFile(const Common::String &filename) {
_mixer->stopHandle(_effectsHandle);
- File *file = new File();
+ Common::File *file = new Common::File();
file->open(filename);
if (file->isOpen() == false) {
@@ -557,7 +555,7 @@ void Sound::readSfxFile(const Common::String &filename) {
}
// This method is only used by Simon2
-void Sound::loadSfxTable(File *gameFile, uint32 base) {
+void Sound::loadSfxTable(Common::File *gameFile, uint32 base) {
stopAll();
delete _effects;
@@ -572,7 +570,7 @@ void Sound::loadSfxTable(File *gameFile, uint32 base) {
void Sound::readVoiceFile(const Common::String &filename) {
_mixer->stopHandle(_voiceHandle);
- File *file = new File();
+ Common::File *file = new Common::File();
file->open(filename);
if (file->isOpen() == false)
@@ -592,7 +590,7 @@ void Sound::playVoice(uint sound) {
char filename[16];
_lastVoiceFile = _filenums[sound];
sprintf(filename, "voices%d.dat", _filenums[sound]);
- File *file = new File();
+ Common::File *file = new Common::File();
file->open(filename);
if (file->isOpen() == false)
error("playVoice: Can't load voice file %s", filename);
@@ -801,7 +799,7 @@ void Sound::switchVoiceFile(const GameSpecificSettings *gss, uint disc) {
_lastVoiceFile = disc;
char filename[16];
- File *file = new File();
+ Common::File *file = new Common::File();
if (!_hasVoiceFile) {
sprintf(filename, "%s%d", gss->speech_filename, disc);
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 40506e4874..84f5f3792e 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -30,8 +30,6 @@
#include "agos/agos.h"
#include "agos/intern.h"
-using Common::File;
-
namespace AGOS {
void AGOSEngine::uncompressText(byte *ptr) {
@@ -265,7 +263,7 @@ uint AGOSEngine::loadTextFile(const char *filename, byte *dst) {
}
uint AGOSEngine::loadTextFile_simon1(const char *filename, byte *dst) {
- File fo;
+ Common::File fo;
fo.open(filename);
uint32 size;
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index 8dccded958..076e562a76 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -30,8 +30,6 @@
#include "agos/agos.h"
#include "agos/intern.h"
-using Common::File;
-
namespace AGOS {
// Script opcodes to load into memory
@@ -262,22 +260,22 @@ void AGOSEngine::endCutscene() {
_runScriptReturn1 = true;
}
-File *AGOSEngine::openTablesFile(const char *filename) {
+Common::File *AGOSEngine::openTablesFile(const char *filename) {
if (getFeatures() & GF_OLD_BUNDLE)
return openTablesFile_simon1(filename);
else
return openTablesFile_gme(filename);
}
-File *AGOSEngine::openTablesFile_simon1(const char *filename) {
- File *fo = new File();
+Common::File *AGOSEngine::openTablesFile_simon1(const char *filename) {
+ Common::File *fo = new Common::File();
fo->open(filename);
if (fo->isOpen() == false)
error("openTablesFile: Can't open '%s'", filename);
return fo;
}
-File *AGOSEngine::openTablesFile_gme(const char *filename) {
+Common::File *AGOSEngine::openTablesFile_gme(const char *filename) {
uint res;
uint32 offs;
@@ -291,7 +289,7 @@ File *AGOSEngine::openTablesFile_gme(const char *filename) {
bool AGOSEngine::loadTablesIntoMem(uint16 subrId) {
byte *p;
uint16 min_num, max_num, file_num;
- File *in;
+ Common::File *in;
char filename[30];
if (_tblList == NULL)
@@ -340,7 +338,7 @@ bool AGOSEngine::loadTablesIntoMem(uint16 subrId) {
bool AGOSEngine_Waxworks::loadTablesIntoMem(uint16 subrId) {
byte *p;
uint min_num, max_num;
- File *in;
+ Common::File *in;
p = _tblList;
if (p == NULL)
@@ -407,7 +405,7 @@ bool AGOSEngine::loadXTablesIntoMem(uint16 subrId) {
int i;
uint min_num, max_num;
char filename[30];
- File *in;
+ Common::File *in;
p = _xtblList;
if (p == NULL)
@@ -457,7 +455,7 @@ bool AGOSEngine::loadXTablesIntoMem(uint16 subrId) {
return 0;
}
-void AGOSEngine::closeTablesFile(File *in) {
+void AGOSEngine::closeTablesFile(Common::File *in) {
if (getFeatures() & GF_OLD_BUNDLE) {
in->close();
delete in;
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 6b0f4d3b39..a8f9327152 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -49,9 +49,6 @@
#include "gui/KeysDialog.h"
#endif
-using GUI::CommandSender;
-using GUI::StaticTextWidget;
-
class ConfigDialog : public GUI::OptionsDialog {
protected:
#ifdef SMALL_SCREEN_DEVICE
@@ -76,15 +73,15 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall));
} else {
- StaticTextWidget *title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+ GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
title->setAlign(Graphics::kTextAlignCenter);
}
#else
- StaticTextWidget *title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+ GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
title->setAlign(Graphics::kTextAlignCenter);
#endif
- StaticTextWidget *version = new StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
+ GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
version->setAlign(Graphics::kTextAlignCenter);
new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), 0, kPlayCmd, 'P');
@@ -130,7 +127,7 @@ MainMenuDialog::~MainMenuDialog() {
delete _saveDialog;
}
-void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+void MainMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kPlayCmd:
close();
@@ -187,16 +184,16 @@ void MainMenuDialog::reflowLayout() {
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall));
- GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
+ GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title");
if (title) {
removeWidget(title);
title->setNext(0);
delete title;
}
} else {
- GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
+ GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title");
if (!title) {
- title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+ title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
title->setAlign(Graphics::kTextAlignCenter);
}
@@ -321,7 +318,7 @@ ConfigDialog::~ConfigDialog() {
#endif
}
-void ConfigDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kKeysCmd:
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 4342a1d6ad..90c2b67b85 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -33,8 +33,6 @@
namespace Lure {
-using namespace Common;
-
static Resources *int_resources = NULL;
Resources &Resources::getReference() {
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 093a103cc8..1cdc9e3ff0 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -57,8 +57,6 @@
#include "gui/KeysDialog.h"
#endif
-using GUI::CommandSender;
-using GUI::StaticTextWidget;
using Graphics::kTextAlignCenter;
using Graphics::kTextAlignLeft;
using GUI::WIDGET_ENABLED;
@@ -257,7 +255,7 @@ ScummMenuDialog::~ScummMenuDialog() {
delete _helpDialog;
}
-void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+void ScummMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kHelpCmd:
_helpDialog->runModal();
@@ -276,7 +274,7 @@ enum {
HelpDialog::HelpDialog(const GameSettings &game)
: ScummDialog("ScummHelp"), _game(game) {
- _title = new StaticTextWidget(this, "ScummHelp.Title", "");
+ _title = new GUI::StaticTextWidget(this, "ScummHelp.Title", "");
_page = 1;
_backgroundType = GUI::ThemeEngine::kDialogBackgroundDefault;
@@ -292,8 +290,8 @@ HelpDialog::HelpDialog(const GameSettings &game)
// Dummy entries
for (int i = 0; i < HELP_NUM_LINES; i++) {
- _key[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight);
- _dsc[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft);
+ _key[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight);
+ _dsc[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft);
}
}
@@ -345,7 +343,7 @@ void HelpDialog::displayKeyBindings() {
delete[] dscStr;
}
-void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+void HelpDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kNextCmd:
@@ -385,7 +383,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, int res)
_message = queryResString(res);
// Width and height are dummy
- _text = new StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
+ _text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
}
InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
@@ -394,7 +392,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
_message = message;
// Width and height are dummy
- _text = new StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
+ _text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
}
void InfoDialog::setInfoText(const String& message) {
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 0081720d03..08feb7ffd5 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -27,8 +27,6 @@
#include "scumm/scumm.h"
-using Common::File;
-
namespace Scumm {
#pragma mark -
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index cd761db81a..bfd45d8005 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -28,8 +28,6 @@
#include "common/endian.h"
#include "common/md5.h"
-using Common::File;
-
namespace Scumm {
#pragma mark -