[Scummvm-git-logs] scummvm master -> 85b8806ca8de279f6e90969bb507d49cc2408b33

bluegr bluegr at gmail.com
Mon Dec 21 01:14:24 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d0253df616 STARTREK: Fix type check
85b8806ca8 STARTREK: More work on bridge sequences


Commit: d0253df61686207baf5ae85fe4fa3f27296e3f00
    https://github.com/scummvm/scummvm/commit/d0253df61686207baf5ae85fe4fa3f27296e3f00
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2020-12-21T03:13:56+02:00

Commit Message:
STARTREK: Fix type check

Changed paths:
    engines/startrek/action.h


diff --git a/engines/startrek/action.h b/engines/startrek/action.h
index 22098594e7..8a514f8fc2 100644
--- a/engines/startrek/action.h
+++ b/engines/startrek/action.h
@@ -75,7 +75,7 @@ struct Action {
 
 	uint32 getBitmask() const {
 		uint32 ret = 0;
-		if (type != 0xff)
+		if (type != -1)
 			ret |= (0xff << 24);
 		if (b1 != 0xff)
 			ret |= (0xff << 16);


Commit: 85b8806ca8de279f6e90969bb507d49cc2408b33
    https://github.com/scummvm/scummvm/commit/85b8806ca8de279f6e90969bb507d49cc2408b33
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2020-12-21T03:13:56+02:00

Commit Message:
STARTREK: More work on bridge sequences

Also, unify the Common::String types

Changed paths:
    engines/startrek/bridge.cpp
    engines/startrek/startrek.cpp
    engines/startrek/startrek.h
    engines/startrek/textbox.cpp


diff --git a/engines/startrek/bridge.cpp b/engines/startrek/bridge.cpp
index dff7f9c08c..c276bb93bd 100644
--- a/engines/startrek/bridge.cpp
+++ b/engines/startrek/bridge.cpp
@@ -88,11 +88,11 @@ enum BridgeSequence {
 	kSeqEndMissionTug,
 	// -- Chapter 3 ----
 	kSeqStartMissionLove,
-	kSeqUnk11,
-	kSeqUnk12,
-	kSeqUnk13,
-	kSeqUnk14,
-	kSeqUnk15,
+	kSeqAfterLoveDebrief,
+	kSeqStartRomulanBattle,
+	kSeqAfterRomulanBattle,
+	kSeqArrivedAtArk7,
+	kSeqEndMissionLove,
 	// -- Chapter 4 ----
 	kSeqStartMissionMudd,
 	kSeqUnk17,
@@ -148,7 +148,9 @@ enum BridgeTalkers {
 	kBridgeTalkerUhura,
 	kBridgeTalkerScotty,
 	kBridgeTalkerMcCoy,
-	kBridgeTalkerCaptainsLog
+	kBridgeTalkerCaptainsLog,
+	kBridgeTalkerElasiCaptain,
+	kBridgeTalkerElasiCereth
 };
 
 void StarTrekEngine::initBridge(bool b) {
@@ -172,7 +174,6 @@ void StarTrekEngine::loadBridge() {
 
 	loadBridgeActors();
 
-
 	//sub_1312C();	// TODO
 
 	// TODO
@@ -192,7 +193,7 @@ void StarTrekEngine::loadBridgeActors() {
 
 // TODO: 2 params, change Enterprise state
 void StarTrekEngine::setBridgeMouseCursor() {
-	_gfx->setMouseBitmap("pushbtn"/*_mouseControllingShip ? "entcur" : "cursor"*/);
+	_gfx->setMouseBitmap("pushbtn" /*_mouseControllingShip ? "entcur" : "cursor"*/);
 }
 
 void StarTrekEngine::showTextboxBridge(int talker, int textId) {
@@ -225,6 +226,12 @@ void StarTrekEngine::showTextboxBridge(int talker, Common::String text) {
 	case kBridgeTalkerCaptainsLog:
 		showTextbox("Captain's Log", text, 160, 130, 176, 0);
 		break;
+	case kBridgeTalkerElasiCaptain:
+		showTextbox("Elasi Captain", text, 160, 190, 44, 0);
+		break;
+	case kBridgeTalkerElasiCereth:
+		showTextbox("Elasi Cereth", text, 160, 190, 44, 0);
+		break;
 	}
 }
 
@@ -272,11 +279,9 @@ void StarTrekEngine::playBridgeSequence(int sequenceId) {
 		showBridgeScreenTalkerWithMessage(12, "Admiral", "woman");
 		break;
 	case kSeqArrivedAtPolluxV:
+		showTextboxBridge(kBridgeTalkerSpock, 15); // We have arrived at Pollux V
 		// In the original, this is actually a handler for Spock, Uhura and Chekov.
 		// We moved their actions in separate functions instead.
-		if (_currentPlanet == _targetPlanet) {
-			showTextboxBridge(kBridgeTalkerSpock, 15); // We have arrived at Pollux V
-		}
 		break;
 	case kSeqEndMissionDemon:
 		_resource->setTxtFileName("DEMON");
@@ -314,7 +319,7 @@ void StarTrekEngine::playBridgeSequence(int sequenceId) {
 		showTextboxBridge(kBridgeTalkerKirk, 8);
 		showBridgeScreenTalkerWithMessage(9, "Elasi Captain", "pira", false);
 		showTextboxBridge(kBridgeTalkerKirk, 10);
-		showTextbox("Elasi Captain", _resource->getLoadedText(11), 160, 190, 44, 0);
+		showTextboxBridge(kBridgeTalkerElasiCaptain, 11);
 		removeActorFromScreen(_currentScreenTalker);
 		initStarfieldSprite(&_starfieldSprite, new StubBitmap(0, 0), _starfieldRect);
 		_sound->playSoundEffectIndex(40);
@@ -328,15 +333,13 @@ void StarTrekEngine::playBridgeSequence(int sequenceId) {
 		_bridgeSequenceToLoad = kSeqArrivedAtBetaMyamid;
 		break;
 	case kSeqArrivedAtBetaMyamid:
+		// In the original, this is actually a handler for Spock, Uhura and Chekov.
+		// We moved their actions in separate functions instead.
 		break;
 	case kSeqApproachedTheMasada:
-		showTextboxBridge(kBridgeTalkerSpock, 20);
-		// TODO: showText2
-		showTextboxBridge(kBridgeTalkerUhura, 21);
-		showBridgeScreenTalkerWithMessage(22, "Elasi Cereth", "pira", false);
-		showTextboxBridge(kBridgeTalkerKirk, 23);
-		removeActorFromScreen(_currentScreenTalker);
-		initStarfieldSprite(&_starfieldSprite, new StubBitmap(0, 0), _starfieldRect);
+		// TODO: approach the Masada 3D animation
+		showTextboxBridge(kBridgeTalkerSpock, 20); // There she is, Captain. She does not appear to be seriously damaged
+		_beamDownAllowed = false;
 		break;
 	case kSeqEndMissionTug:
 		_resource->setTxtFileName("TUG");
@@ -358,7 +361,30 @@ void StarTrekEngine::playBridgeSequence(int sequenceId) {
 		_bridgeSequenceToLoad = kSeqStartMissionLove;
 		break;
 	case kSeqStartMissionLove:	// Chapter 3: Love's Labor Jeopardized (love)
-		_targetPlanet = kPlanetArk7;
+		_targetPlanet = kPlanetArk7;	// We set it earlier for uniformity
+		_missionName = _missionToLoad = "LOVE";
+		_resource->setTxtFileName(_missionName);
+		_sound->loadMusicFile("bridge");
+		showMissionStartEnterpriseFlyby("LOV0\\FLYBY", "tlove");
+		_sound->playSoundEffectIndex(34);
+		showTextboxBridge(kBridgeTalkerUhura, 0);
+		showTextboxBridge(kBridgeTalkerKirk, 1);
+		showBridgeScreenTalkerWithMessage(2, "Admiral", "woman");
+		_mouseControllingShip = true;
+		break;
+	case kSeqAfterLoveDebrief:
+		// TODO
+		break;
+	case kSeqStartRomulanBattle:
+		// TODO
+		break;
+	case kSeqAfterRomulanBattle:
+		// TODO
+		break;
+	case kSeqArrivedAtArk7:
+		// TODO
+		break;
+	case kSeqEndMissionLove:
 		// TODO
 		break;
 	case kSeqStartMissionMudd: // Chapter 4: Another Fine Mess (mudd)
@@ -411,14 +437,20 @@ void StarTrekEngine::bridgeCrewAction(int crewId) {
 	}
 
 	// Uhura's hailing sequences
-	if (crewId == kBridgeTalkerUhura && _currentPlanet == _targetPlanet && !_hailedTarget) {
-		contactTargetAction();
-		_hailedTarget = true;
-		return;
+	if (crewId == kBridgeTalkerUhura && _currentPlanet == _targetPlanet) {
+		if (!_hailedTarget) {
+			contactTargetAction();
+			_hailedTarget = true;
+			return;
+		} else if (_currentPlanet == kPlanetBetaMyamid && _hailedTarget) {
+			hailTheMasada();
+			return;
+		}
 	}
 
-	if (textId >= 0)
+	if (textId >= 0) {
 		showTextboxBridge(crewId, textId);
+	}
 }
 
 void StarTrekEngine::contactTargetAction() {
@@ -429,8 +461,57 @@ void StarTrekEngine::contactTargetAction() {
 		showBridgeScreenTalkerWithMessage(18, "Priest", "prst");
 		break;
 	case kPlanetBetaMyamid: // Chapter 2: Hijacked (tug)
+		if (!_hailedTarget) {
+			showTextboxBridge(kBridgeTalkerUhura, 21);
+			showBridgeScreenTalkerWithMessage(65, "Elasi Captain", "pira", false);
+			negotiateWithElasiCereth();
+			removeActorFromScreen(_currentScreenTalker);
+			initStarfieldSprite(&_starfieldSprite, new StubBitmap(0, 0), _starfieldRect);
+		} else {
+			hailTheMasada();
+		}	
 		break;
+		// TODO: The rest
+	}
+}
+
+void StarTrekEngine::negotiateWithElasiCereth() {
+	const char *options1[] = {
+	    "Captain Kirk",
+		"#BRID\\C_074#This is Captain James T. Kirk of the U.S.S. Enterprise. You are illegally in possession of Starfleet property.",
+		"#BRID\\C_072#This is Captain James T. Kirk of the U.S.S. Enterprise. Listen, Elasi, hand over the ship and hostages now or things are going to get very nasty.",
+		"#BRID\\C_073#This is Captain James T. Kirk of the U.S.S. Enterprise. Mr. Elasi, it appears that you have found something that Starfleet lost.",
+		""
+	};
+
+	/*int choice = */showText(&StarTrekEngine::readTextFromArrayWithChoices, (uintptr)options1, 160, 130, 176, true, false, false);
 	// TODO: The rest
+}
+
+void StarTrekEngine::hailTheMasada() {
+	const char *options[] = {
+	    "Captain Kirk",
+		"Hail the masada.",
+	    "Send prefix code.",
+		""
+	};
+
+	int choice = showText(&StarTrekEngine::readTextFromArrayWithChoices, (uintptr)options, 160, 130, 176, true, false, false);
+	if (choice == 0) {
+		showTextboxBridge(kBridgeTalkerUhura, 21);
+		showBridgeScreenTalkerWithMessage(22, "Elasi Cereth", "pira", false);
+		showTextboxBridge(kBridgeTalkerKirk, 23);
+		removeActorFromScreen(_currentScreenTalker);
+		initStarfieldSprite(&_starfieldSprite, new StubBitmap(0, 0), _starfieldRect);
+		// TODO: Kill 1 crew member
+	} else {
+		Common::String code = showCodeInputBox();
+		if (code == "293391-197736-3829") {
+			showTextboxBridge(kBridgeTalkerUhura, 25);
+			_beamDownAllowed = true;
+		} else {
+			showTextboxBridge(kBridgeTalkerUhura, 26);
+		}
 	}
 }
 
@@ -768,11 +849,16 @@ void StarTrekEngine::handleBridgeMenu(int menuEvent) {
 		} else if (_currentPlanet != _targetPlanet) {
 			showTextboxBridge(kBridgeTalkerSulu, wrongDestinationText);
 		} else {
-			if (_missionToLoad != "FEATHER")
-				showTextboxBridge(kBridgeTalkerKirk, transporterText);
-			else
-				showTextboxBridge(kBridgeTalkerKirk, transporterTextFeather);
-			runGameMode(GAMEMODE_BEAMDOWN, false);
+			if (_targetPlanet == kPlanetBetaMyamid && !_beamDownAllowed) {
+				// Chapter 2, disallow beaming down until the correct code is set
+				showTextboxBridge(kBridgeTalkerSulu, 28); // Captain, the Masada's shields are still up
+			} else {
+				if (_missionToLoad != "FEATHER")
+					showTextboxBridge(kBridgeTalkerKirk, transporterText);
+				else
+					showTextboxBridge(kBridgeTalkerKirk, transporterTextFeather);
+				runGameMode(GAMEMODE_BEAMDOWN, false);
+			}
 		}
 		break;
 	case kBridgeKirkOptions: // Kirk, options
@@ -802,6 +888,10 @@ void StarTrekEngine::handleBridgeMenu(int menuEvent) {
 		//	showTextboxBridge(kBridgeTalkerSulu, missionNotOverText);
 		} else {
 			orbitPlanet();
+
+			if (_targetPlanet == kPlanetBetaMyamid) {
+				_bridgeSequenceToLoad = kSeqApproachedTheMasada;
+			}
 		}
 		break;
 	case kBridgeSuluShields: // Sulu, shields
diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp
index 140df2cca1..9c03ba06f2 100644
--- a/engines/startrek/startrek.cpp
+++ b/engines/startrek/startrek.cpp
@@ -115,6 +115,7 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam
 	_currentPlanet = -1;
 	_gameIsPaused = false;
 	_hailedTarget = false;
+	_beamDownAllowed = true;
 
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 	SearchMan.addSubDirectoryMatching(gameDataDir, "patches");
diff --git a/engines/startrek/startrek.h b/engines/startrek/startrek.h
index 1459cc282f..ac552f8977 100644
--- a/engines/startrek/startrek.h
+++ b/engines/startrek/startrek.h
@@ -276,12 +276,15 @@ private:
 	void wrongDestinationRandomEncounter();
 	void bridgeCrewAction(int crewId);
 	void contactTargetAction();
+	void negotiateWithElasiCereth();
+	void hailTheMasada();
 
 	int _targetPlanet;
 	int _currentPlanet;
 	int _currentScreenTalker;
 	bool _gameIsPaused;
 	bool _hailedTarget;
+	bool _beamDownAllowed;
 
 public:
 	void playMovie(Common::String filename);
@@ -493,26 +496,26 @@ public:
 	 */
 	void drawTextLineToBitmap(const char *text, int textLen, int x, int y, Bitmap *bitmap);
 
-	String centerTextboxHeader(String headerText);
-	void getTextboxHeader(String *headerTextOutput, String speakerText, int choiceIndex);
+	Common::String centerTextboxHeader(Common::String headerText);
+	void getTextboxHeader(Common::String *headerTextOutput, Common::String speakerText, int choiceIndex);
 	/**
 	 * Text getter for showText which reads from an rdf file.
 	 * Not really used, since it would require hardcoding text locations in RDF files.
 	 * "readTextFromArrayWithChoices" replaces this.
 	 */
-	String readTextFromRdf(int choiceIndex, uintptr data, String *headerTextOutput);
+	Common::String readTextFromRdf(int choiceIndex, uintptr data, Common::String *headerTextOutput);
 
 	/**
 	 * Shows text with the given header and main text.
 	 */
-	void showTextbox(String headerText, const String &mainText, int xoffset, int yoffset, byte textColor, int maxTextLines); // TODO: better name. (return type?)
+	void showTextbox(Common::String headerText, const Common::String &mainText, int xoffset, int yoffset, byte textColor, int maxTextLines); // TODO: better name. (return type?)
 
-	String skipTextAudioPrompt(const String &str);
+	Common::String skipTextAudioPrompt(const Common::String &str);
 	/**
 	 * Plays an audio prompt, if it exists, and returns the string starting at the end of the
 	 * prompt.
 	 */
-	String playTextAudio(const String &str);
+	Common::String playTextAudio(const Common::String &str);
 
 	/**
 	 * @param rclickCancelsChoice   If true, right-clicks return "-1" as choice instead of
@@ -523,8 +526,8 @@ public:
 	/**
 	 * Returns the number of lines this string will take up in a textbox.
 	 */
-	int getNumTextboxLines(const String &str);
-	String putTextIntoLines(const String &text);
+	int getNumTextboxLines(const Common::String &str);
+	Common::String putTextIntoLines(const Common::String &text);
 
 	/**
 	 * Creates a blank textbox in a TextBitmap, and initializes a sprite to use it.
@@ -533,21 +536,21 @@ public:
 	/**
 	 * Draws the "main" text (everything but the header at the top) to a TextBitmap.
 	 */
-	void drawMainText(TextBitmap *bitmap, int numTextLines, int numTextboxLines, const String &text, bool withHeader);
+	void drawMainText(TextBitmap *bitmap, int numTextLines, int numTextboxLines, const Common::String &text, bool withHeader);
 
-	String readLineFormattedText(TextGetterFunc textGetter, uintptr var, int choiceIndex, TextBitmap *textBitmap, int numTextboxLines, int *numLines);
+	Common::String readLineFormattedText(TextGetterFunc textGetter, uintptr var, int choiceIndex, TextBitmap *textBitmap, int numTextboxLines, int *numLines);
 
 	/**
 	 * Text getter for showText which reads choices from an array of pointers.
 	 * Last element in the array must be an empty string.
 	 */
-	String readTextFromArray(int choiceIndex, uintptr data, String *headerTextOutput);
+	Common::String readTextFromArray(int choiceIndex, uintptr data, Common::String *headerTextOutput);
 	/**
 	 * Similar to above, but shows the choice index when multiple choices are present.
 	 * Effectively replaces the "readTextFromRdf" function.
 	 */
-	String readTextFromArrayWithChoices(int choiceIndex, uintptr data, String *headerTextOutput);
-	Common::String readTextFromFoundComputerTopics(int choiceIndex, uintptr data, String *headerTextOutput);
+	String readTextFromArrayWithChoices(int choiceIndex, uintptr data, Common::String *headerTextOutput);
+	Common::String readTextFromFoundComputerTopics(int choiceIndex, uintptr data, Common::String *headerTextOutput);
 
 	Common::String showCodeInputBox();
 	Common::String showComputerInputBox();
diff --git a/engines/startrek/textbox.cpp b/engines/startrek/textbox.cpp
index 775864933e..a6f53f6a53 100644
--- a/engines/startrek/textbox.cpp
+++ b/engines/startrek/textbox.cpp
@@ -137,7 +137,7 @@ void StarTrekEngine::drawTextLineToBitmap(const char *text, int textLen, int x,
 	}
 }
 
-String StarTrekEngine::centerTextboxHeader(String headerText) {
+Common::String StarTrekEngine::centerTextboxHeader(Common::String headerText) {
 	char text[TEXT_CHARS_PER_LINE + 1];
 	memset(text, ' ', sizeof(text));
 	text[TEXT_CHARS_PER_LINE] = '\0';
@@ -150,16 +150,16 @@ String StarTrekEngine::centerTextboxHeader(String headerText) {
 	return Common::String(text);
 }
 
-void StarTrekEngine::getTextboxHeader(String *headerTextOutput, String speakerText, int choiceIndex) {
-	String header = speakerText;
+void StarTrekEngine::getTextboxHeader(Common::String *headerTextOutput, Common::String speakerText, int choiceIndex) {
+	Common::String header = speakerText;
 
 	if (choiceIndex != 0)
-		header += String::format(" choice %d", choiceIndex);
+		header += Common::String::format(" choice %d", choiceIndex);
 
 	*headerTextOutput = centerTextboxHeader(header);
 }
 
-String StarTrekEngine::readTextFromRdf(int choiceIndex, uintptr data, String *headerTextOutput) {
+Common::String StarTrekEngine::readTextFromRdf(int choiceIndex, uintptr data, Common::String *headerTextOutput) {
 	Room *room = getRoom();
 
 	int rdfVar = (size_t)data;
@@ -185,7 +185,7 @@ String StarTrekEngine::readTextFromRdf(int choiceIndex, uintptr data, String *he
 	return (char *)&room->_rdfData[textOffset];
 }
 
-void StarTrekEngine::showTextbox(String headerText, const String &mainText, int xoffset, int yoffset, byte textColor, int maxTextLines) {
+void StarTrekEngine::showTextbox(Common::String headerText, const Common::String &mainText, int xoffset, int yoffset, byte textColor, int maxTextLines) {
 	if (!headerText.empty())
 		headerText = centerTextboxHeader(headerText);
 
@@ -209,7 +209,7 @@ void StarTrekEngine::showTextbox(String headerText, const String &mainText, int
 		addAction(ACTION_TALK, actionParam, 0, 0);
 }
 
-String StarTrekEngine::skipTextAudioPrompt(const String &str) {
+Common::String StarTrekEngine::skipTextAudioPrompt(const Common::String &str) {
 	const char *text = str.c_str();
 
 	if (*text != '#')
@@ -222,10 +222,10 @@ String StarTrekEngine::skipTextAudioPrompt(const String &str) {
 		text++;
 	}
 
-	return String(text + 1);
+	return Common::String(text + 1);
 }
 
-String StarTrekEngine::playTextAudio(const String &str) {
+Common::String StarTrekEngine::playTextAudio(const Common::String &str) {
 	const char *text = str.c_str();
 	Common::String soundFile;
 
@@ -242,7 +242,7 @@ String StarTrekEngine::playTextAudio(const String &str) {
 
 	_sound->playSpeech(soundFile);
 
-	return String(text + 1);
+	return Common::String(text + 1);
 }
 
 int StarTrekEngine::showText(TextGetterFunc textGetter, uintptr var, int xoffset, int yoffset, int textColor, bool loopChoices, int maxTextLines, bool rclickCancelsChoice) {
@@ -256,10 +256,10 @@ int StarTrekEngine::showText(TextGetterFunc textGetter, uintptr var, int xoffset
 	int numChoicesWithNames = 0;
 	int numTextboxLines = 0;
 	int numChoices = 0;
-	String speakerText;
+	Common::String speakerText;
 
 	while (true) {
-		String choiceText = (this->*textGetter)(numChoices, var, &speakerText);
+		Common::String choiceText = (this->*textGetter)(numChoices, var, &speakerText);
 		if (choiceText.empty())
 			break;
 
@@ -299,7 +299,7 @@ int StarTrekEngine::showText(TextGetterFunc textGetter, uintptr var, int xoffset
 		_textboxVar6 = false;
 
 	int numTextLines;
-	String lineFormattedText = readLineFormattedText(textGetter, var, choiceIndex, textBitmap, numTextboxLines, &numTextLines);
+	Common::String lineFormattedText = readLineFormattedText(textGetter, var, choiceIndex, textBitmap, numTextboxLines, &numTextLines);
 
 	if (lineFormattedText.empty()) { // Technically should check for nullptr
 		_gfx->delSprite(&textboxSprite);
@@ -486,7 +486,7 @@ int StarTrekEngine::showText(TextGetterFunc textGetter, uintptr var, int xoffset
 	return choiceIndex;
 }
 
-int StarTrekEngine::getNumTextboxLines(const String &str) {
+int StarTrekEngine::getNumTextboxLines(const Common::String &str) {
 	const char *text = str.c_str();
 	char line[TEXTBOX_WIDTH];
 
@@ -499,7 +499,7 @@ int StarTrekEngine::getNumTextboxLines(const String &str) {
 	return lines - 1;
 }
 
-String StarTrekEngine::putTextIntoLines(const String &_text) {
+Common::String StarTrekEngine::putTextIntoLines(const Common::String &_text) {
 	char line[TEXTBOX_WIDTH];
 
 	const char *text = _text.c_str();
@@ -595,7 +595,7 @@ TextBitmap *StarTrekEngine::initTextSprite(int *xoffsetPtr, int *yoffsetPtr, byt
 	return bitmap;
 }
 
-void StarTrekEngine::drawMainText(TextBitmap *bitmap, int numTextLines, int numTextboxLines, const String &_text, bool withHeader) {
+void StarTrekEngine::drawMainText(TextBitmap *bitmap, int numTextLines, int numTextboxLines, const Common::String &_text, bool withHeader) {
 	byte *dest = bitmap->pixels + TEXTBOX_WIDTH + 1; // Start of 2nd row
 	const char *text = _text.c_str();
 
@@ -621,9 +621,9 @@ void StarTrekEngine::drawMainText(TextBitmap *bitmap, int numTextLines, int numT
 	}
 }
 
-String StarTrekEngine::readLineFormattedText(TextGetterFunc textGetter, uintptr var, int choiceIndex, TextBitmap *textBitmap, int numTextboxLines, int *numTextLines) {
-	String headerText;
-	String text = (this->*textGetter)(choiceIndex, var, &headerText);
+Common::String StarTrekEngine::readLineFormattedText(TextGetterFunc textGetter, uintptr var, int choiceIndex, TextBitmap *textBitmap, int numTextboxLines, int *numTextLines) {
+	Common::String headerText;
+	Common::String text = (this->*textGetter)(choiceIndex, var, &headerText);
 
 	if (_textDisplayMode == TEXTDISPLAY_NONE && _sfxEnabled && _sfxWorking) {
 		uint32 oldSize = text.size();
@@ -652,7 +652,7 @@ String StarTrekEngine::readLineFormattedText(TextGetterFunc textGetter, uintptr
 		return NULL;
 }
 
-String StarTrekEngine::readTextFromArray(int choiceIndex, uintptr data, String *headerTextOutput) {
+Common::String StarTrekEngine::readTextFromArray(int choiceIndex, uintptr data, Common::String *headerTextOutput) {
 	const char **textArray = (const char **)data;
 
 	const char *headerText = textArray[0];
@@ -665,10 +665,10 @@ String StarTrekEngine::readTextFromArray(int choiceIndex, uintptr data, String *
 		*headerTextOutput = "";
 	else
 		*headerTextOutput = centerTextboxHeader(headerText);
-	return String(mainText);
+	return Common::String(mainText);
 }
 
-String StarTrekEngine::readTextFromArrayWithChoices(int choiceIndex, uintptr data, String *headerTextOutput) {
+Common::String StarTrekEngine::readTextFromArrayWithChoices(int choiceIndex, uintptr data, Common::String *headerTextOutput) {
 	const char **textArray = (const char **)data;
 
 	const char *headerText = textArray[0];
@@ -687,10 +687,10 @@ String StarTrekEngine::readTextFromArrayWithChoices(int choiceIndex, uintptr dat
 				getTextboxHeader(headerTextOutput, headerText, 0);
 		}
 	}
-	return String(mainText);
+	return Common::String(mainText);
 }
 
-Common::String StarTrekEngine::readTextFromFoundComputerTopics(int choiceIndex, uintptr data, String *headerTextOutput) {
+Common::String StarTrekEngine::readTextFromFoundComputerTopics(int choiceIndex, uintptr data, Common::String *headerTextOutput) {
 	if (choiceIndex >= 10)
 		return Common::String();
 




More information about the Scummvm-git-logs mailing list