diff options
Diffstat (limited to 'engines/hugo/parser_v3d.cpp')
-rw-r--r-- | engines/hugo/parser_v3d.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index 88ff980d65..f08d472240 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -184,7 +184,7 @@ void Parser_v3d::lineHandler() { // If a not-near comment was generated, print it if (*farComment != '\0') { - Utils::Box(kBoxAny, "%s", farComment); + Utils::notifyBox(farComment); return; } @@ -193,13 +193,13 @@ void Parser_v3d::lineHandler() { const char *noun = findNoun(); if (verb && noun) { // A combination I didn't think of - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBNoPoint)); + Utils::notifyBox(_vm->_text->getTextParser(kTBNoPoint)); } else if (noun) { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBNoun)); + Utils::notifyBox(_vm->_text->getTextParser(kTBNoun)); } else if (verb) { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBVerb)); + Utils::notifyBox(_vm->_text->getTextParser(kTBVerb)); } else { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBEh)); + Utils::notifyBox(_vm->_text->getTextParser(kTBEh)); } } @@ -236,7 +236,7 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { uint16 *reqs = _arrayReqs[cmnd->reqIndex]; // ptr to list of required objects for (i = 0; reqs[i]; i++) { // for each obj if (!_vm->_object->isCarrying(reqs[i])) { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextData(cmnd->textDataNoCarryIndex)); + Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataNoCarryIndex)); return true; } } @@ -244,14 +244,14 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { // Required objects are present, now check state is correct if ((obj->state != cmnd->reqState) && (cmnd->reqState != kStateDontCare)) { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextData(cmnd->textDataWrongIndex)); + Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataWrongIndex)); return true; } // Everything checked. Change the state and carry out any actions if (cmnd->reqState != kStateDontCare) // Don't change new state if required state didn't care obj->state = cmnd->newState; - Utils::Box(kBoxAny, "%s", _vm->_text->getTextData(cmnd->textDataDoneIndex)); + Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataDoneIndex)); _vm->_scheduler->insertActionList(cmnd->actIndex); // See if any additional generic actions @@ -273,35 +273,35 @@ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { if (isWordPresent(_vm->_text->getVerbArray(_vm->_look)) && isNear_v3(obj, _vm->_text->getVerb(_vm->_look, 0), comment)) { // Test state-dependent look before general look if ((obj->genericCmd & LOOK_S) == LOOK_S) { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextData(obj->stateDataIndex[obj->state])); + Utils::notifyBox(_vm->_text->getTextData(obj->stateDataIndex[obj->state])); } else { if ((LOOK & obj->genericCmd) == LOOK) { if (obj->dataIndex != 0) - Utils::Box(kBoxAny, "%s", _vm->_text->getTextData(obj->dataIndex)); + Utils::notifyBox(_vm->_text->getTextData(obj->dataIndex)); else return false; } else { - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBUnusual)); + Utils::notifyBox(_vm->_text->getTextParser(kTBUnusual)); } } } else if (isWordPresent(_vm->_text->getVerbArray(_vm->_take)) && isNear_v3(obj, _vm->_text->getVerb(_vm->_take, 0), comment)) { if (obj->carriedFl) - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBHave)); + Utils::notifyBox(_vm->_text->getTextParser(kTBHave)); else if ((TAKE & obj->genericCmd) == TAKE) takeObject(obj); else if (obj->cmdIndex) // No comment if possible commands return false; else if (!obj->verbOnlyFl && (TAKE & obj->genericCmd) == TAKE) // Make sure not taking object in context! - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBNoUse)); + Utils::notifyBox(_vm->_text->getTextParser(kTBNoUse)); else return false; } else if (isWordPresent(_vm->_text->getVerbArray(_vm->_drop))) { if (!obj->carriedFl && ((DROP & obj->genericCmd) == DROP)) - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBDontHave)); + Utils::notifyBox(_vm->_text->getTextParser(kTBDontHave)); else if (obj->carriedFl && ((DROP & obj->genericCmd) == DROP)) dropObject(obj); else if (obj->cmdIndex == 0) - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBNeed)); + Utils::notifyBox(_vm->_text->getTextParser(kTBNeed)); else return false; } else { // It was not a generic cmd @@ -383,7 +383,7 @@ void Parser_v3d::takeObject(object_t *obj) { if (obj->seqNumb > 0) // If object has an image, force walk to dropped obj->viewx = -1; // (possibly moved) object next time taken! - Utils::Box(kBoxAny, TAKE_TEXT, _vm->_text->getNoun(obj->nounIndex, TAKE_NAME)); + Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(obj->nounIndex, TAKE_NAME))); } /** @@ -402,7 +402,7 @@ void Parser_v3d::dropObject(object_t *obj) { obj->y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1; obj->y = (obj->y + obj->currImagePtr->y2 < kYPix) ? obj->y : kYPix - obj->currImagePtr->y2 - 10; _vm->adjustScore(-obj->objValue); - Utils::Box(kBoxAny, "%s", _vm->_text->getTextParser(kTBOk)); + Utils::notifyBox(_vm->_text->getTextParser(kTBOk)); } /** @@ -422,7 +422,7 @@ bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { (!obj[i].matchFl || !findNoun()) && ((obj[i].roomState == kStateDontCare) || (obj[i].roomState == _vm->_screenStates[*_vm->_screen_p]))) { - Utils::Box(kBoxAny, "%s", _vm->_file->fetchString(obj[i].commentIndex)); + Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); _vm->_scheduler->processBonus(obj[i].bonusIndex); // If this is LOOK (without a noun), show any takeable objects @@ -450,7 +450,7 @@ bool Parser_v3d::isBackgroundWord_v3(objectList_t obj) const { isWordPresent(_vm->_text->getNounArray(obj[i].nounIndex)) && ((obj[i].roomState == kStateDontCare) || (obj[i].roomState == _vm->_screenStates[*_vm->_screen_p]))) { - Utils::Box(kBoxAny, "%s", _vm->_file->fetchString(obj[i].commentIndex)); + Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); _vm->_scheduler->processBonus(obj[i].bonusIndex); return true; } |