From de7de460e8c985764d9e5719789da0aa8df914e9 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 19 Jun 2010 04:51:00 +0000 Subject: Use the new _nextPart member switching part from the menu in BRA. svn-id: r50040 --- engines/parallaction/gui_br.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp index 7096bbe569..21cb2d8b00 100644 --- a/engines/parallaction/gui_br.cpp +++ b/engines/parallaction/gui_br.cpp @@ -98,6 +98,12 @@ public: } }; + +struct LocationPart { + int part; + const char *location; +}; + class MainMenuInputState_BR : public MenuInputState { Parallaction_br *_vm; @@ -158,7 +164,7 @@ class MainMenuInputState_BR : public MenuInputState { const char **_menuStrings; const MenuOptions *_options; - static const char *_firstLocation[]; + static LocationPart _firstLocation[]; int _availItems; int _selection; @@ -205,7 +211,8 @@ public: return this; } - switch (_options[_selection]) { + int selection = _options[_selection]; + switch (selection) { case kMenuQuit: { _vm->quitGame(); break; @@ -218,8 +225,10 @@ public: } break; - default: - _vm->scheduleLocationSwitch(_firstLocation[_options[_selection]]); + default: + _vm->_nextPart = _firstLocation[selection].part; + _vm->scheduleLocationSwitch(_firstLocation[selection].location); + } _vm->_system->showMouse(false); @@ -262,14 +271,15 @@ public: }; -const char *MainMenuInputState_BR::_firstLocation[] = { - "intro.0", - "museo.1", - "start.2", - "bolscoi.3", - "treno.4" +LocationPart MainMenuInputState_BR::_firstLocation[] = { + { 0, "intro" }, + { 1, "museo" }, + { 2, "start" }, + { 3, "bolscoi" }, + { 4, "treno" } }; + const char *MainMenuInputState_BR::_menuStringsAmiga[NUM_MENULINES] = { "See the introduction", "Load a Saved Game", -- cgit v1.2.3