mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 20:01:25 +00:00
MADS: Reduce the scope of a variable in Action, rename some British variable names
This commit is contained in:
parent
46cedfc903
commit
e016e65767
@ -87,9 +87,9 @@ void MADSAction::clear() {
|
|||||||
_pickedWord = 0;
|
_pickedWord = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MADSAction::appendVocab(int vocabId, bool capitalise) {
|
void MADSAction::appendVocab(int vocabId, bool capitalize) {
|
||||||
Common::String vocabStr = _vm->_game->_scene.getVocab(vocabId);
|
Common::String vocabStr = _vm->_game->_scene.getVocab(vocabId);
|
||||||
if (capitalise)
|
if (capitalize)
|
||||||
vocabStr.setChar(toupper(vocabStr[0]), 0);
|
vocabStr.setChar(toupper(vocabStr[0]), 0);
|
||||||
|
|
||||||
_statusText += vocabStr;
|
_statusText += vocabStr;
|
||||||
@ -109,7 +109,6 @@ void MADSAction::startWalkingDirectly(int walkType) {
|
|||||||
void MADSAction::set() {
|
void MADSAction::set() {
|
||||||
Scene &scene = _vm->_game->_scene;
|
Scene &scene = _vm->_game->_scene;
|
||||||
UserInterface &userInterface = scene._userInterface;
|
UserInterface &userInterface = scene._userInterface;
|
||||||
bool flag = false;
|
|
||||||
_statusText = "";
|
_statusText = "";
|
||||||
|
|
||||||
_action._verbId = VERB_NONE;
|
_action._verbId = VERB_NONE;
|
||||||
@ -128,6 +127,7 @@ void MADSAction::set() {
|
|||||||
// Two 'look' actions in succession, so the action becomes 'Look around'
|
// Two 'look' actions in succession, so the action becomes 'Look around'
|
||||||
_statusText = kLookAroundStr;
|
_statusText = kLookAroundStr;
|
||||||
} else {
|
} else {
|
||||||
|
bool flag = false;
|
||||||
if ((_commandSource == CAT_INV_VOCAB) && (_selectedRow >= 0)
|
if ((_commandSource == CAT_INV_VOCAB) && (_selectedRow >= 0)
|
||||||
&& (_verbType == VERB_THAT) && (_prepType == PREP_NONE)) {
|
&& (_verbType == VERB_THAT) && (_prepType == PREP_NONE)) {
|
||||||
// Use/to action
|
// Use/to action
|
||||||
@ -137,7 +137,7 @@ void MADSAction::set() {
|
|||||||
_action._objectNameId = objEntry._descId;
|
_action._objectNameId = objEntry._descId;
|
||||||
_action._verbId = objEntry._vocabList[_selectedRow]._vocabId;
|
_action._verbId = objEntry._vocabList[_selectedRow]._vocabId;
|
||||||
|
|
||||||
// Set up the status text stirng
|
// Set up the status text string
|
||||||
_statusText = kUseStr;
|
_statusText = kUseStr;
|
||||||
appendVocab(_action._objectNameId);
|
appendVocab(_action._objectNameId);
|
||||||
_statusText += kToStr;
|
_statusText += kToStr;
|
||||||
|
@ -106,7 +106,7 @@ private:
|
|||||||
MADSEngine *_vm;
|
MADSEngine *_vm;
|
||||||
Common::String _statusText;
|
Common::String _statusText;
|
||||||
|
|
||||||
void appendVocab(int vocabId, bool capitalise = false);
|
void appendVocab(int vocabId, bool capitalize = false);
|
||||||
|
|
||||||
void startWalkingDirectly(int walkType);
|
void startWalkingDirectly(int walkType);
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user