aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-05-19 20:53:40 +0200
committerStrangerke2014-05-19 20:53:40 +0200
commite016e65767598d5aeb172f3cce8bcb106df25ddc (patch)
treefe938b0be4c08676f8320b60ed61fc5e38a41053
parent46cedfc90384708bfddcd1bbc6d9468ca3014f31 (diff)
downloadscummvm-rg350-e016e65767598d5aeb172f3cce8bcb106df25ddc.tar.gz
scummvm-rg350-e016e65767598d5aeb172f3cce8bcb106df25ddc.tar.bz2
scummvm-rg350-e016e65767598d5aeb172f3cce8bcb106df25ddc.zip
MADS: Reduce the scope of a variable in Action, rename some British variable names
-rw-r--r--engines/mads/action.cpp8
-rw-r--r--engines/mads/action.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index 5d63c3a268..f26a999ff7 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -87,9 +87,9 @@ void MADSAction::clear() {
_pickedWord = 0;
}
-void MADSAction::appendVocab(int vocabId, bool capitalise) {
+void MADSAction::appendVocab(int vocabId, bool capitalize) {
Common::String vocabStr = _vm->_game->_scene.getVocab(vocabId);
- if (capitalise)
+ if (capitalize)
vocabStr.setChar(toupper(vocabStr[0]), 0);
_statusText += vocabStr;
@@ -109,7 +109,6 @@ void MADSAction::startWalkingDirectly(int walkType) {
void MADSAction::set() {
Scene &scene = _vm->_game->_scene;
UserInterface &userInterface = scene._userInterface;
- bool flag = false;
_statusText = "";
_action._verbId = VERB_NONE;
@@ -128,6 +127,7 @@ void MADSAction::set() {
// Two 'look' actions in succession, so the action becomes 'Look around'
_statusText = kLookAroundStr;
} else {
+ bool flag = false;
if ((_commandSource == CAT_INV_VOCAB) && (_selectedRow >= 0)
&& (_verbType == VERB_THAT) && (_prepType == PREP_NONE)) {
// Use/to action
@@ -137,7 +137,7 @@ void MADSAction::set() {
_action._objectNameId = objEntry._descId;
_action._verbId = objEntry._vocabList[_selectedRow]._vocabId;
- // Set up the status text stirng
+ // Set up the status text string
_statusText = kUseStr;
appendVocab(_action._objectNameId);
_statusText += kToStr;
diff --git a/engines/mads/action.h b/engines/mads/action.h
index af52d2c7a2..3010226787 100644
--- a/engines/mads/action.h
+++ b/engines/mads/action.h
@@ -106,7 +106,7 @@ private:
MADSEngine *_vm;
Common::String _statusText;
- void appendVocab(int vocabId, bool capitalise = false);
+ void appendVocab(int vocabId, bool capitalize = false);
void startWalkingDirectly(int walkType);
public: