aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-18 18:30:31 -0400
committerPaul Gilbert2015-05-18 18:30:31 -0400
commit844d8012598bf1f43b7eff4c8d7b9a7be9287b18 (patch)
tree4313409a9fdd5cdb7c13b7c5a8d298aff23608ea /engines
parentc24d0de8f6147ef31e015a3e642fcb1896013b50 (diff)
downloadscummvm-rg350-844d8012598bf1f43b7eff4c8d7b9a7be9287b18.tar.gz
scummvm-rg350-844d8012598bf1f43b7eff4c8d7b9a7be9287b18.tar.bz2
scummvm-rg350-844d8012598bf1f43b7eff4c8d7b9a7be9287b18.zip
SHERLOCK: Syntactic fixes
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/animation.cpp8
-rw-r--r--engines/sherlock/detection.cpp2
-rw-r--r--engines/sherlock/detection_tables.h2
-rw-r--r--engines/sherlock/inventory.cpp3
-rw-r--r--engines/sherlock/map.cpp2
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp6
-rw-r--r--engines/sherlock/scene.cpp2
-rw-r--r--engines/sherlock/sherlock.cpp2
-rw-r--r--engines/sherlock/sherlock.h2
-rw-r--r--engines/sherlock/sound.cpp2
10 files changed, 16 insertions, 15 deletions
diff --git a/engines/sherlock/animation.cpp b/engines/sherlock/animation.cpp
index 3c7b2b7443..3c283636ca 100644
--- a/engines/sherlock/animation.cpp
+++ b/engines/sherlock/animation.cpp
@@ -140,7 +140,7 @@ bool Animation::play(const Common::String &filename, int minDelay, int fade,
* Load the prologue name array
*/
void Animation::setPrologueNames(const char *const *names, int count) {
- for (int idx = 0; idx < count; ++idx, names++) {
+ for (int idx = 0; idx < count; ++idx, ++names) {
_prologueNames.push_back(*names);
}
}
@@ -161,7 +161,7 @@ void Animation::setPrologueFrames(const int *frames, int count, int maxFrames) {
* Load the title name array
*/
void Animation::setTitleNames(const char *const *names, int count) {
- for (int idx = 0; idx < count; ++idx, names++) {
+ for (int idx = 0; idx < count; ++idx, ++names) {
_titleNames.push_back(*names);
}
}
@@ -185,14 +185,14 @@ const int *Animation::checkForSoundFrames(const Common::String &filename) {
const int *frames = &NO_FRAMES;
if (_vm->_soundOverride.empty()) {
- for (Common::Array<const char *>::size_type idx = 0; idx < _prologueNames.size(); ++idx) {
+ for (uint idx = 0; idx < _prologueNames.size(); ++idx) {
if (filename.equalsIgnoreCase(_prologueNames[idx])) {
frames = &_prologueFrames[idx][0];
break;
}
}
} else {
- for (Common::Array<const char *>::size_type idx = 0; idx < _titleNames.size(); ++idx) {
+ for (uint idx = 0; idx < _titleNames.size(); ++idx) {
if (filename.equalsIgnoreCase(_titleNames[idx])) {
frames = &_titleFrames[idx][0];
break;
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index 00f6a1256e..e69887b5c7 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -144,7 +144,7 @@ bool Sherlock::SherlockEngine::hasFeature(EngineFeature f) const {
/**
* Returns whether the version is a demo
*/
-bool Sherlock::SherlockEngine::getIsDemo() const {
+bool Sherlock::SherlockEngine::isDemo() const {
return _gameDescription->desc.flags & ADGF_DEMO;
}
diff --git a/engines/sherlock/detection_tables.h b/engines/sherlock/detection_tables.h
index 8300a0ffcf..3960836f82 100644
--- a/engines/sherlock/detection_tables.h
+++ b/engines/sherlock/detection_tables.h
@@ -32,7 +32,7 @@ static const SherlockGameDescription gameDescriptions[] = {
AD_ENTRY1s("talk.lib", "ad0c4d6865edf15da4e9204c08815875", 238928),
Common::EN_ANY,
Common::kPlatformDOS,
- ADGF_UNSTABLE | ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO2(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES)
},
GType_SerratedScalpel,
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index 5b548bb9e3..b7d973e289 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -136,7 +136,8 @@ int Inventory::findInv(const Common::String &name) {
return idx;
}
- return 1;
+ // Couldn't find the desired item
+ error("Couldn't find inventory item - %s", name.c_str());
}
/**
diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp
index dc9a0565cb..36c932d90d 100644
--- a/engines/sherlock/map.cpp
+++ b/engines/sherlock/map.cpp
@@ -69,7 +69,7 @@ Map::Map(SherlockEngine *vm) : _vm(vm), _topLine(SHERLOCK_SCREEN_WIDTH, 12) {
for (int idx = 0; idx < MAX_HOLMES_SEQUENCE; ++idx)
Common::fill(&_sequences[idx][0], &_sequences[idx][MAX_FRAME], 0);
- if (!_vm->getIsDemo())
+ if (!_vm->isDemo())
loadData();
}
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 078677be65..0d62336283 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -250,7 +250,7 @@ void ScalpelEngine::initialize() {
_flags[3] = true; // Turn on Alley
_flags[39] = true; // Turn on Baker Street
- if (!getIsDemo()) {
+ if (!isDemo()) {
// Load the map co-ordinates for each scene and sequence data
_map->loadPoints(NUM_PLACES, &MAP_X[0], &MAP_Y[0], &MAP_TRANSLATE[0]);
_map->loadSequences(3, &MAP_SEQUENCES[0][0]);
@@ -269,7 +269,7 @@ void ScalpelEngine::initialize() {
_animation->setTitleFrames(&TITLE_FRAMES[0][0], 7, 9);
// Starting scene
- if (getIsDemo() && _interactiveFl)
+ if (isDemo() && _interactiveFl)
_scene->_goToScene = 3;
else
_scene->_goToScene = 4;
@@ -279,7 +279,7 @@ void ScalpelEngine::initialize() {
* Show the opening sequence
*/
void ScalpelEngine::showOpening() {
- if (getIsDemo() && _interactiveFl)
+ if (isDemo() && _interactiveFl)
return;
if (!showCityCutscene())
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 91c411db88..b75531baf6 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -495,7 +495,7 @@ bool Scene::loadScene(const Common::String &filename) {
_walkedInScene = false;
saves._justLoaded = false;
- if (!_vm->getIsDemo()) {
+ if (!_vm->isDemo()) {
// Reset the previous map location and position on overhead map
map._oldCharPoint = _currentScene;
map._overPos.x = map[_currentScene].x * 100 - 600;
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index bdd2ec3588..eb80fb6e3b 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -81,7 +81,7 @@ void SherlockEngine::initialize() {
Object::setVm(this);
Sprite::setVm(this);
- if (getIsDemo()) {
+ if (isDemo()) {
Common::File f;
// The interactive demo doesn't have an intro thus doesn't include TITLE.SND
// At the opposite, the non-interactive demo is only the intro.
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index 68c8e8daca..571bd4dc61 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -117,7 +117,7 @@ public:
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
virtual void syncSoundSettings();
- virtual bool getIsDemo() const;
+ virtual bool isDemo() const;
GameType getGameID() const;
Common::Language getLanguage() const;
diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp
index b44eb17397..bcc6c96e4f 100644
--- a/engines/sherlock/sound.cpp
+++ b/engines/sherlock/sound.cpp
@@ -49,7 +49,7 @@ Sound::Sound(SherlockEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
_vm->_res->addToCache("MUSIC.LIB");
_vm->_res->addToCache("SND.SND");
- if (!_vm->getIsDemo()) {
+ if (!_vm->isDemo()) {
_vm->_res->addToCache("TITLE.SND");
_vm->_res->addToCache("EPILOGUE.SND");
}