diff options
author | Arnaud Boutonné | 2011-01-25 00:32:48 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-01-25 00:32:48 +0000 |
commit | 2846ce14f35afc029fe058b3ed50c229ef856615 (patch) | |
tree | e44461ea67bd915b730d6d68fc8470243e3b15a5 /engines/hugo/mouse.cpp | |
parent | 45a4dfa44d595d3c81858b46f9896fdbf6ea02ad (diff) | |
download | scummvm-rg350-2846ce14f35afc029fe058b3ed50c229ef856615.tar.gz scummvm-rg350-2846ce14f35afc029fe058b3ed50c229ef856615.tar.bz2 scummvm-rg350-2846ce14f35afc029fe058b3ed50c229ef856615.zip |
HUGO: Move text arrays to a separate class
svn-id: r55507
Diffstat (limited to 'engines/hugo/mouse.cpp')
-rw-r--r-- | engines/hugo/mouse.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 3d023b46e1..298ab4e26e 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -43,6 +43,7 @@ #include "hugo/route.h" #include "hugo/util.h" #include "hugo/object.h" +#include "hugo/text.h" namespace Hugo { @@ -129,7 +130,7 @@ void MouseHandler::processRightClick(int16 objId, int16 cx, int16 cy) { if (_vm->_hero->cycling == kCycleInvisible) // If invisible do _vm->_object->useObject(objId); // immediate use else - Utils::Box(kBoxAny, "%s", _vm->_textMouse[kMsNoWayText]); // Can't get there + Utils::Box(kBoxAny, "%s", _vm->_text->getTextMouse(kMsNoWayText)); // Can't get there } break; } @@ -183,7 +184,7 @@ void MouseHandler::processLeftClick(int16 objId, int16 cx, int16 cy) { else if (_vm->_hotspots[i].direction == Common::KEYCODE_LEFT) x += kHeroMaxWidth; if (!_vm->_route->startRoute(kRouteExit, i, x, y)) - Utils::Box(kBoxAny, "%s", _vm->_textMouse[kMsNoWayText]); // Can't get there + Utils::Box(kBoxAny, "%s", _vm->_text->getTextMouse(kMsNoWayText)); // Can't get there } // Get rid of any attached icon @@ -213,7 +214,7 @@ void MouseHandler::processLeftClick(int16 objId, int16 cx, int16 cy) { if (_vm->_hero->cycling == kCycleInvisible) // If invisible do _vm->_object->lookObject(obj); // immediate decription else - Utils::Box(kBoxAny, "%s", _vm->_textMouse[kMsNoWayText]); // Can't get there + Utils::Box(kBoxAny, "%s", _vm->_text->getTextMouse(kMsNoWayText)); // Can't get there } break; } @@ -260,7 +261,7 @@ void MouseHandler::mouseHandler() { if (objId >= 0) { // Got a match // Display object name next to cursor (unless CURSOR_NOCHAR) // Note test for swapped hero name - char *name = _vm->_arrayNouns[_vm->_object->_objects[(objId == kHeroIndex) ? _vm->_heroImage : objId].nounIndex][kCursorNameIndex]; + char *name = _vm->_text->getNoun(_vm->_object->_objects[(objId == kHeroIndex) ? _vm->_heroImage : objId].nounIndex, kCursorNameIndex); if (name[0] != kCursorNochar) cursorText(name, cx, cy, U_FONT8, _TBRIGHTWHITE); @@ -274,7 +275,7 @@ void MouseHandler::mouseHandler() { int i = findExit(cx, cy); if (i != -1 && _vm->_hotspots[i].viewx >= 0) { objId = kExitHotspot; - cursorText(_vm->_textMouse[kMsExit], cx, cy, U_FONT8, _TBRIGHTWHITE); + cursorText(_vm->_text->getTextMouse(kMsExit), cx, cy, U_FONT8, _TBRIGHTWHITE); } } } |