[Scummvm-cvs-logs] SF.net SVN: scummvm:[50040] scummvm/trunk/engines/parallaction/gui_br.cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Jun 19 06:51:00 CEST 2010


Revision: 50040
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50040&view=rev
Author:   peres001
Date:     2010-06-19 04:51:00 +0000 (Sat, 19 Jun 2010)

Log Message:
-----------
Use the new _nextPart member switching part from the menu in BRA.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/gui_br.cpp

Modified: scummvm/trunk/engines/parallaction/gui_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gui_br.cpp	2010-06-19 04:50:44 UTC (rev 50039)
+++ scummvm/trunk/engines/parallaction/gui_br.cpp	2010-06-19 04:51:00 UTC (rev 50040)
@@ -98,6 +98,12 @@
 	}
 };
 
+
+struct LocationPart {
+	int part;
+	const char *location;
+};
+
 class MainMenuInputState_BR : public MenuInputState {
 	Parallaction_br *_vm;
 
@@ -158,7 +164,7 @@
 	const char **_menuStrings;
 	const MenuOptions *_options;
 
-	static const char *_firstLocation[];
+	static LocationPart _firstLocation[];
 
 	int _availItems;
 	int _selection;
@@ -205,7 +211,8 @@
 			return this;
 		}
 
-		switch (_options[_selection]) {
+		int selection = _options[_selection];
+		switch (selection) {
 		case kMenuQuit: {
 			_vm->quitGame();
 			break;
@@ -218,8 +225,10 @@
 			}
 			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 @@
 
 };
 
-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",


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list