[Scummvm-git-logs] scummvm master -> 1476bf1faedb38ca84b7b6ad4f8db9748ff9c6c9

phcoder phcoder at gmail.com
Mon Dec 21 13:31:25 UTC 2020


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

Summary:
1476bf1fae HADESCH: Remove the need for global constructors


Commit: 1476bf1faedb38ca84b7b6ad4f8db9748ff9c6c9
    https://github.com/scummvm/scummvm/commit/1476bf1faedb38ca84b7b6ad4f8db9748ff9c6c9
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-12-21T14:30:43+01:00

Commit Message:
HADESCH: Remove the need for global constructors

Changed paths:
    engines/hadesch/ambient.cpp
    engines/hadesch/configure.engine
    engines/hadesch/rooms/argo.cpp
    engines/hadesch/rooms/athena.cpp
    engines/hadesch/rooms/catacombs.cpp
    engines/hadesch/rooms/crete.cpp
    engines/hadesch/rooms/daedalus.cpp
    engines/hadesch/rooms/ferry.cpp
    engines/hadesch/rooms/medisle.cpp
    engines/hadesch/rooms/monster.cpp
    engines/hadesch/rooms/monster/illusion.cpp
    engines/hadesch/rooms/quiz.cpp
    engines/hadesch/rooms/troy.cpp
    engines/hadesch/video.h


diff --git a/engines/hadesch/ambient.cpp b/engines/hadesch/ambient.cpp
index c5bb1060ad..d34891081a 100644
--- a/engines/hadesch/ambient.cpp
+++ b/engines/hadesch/ambient.cpp
@@ -335,11 +335,11 @@ void AnimClickables::playChosen(const Common::String &name, int counter, const E
 					      _table.get(name, "smackerY", counter).asUint64()));
 	else if (anim != "")
 		room->playAnimWithSpeech(
-			anim, TranscribedSound(sound.c_str(), _transcriptions[sound].c_str()), zValue, PlayAnimParams::disappear(), event,
+			anim, TranscribedSound::make(sound.c_str(), _transcriptions[sound].c_str()), zValue, PlayAnimParams::disappear(), event,
 			Common::Point(_table.get(name, "X", counter).asUint64(),
 				      _table.get(name, "Y", counter).asUint64()));
 	else if (sound != "")
-		room->playSpeech(TranscribedSound(sound.c_str(), _transcriptions[sound].c_str()), event);
+		room->playSpeech(TranscribedSound::make(sound.c_str(), _transcriptions[sound].c_str()), event);
 	else
 		event();
 }
diff --git a/engines/hadesch/configure.engine b/engines/hadesch/configure.engine
index def26932db..dad132c7e4 100644
--- a/engines/hadesch/configure.engine
+++ b/engines/hadesch/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine hadesch "Hades Challenge" no "" "" "highres cxx11"
+add_engine hadesch "Hades Challenge" no "" "" "highres"
diff --git a/engines/hadesch/rooms/argo.cpp b/engines/hadesch/rooms/argo.cpp
index 81fb452c72..b6d0ac5784 100644
--- a/engines/hadesch/rooms/argo.cpp
+++ b/engines/hadesch/rooms/argo.cpp
@@ -95,41 +95,41 @@ getOutroName(RoomId dest) {
 	switch (dest) {
 	case kWallOfFameRoom:
 		if (!persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("philsfirst", "That'd be where the grand heroes and heroines of the world go to train");
+			return TranscribedSound::make("philsfirst", "That'd be where the grand heroes and heroines of the world go to train");
 		break;
 	case kSeriphosRoom:
 		if ((quest == kTroyQuest || quest == kCreteQuest) && !persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("seriphoscretetroy", "This place be ruled by the evil tyrant king Polydectes");
+			return TranscribedSound::make("seriphoscretetroy", "This place be ruled by the evil tyrant king Polydectes");
 		if (quest == kMedusaQuest && !persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("seriphosperseus", "Arr, Perseus be in trouble deep. Could use a hand");
+			return TranscribedSound::make("seriphosperseus", "Arr, Perseus be in trouble deep. Could use a hand");
 		break;
 	case kMedIsleRoom:
 		if (quest == kMedusaQuest && !persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("medusabeware", "Beware of Medusa. She be one scary looking lady. All her mirrors be made of shatter-proof glass");
+			return TranscribedSound::make("medusabeware", "Beware of Medusa. She be one scary looking lady. All her mirrors be made of shatter-proof glass");
 		break;
 	case kTroyRoom:
 		if (!persistent->isRoomVisited(kTroyRoom))
-			return TranscribedSound("troytenyears", "For ten years now trojan and greek soldiers have been fighting that trojan war. Talk about job security");
+			return TranscribedSound::make("troytenyears", "For ten years now trojan and greek soldiers have been fighting that trojan war. Talk about job security");
 		if (quest == kTroyQuest && !persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("troyregards", "Send me regards to Odysseus");
+			return TranscribedSound::make("troyregards", "Send me regards to Odysseus");
 		if (quest > kTroyQuest && !persistent->_argoSaidTroyFinally) {
 			persistent->_argoSaidTroyFinally = true;
-			return TranscribedSound("troyfinally", "Finally, the trojan war be over and Helen be back with Menelaus. Now those two can fight without an interruption");
+			return TranscribedSound::make("troyfinally", "Finally, the trojan war be over and Helen be back with Menelaus. Now those two can fight without an interruption");
 		}
 		break;
 	case kCreteRoom:
 		if (!persistent->isRoomVisited(kCreteRoom))
-			return TranscribedSound("cretedaedalus", "This be where Daedalus, the inventor, lives");
+			return TranscribedSound::make("cretedaedalus", "This be where Daedalus, the inventor, lives");
 
 		if (quest != kCreteQuest && !persistent->_argoSaidCretePort)
-			return TranscribedSound("creteport", "Crete, the famous international port of trade");
+			return TranscribedSound::make("creteport", "Crete, the famous international port of trade");
 		break;
 	case kVolcanoRoom:
 		if (!persistent->isRoomVisited(kVolcanoRoom))
-			return TranscribedSound("volcanotopfirst", "Know this: should you go down there, you may not come back");
+			return TranscribedSound::make("volcanotopfirst", "Know this: should you go down there, you may not come back");
 
 		if (quest == kRescuePhilQuest && !!persistent->_argoSailedInQuest[dest][quest])
-			return TranscribedSound("volcanotopyoufirst", "Hah, many are monsters down there. Very dangerous. You go first");
+			return TranscribedSound::make("volcanotopyoufirst", "Hah, many are monsters down there. Very dangerous. You go first");
 		break;
 
 	default:
@@ -161,7 +161,7 @@ public:
 			room->disableMouse();
 			room->stopAnim("idlesound");
 			if (_destination == _prevId) {
-				playMastSound(TranscribedSound(
+				playMastSound(TranscribedSound::make(
 						  "currentlocation",
 						  "Here be your current location, matie."),
 					      kOutroFinished);
@@ -186,10 +186,10 @@ public:
 		Common::SharedPtr<VideoRoom> room = g_vm->getVideoRoom();
 		switch (eventId) {
 		case kPlayIntro2:
-			playMastSound(TranscribedSound("intro2", "Navigate by clicking on the island you want to go to"), kPlayIntro3);
+			playMastSound(TranscribedSound::make("intro2", "Navigate by clicking on the island you want to go to"), kPlayIntro3);
 			break;
 		case kPlayIntro3:
-			playMastSound(TranscribedSound(
+			playMastSound(TranscribedSound::make(
 					      "intro3",
 					      "The map shall always show the location of the Argo in relation to the other islands in the region"),
 				      kReturnToIdleEvent);
@@ -210,7 +210,7 @@ public:
 			g_vm->addTimer(kIdleEvent, 30000);
 			if (_mastHeadIsBusy)
 				break;
-			playMastSound(TranscribedSound("idlesound", "And what course lies ahead for you, matie?"), kMastSoundFinished);
+			playMastSound(TranscribedSound::make("idlesound", "And what course lies ahead for you, matie?"), kMastSoundFinished);
 			room->selectFrame(kMastHeadAnim, kMastHeadZ, 1);
 			break;
 		case 27301:
@@ -304,7 +304,7 @@ public:
 		room->disableMouse();
 		// Originally event 4015
 		if (!persistent->isRoomVisited(kArgoRoom))
-			playMastSound(TranscribedSound(
+			playMastSound(TranscribedSound::make(
 					      "intro1",
 					      "Sharpen up now, matie. You'll be on the Argo now. It's a hero of ships. It used to belong to Jason and his crew, the argonauts. And now it'll be here for you"),
 				      kPlayIntro2);
diff --git a/engines/hadesch/rooms/athena.cpp b/engines/hadesch/rooms/athena.cpp
index dbd3ef847f..6539d9ac3c 100644
--- a/engines/hadesch/rooms/athena.cpp
+++ b/engines/hadesch/rooms/athena.cpp
@@ -143,7 +143,7 @@ public:
 			room->stopAnim("c8130bf0");
 			room->disableHotzone("Sword");
 			room->disableMouse();
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 					     "c8140wa0",
 					     "The magic sword will never leave Perseus' hand, "
 					     "so he can successfully cut off Medusa's head"),
@@ -157,7 +157,7 @@ public:
 			room->stopAnim("c8130be0");
 			room->disableHotzone("Shield");
 			room->disableMouse();
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 					     "c8150wa0",
 					     "Medusa can only turn Perseus to stone if he looks directly at her. "
 					     "He'll use this shield to block her gaze"),
@@ -243,18 +243,18 @@ public:
 			room->addStaticLayer("c8180pa0", 9000);
 			room->playSFX("g0261ma0", 23031);
 			room->playSpeech(persistent->_gender == kMale
-					? TranscribedSound(
+					? TranscribedSound::make(
 					    "c8180wa0",
 					    "Oh no. Why did I shine that light in Athena's temple. "
 					    "I was just trying to see what the hero was doing")
-					 : TranscribedSound(
+					 : TranscribedSound::make(
 					     "c8180wb0",
 					     "Oh no. Why did I shine that light in Athena's temple. "
 					     "I was just trying to see what the heroine was doing"),
 					 23029);
 			break;
 		case 23029:
-			room->playSpeech(TranscribedSound("c8180wc0", "Well now you can see what I'm doing: tomato heads"), 23030);
+			room->playSpeech(TranscribedSound::make("c8180wc0", "Well now you can see what I'm doing: tomato heads"), 23030);
 			break;
 		case 23030:
 			room->playVideo("c8180ba0", 0, 23032);
diff --git a/engines/hadesch/rooms/catacombs.cpp b/engines/hadesch/rooms/catacombs.cpp
index ec3484e80c..946ebabce7 100644
--- a/engines/hadesch/rooms/catacombs.cpp
+++ b/engines/hadesch/rooms/catacombs.cpp
@@ -212,7 +212,7 @@ public:
 			room->playSFX("SndGuardTrapDoorOpen", 22017);
 			break;
 		case 22017:
-			room->playSpeech(TranscribedSound("SndGuardLaugh", "[laughter]"), 22018);
+			room->playSpeech(TranscribedSound::make("SndGuardLaugh", "[laughter]"), 22018);
 			break;
 		case 22018:
 			room->playSpeech(
diff --git a/engines/hadesch/rooms/crete.cpp b/engines/hadesch/rooms/crete.cpp
index b120e92abc..788985ee1a 100644
--- a/engines/hadesch/rooms/crete.cpp
+++ b/engines/hadesch/rooms/crete.cpp
@@ -665,7 +665,7 @@ TODO:
 			persistent->_cretePlayedZeusCheckOutThatBox = true;
 			room->disableMouse();
 			room->playAnimWithSpeech("r2230ba0",
-						TranscribedSound("r2230wa0",
+						TranscribedSound::make("r2230wa0",
 								 "Hey, why don't you check out that box? Maybe it has something that can help"),
 						4000,
 						PlayAnimParams::keepLastFrame(),
@@ -747,7 +747,7 @@ TODO:
 		case 12403:
 			room->disableMouse();
 			room->playAnimWithSpeech("r2230ba0",
-						 TranscribedSound("r2230wb0", "I think those buttons control the symbols"),
+						 TranscribedSound::make("r2230wb0", "I think those buttons control the symbols"),
 						 4000,
 						 PlayAnimParams::keepLastFrame(), 12404,
 						 kOffsetRightRoom);
@@ -769,7 +769,7 @@ TODO:
 				break;
 			room->disableMouse();
 			room->playAnimWithSpeech("r2230ba0",
-						 TranscribedSound("r2230wc0", "Try to spell my name"),
+						 TranscribedSound::make("r2230wc0", "Try to spell my name"),
 						 4000,
 						 PlayAnimParams::keepLastFrame(), 12407,
 						 kOffsetRightRoom);
@@ -852,7 +852,7 @@ TODO:
 			room->selectFrame("r2035ba0", 1200, 0);
 
 			// Originally event 12123
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						      "r2035wa0",
 						      "Seems the only thing I can count on you two for is target practice"), 12124);
 			persistent->_creteHadesPusnishesPainAndPanic = false;
diff --git a/engines/hadesch/rooms/daedalus.cpp b/engines/hadesch/rooms/daedalus.cpp
index 0d1922b105..5593c386a2 100644
--- a/engines/hadesch/rooms/daedalus.cpp
+++ b/engines/hadesch/rooms/daedalus.cpp
@@ -282,8 +282,8 @@ public:
 				room->selectFrame(persistent->_gender == kMale ? "daedalus note text male"
 						  : "daedalus note text female", 799, 0);
 				room->playSpeech(persistent->_gender == kMale ?
-						 TranscribedSound("daedalus note vo male", "Dear hero, now that we've brought peace to the people of Crete, I've used the wings that I've built for myself and my son Icarus to escape. I'm forever grateful for your help. Your friend, Daedalus") :
-						 TranscribedSound("daedalus note vo female", "Dear heroine, now that we've brought peace to the people of Crete, I've used the wings that I've built for myself and my son Icarus to escape. I'm forever grateful for your help. Your friend, Daedalus. Au revoir. Salaam. Good bye."),
+						 TranscribedSound::make("daedalus note vo male", "Dear hero, now that we've brought peace to the people of Crete, I've used the wings that I've built for myself and my son Icarus to escape. I'm forever grateful for your help. Your friend, Daedalus") :
+						 TranscribedSound::make("daedalus note vo female", "Dear heroine, now that we've brought peace to the people of Crete, I've used the wings that I've built for myself and my son Icarus to escape. I'm forever grateful for your help. Your friend, Daedalus. Au revoir. Salaam. Good bye."),
 						 13004);
 			}
 		}
diff --git a/engines/hadesch/rooms/ferry.cpp b/engines/hadesch/rooms/ferry.cpp
index 90fc945316..bea4043ef0 100644
--- a/engines/hadesch/rooms/ferry.cpp
+++ b/engines/hadesch/rooms/ferry.cpp
@@ -607,21 +607,21 @@ public:
 			break;
 		}
 		case k24801_arg1:
-			playCharonSoundSMK(TranscribedSound("V9090NH0", "When you click on a shade you can see and I'll tell you what they think of one another"), k24801_arg2);
+			playCharonSoundSMK(TranscribedSound::make("V9090NH0", "When you click on a shade you can see and I'll tell you what they think of one another"), k24801_arg2);
 			_count24006 = 0;
 			g_vm->addTimer(24006, 1200);
 			break;
 		case k24801_arg2:
-			playCharonSoundSMK(TranscribedSound("V9090ND0", "If you click on a shade you can drag it into a seat"), k24801_arg3);
+			playCharonSoundSMK(TranscribedSound::make("V9090ND0", "If you click on a shade you can drag it into a seat"), k24801_arg3);
 			break;
 		case k24801_arg3:
-			playCharonSoundSMK(TranscribedSound("V9090NE0", "If they find a neighbour offensive, they'll return to the dark"), k24801_arg4);
+			playCharonSoundSMK(TranscribedSound::make("V9090NE0", "If they find a neighbour offensive, they'll return to the dark"), k24801_arg4);
 			break;
 		case k24801_arg4:
-			playCharonSoundSMK(TranscribedSound("V9090NI0", "To remove the shade from the boat click and drag it to the dark"), k24801_arg5);
+			playCharonSoundSMK(TranscribedSound::make("V9090NI0", "To remove the shade from the boat click and drag it to the dark"), k24801_arg5);
 			break;
 		case k24801_arg5:
-			playCharonSoundSMK(TranscribedSound("V9130NA0", "Do try and discover what is bothering each of them"), k24801_arg6);
+			playCharonSoundSMK(TranscribedSound::make("V9130NA0", "Do try and discover what is bothering each of them"), k24801_arg6);
 			break;
 		case k24801_arg6:
 			room->enableMouse();
@@ -668,7 +668,7 @@ public:
 		if (persistent->_quest == kRescuePhilQuest) {
 			room->disableMouse();
 			// originally 24800
-			playCharonSoundSMK(TranscribedSound("V9090NA0", "Oh, the dead are a tiresome lot. Charon can't bear to weed through their assorted woes. If you assist Charon by loading the shades onto the boat, Charon will squeeze you in for the ride across"), k24801_arg1);
+			playCharonSoundSMK(TranscribedSound::make("V9090NA0", "Oh, the dead are a tiresome lot. Charon can't bear to weed through their assorted woes. If you assist Charon by loading the shades onto the boat, Charon will squeeze you in for the ride across"), k24801_arg1);
 		}
 	}
 
@@ -770,7 +770,7 @@ private:
 			if (thoughtId >= 0)
 				playCharonSound(thoughts[thoughtId].sound);
 			else if (thoughtId == -1)
-				playCharonSound(TranscribedSound("V9150nA0", "He won't move from that seat"));
+				playCharonSound(TranscribedSound::make("V9150nA0", "He won't move from that seat"));
 		}
 		room->selectFrame("V9090oA0", 112, 0, bubblePos);
 		room->selectFrame(shadows[_shades[id].shadowId].nameImage, 111, 0, bubblePos);
diff --git a/engines/hadesch/rooms/medisle.cpp b/engines/hadesch/rooms/medisle.cpp
index 3fb54d5101..cfdaa9368a 100644
--- a/engines/hadesch/rooms/medisle.cpp
+++ b/engines/hadesch/rooms/medisle.cpp
@@ -359,25 +359,25 @@ public:
 
 				switch (quest) {
 				case kCreteQuest:
-					hints.push_back(TranscribedSound("m2220wa0", "The Minotaur's is where you need to be. Trapping him sets Daedalus free."));
-					hints.push_back(TranscribedSound("m2220wb0", "King Minos is the king of Crete. He's not the nicest man you meet."));
-					hints.push_back(TranscribedSound("m2220wc0", "The Minotaur is hard to beat. The one who's trying lives in Crete"));
+					hints.push_back(TranscribedSound::make("m2220wa0", "The Minotaur's is where you need to be. Trapping him sets Daedalus free."));
+					hints.push_back(TranscribedSound::make("m2220wb0", "King Minos is the king of Crete. He's not the nicest man you meet."));
+					hints.push_back(TranscribedSound::make("m2220wc0", "The Minotaur is hard to beat. The one who's trying lives in Crete"));
 					break;
 				case kTroyQuest:
-					hints.push_back(TranscribedSound("m2230wa0", "If Helen gets this note, our friend, the trojan war will quickly end."));
-					hints.push_back(TranscribedSound("m2230wb0", "Helen was a husband's joy but she's a prisonner inside Troy."));
-					hints.push_back(TranscribedSound("m2230wc0", "The trojan horse you cannot ride bust beware what's found inside"));
+					hints.push_back(TranscribedSound::make("m2230wa0", "If Helen gets this note, our friend, the trojan war will quickly end."));
+					hints.push_back(TranscribedSound::make("m2230wb0", "Helen was a husband's joy but she's a prisonner inside Troy."));
+					hints.push_back(TranscribedSound::make("m2230wc0", "The trojan horse you cannot ride bust beware what's found inside"));
 					break;
 				case kMedusaQuest:
 					if (persistent->_medisleShowFates) {
 						hints.push_back(kMedusaOnceBeauty);
-						hints.push_back(TranscribedSound("m2250wa0", "Medusa's curse is quite well known: she looks at you and you turn to stone"));
-						hints.push_back(TranscribedSound("m2250wb0", "So be forewarned, it isn't wise to gaze into Medusa's eyes."));
+						hints.push_back(TranscribedSound::make("m2250wa0", "Medusa's curse is quite well known: she looks at you and you turn to stone"));
+						hints.push_back(TranscribedSound::make("m2250wb0", "So be forewarned, it isn't wise to gaze into Medusa's eyes."));
 					}
 					break;
 				case kRescuePhilQuest:
-					hints.push_back(TranscribedSound("m2240wa0", "To rescue Phil's an easy fix: just go across the river Styx"));
-					hints.push_back(TranscribedSound("m2240wb0", "You know Phil, he loves the ladies. He'd be best beware of the evil ladies"));
+					hints.push_back(TranscribedSound::make("m2240wa0", "To rescue Phil's an easy fix: just go across the river Styx"));
+					hints.push_back(TranscribedSound::make("m2240wb0", "You know Phil, he loves the ladies. He'd be best beware of the evil ladies"));
 					break;
 				// To silence warning
 				case kNoQuest:
@@ -456,7 +456,7 @@ TODO (medusa quest):
 		if (name == "Perseus" && (
 			    item >= kShield && item <= kSandals)) {
 			room->disableMouse();
-			playPerseusAnimSpeech("m1240ba0", TranscribedSound("m1240na0", "No, you've got to put it in the frieze above me, hurry!"), 11053);
+			playPerseusAnimSpeech("m1240ba0", TranscribedSound::make("m1240na0", "No, you've got to put it in the frieze above me, hurry!"), 11053);
 		}
 
 		return false;
@@ -474,7 +474,7 @@ TODO (medusa quest):
 					Common::Point(640, 216));
 			break;
 		case 11003:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 							  "m2100wa0",
 							  "Someone help! I'm over here"),
 						  11004);
@@ -496,13 +496,13 @@ TODO (medusa quest):
 			}
 			break;
 		case 11601:
-			fatesShadowSpeech(TranscribedSound("m2120wa0", "Now it's time, the eyeball's mine"), 11602);
+			fatesShadowSpeech(TranscribedSound::make("m2120wa0", "Now it's time, the eyeball's mine"), 11602);
 			break;
 		case 11602:
-			fatesShadowSpeech(TranscribedSound("m2120wb0", "I can't see, so give it to me"), 11603);
+			fatesShadowSpeech(TranscribedSound::make("m2120wb0", "I can't see, so give it to me"), 11603);
 			break;
 		case 11603:
-			fatesShadowSpeech(TranscribedSound("m2120wc0", "You stupid lout. Let's go, look out"), 11604);
+			fatesShadowSpeech(TranscribedSound::make("m2120wc0", "You stupid lout. Let's go, look out"), 11604);
 			break;
 		case 11604:
 			fatesShadowSpeechEnd();
@@ -532,7 +532,7 @@ TODO (medusa quest):
 			break;
 		case 11005:
 			playPerseusAnimSpeech("m1140bb0",
-					      TranscribedSound(
+					      TranscribedSound::make(
 						      "m1140nb0",
 						      "This is what happens when you don't follow instructions. "
 						      "I should have listened to Athena's warning"),
@@ -544,13 +544,13 @@ TODO (medusa quest):
 			room->enableMouse();
 			break;
 		case 11007:
-			playPerseusAnimSpeech("m1140bc0", TranscribedSound(
+			playPerseusAnimSpeech("m1140bc0", TranscribedSound::make(
 						      "m1140nc0",
 						      "Without that stuff, I'm gonna wind up as part of Medusa's latest rock collection"),
 					      11008);
 			break;
 		case 11008:
-			playPerseusAnimSpeech("m1140bd0", TranscribedSound("m1140nd0", "You gotta help me"), 11006);
+			playPerseusAnimSpeech("m1140bd0", TranscribedSound::make("m1140nd0", "You gotta help me"), 11006);
 			break;
 		case 11009:
 			room->playSpeech(itemClickSounds[_lastClickedItem], 11010);
@@ -601,9 +601,9 @@ TODO (medusa quest):
 		case 11015:
 			renderPerseus();
 			if (_lastPlacedItem == kSword)
-				playPerseusAnimSpeech("m1180bc0", TranscribedSound("m1180nb0", "Thanks for the sword. Did you bring anything else?"), 11016);
+				playPerseusAnimSpeech("m1180bc0", TranscribedSound::make("m1180nb0", "Thanks for the sword. Did you bring anything else?"), 11016);
 			else
-				playPerseusAnimSpeech("m1190bc0", TranscribedSound("m1190nb0", "Thanks for the shield. Did you bring anything else?"), 11016);
+				playPerseusAnimSpeech("m1190bc0", TranscribedSound::make("m1190nb0", "Thanks for the shield. Did you bring anything else?"), 11016);
 			break;
 		case 11016:
 		case 11025:
@@ -613,7 +613,7 @@ TODO (medusa quest):
 			break;
 		case 11017:
 			renderPerseus();
-			playPerseusAnimSpeech("m1200ba0", TranscribedSound("m1200na0", "You're doing great but I still need three other weapons. The fates will know where they are. Go ask them. They're somewhere on the isle"), 11018);
+			playPerseusAnimSpeech("m1200ba0", TranscribedSound::make("m1200na0", "You're doing great but I still need three other weapons. The fates will know where they are. Go ask them. They're somewhere on the isle"), 11018);
 			break;
 		case 11018:
 			finishPerseusAnim();
@@ -647,12 +647,12 @@ TODO (medusa quest):
 			break;
 		case 11024:
 			renderPerseus();
-			playPerseusAnimSpeech("m1250bb0", TranscribedSound("m1250nb0", "What about the last item?"), 11025);
+			playPerseusAnimSpeech("m1250bb0", TranscribedSound::make("m1250nb0", "What about the last item?"), 11025);
 			break;
 		case 11020:
 			renderPerseus();
 			playPerseusAnimSpeech("m1250ba0",
-					      TranscribedSound("m1250na0", "What about the other items?"), 11025);
+					      TranscribedSound::make("m1250na0", "What about the other items?"), 11025);
 			break;
 		case 11027:
 			room->playVideo("m2130ba0", kFatesZ, 11609, Common::Point(756, 0));
@@ -818,7 +818,7 @@ TODO (medusa quest):
 			break;
 		case 11039:
 		case 11040:
-			playPerseusAnimSpeech("m1290ba0", TranscribedSound("m1290na0", "Hey, that's the magic bag. Put it in the frieze above me"), 11041);
+			playPerseusAnimSpeech("m1290ba0", TranscribedSound::make("m1290na0", "Hey, that's the magic bag. Put it in the frieze above me"), 11041);
 			break;
 		case 11041:
 			finishPerseusAnim();
diff --git a/engines/hadesch/rooms/monster.cpp b/engines/hadesch/rooms/monster.cpp
index c470f9c3cb..7702f620c9 100644
--- a/engines/hadesch/rooms/monster.cpp
+++ b/engines/hadesch/rooms/monster.cpp
@@ -39,8 +39,8 @@ static const int kLightningCutoff = kVideoWidth / 2;
 
 TranscribedSound revitalisedSound() {
 	return g_vm->getRnd().getRandomBit()
-		? TranscribedSound("v7150wd0", "Your branch of life is revitalized")
-		: TranscribedSound("v7150we0", "You're back to full strength");
+		? TranscribedSound::make("v7150wd0", "Your branch of life is revitalized")
+		: TranscribedSound::make("v7150we0", "You're back to full strength");
 }
 
 class MonsterHandler : public Handler {
@@ -96,7 +96,7 @@ public:
 				       15358);
 			break;
 		case 15355:
-			room->playSpeech(TranscribedSound("V7100WC0",
+			room->playSpeech(TranscribedSound::make("V7100WC0",
 							  "I'm giving you these thunderbolts to "
 							  "use against Hades' monsters."),
 					 15364);
@@ -108,8 +108,8 @@ public:
 			break;
 		case 15357:
 			room->playSpeech(g_vm->getRnd().getRandomBit()
-					 ? TranscribedSound("V7150WC0", "Get back in there. Here is another branch")
-					 : TranscribedSound("V7150WB0", "Here's another branch. Keep going"),
+					 ? TranscribedSound::make("V7150WC0", "Get back in there. Here is another branch")
+					 : TranscribedSound::make("V7150WB0", "Here's another branch. Keep going"),
 					 15353);
 			break;
 		case 15358:
@@ -129,7 +129,7 @@ public:
 			g_vm->addTimer(15391, 100);
 			break;
 		case 15364:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 					     "V7100WD0",
 					     "Ah, and this branch of life will let "
 					     "you to remain in the underworld until "
@@ -140,7 +140,7 @@ public:
 			g_vm->addTimer(524, 5000);
 			break;
 		case 15365:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7100WE0",
 						 "Use your thunderbolts and your hero powers "
 						 "to battle the monsters of the underworld"), 15366);
@@ -148,14 +148,14 @@ public:
 			introLightning();
 			break;
 		case 15366:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7100WF0",
 						 "Move your mouse to aim and click to fire your thunderbolts. "
 						 "And don't forget: you can now use your hero powers"),
 					 15367);
 			break;
 		case 15367:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7100WH0",
 						 "And remember to keep an eye on your branch. "
 						 "When the last leaf drops, you'll be "
@@ -163,7 +163,7 @@ public:
 					 15368);
 			break;
 		case 15368:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7100WI0",
 						 "This is the ultimate test but I know you can do it"),
 					 15369);
@@ -224,12 +224,12 @@ public:
 			// unclear
 			room->playSpeech(
 				persistent->_gender == kMale
-				? TranscribedSound(
+				? TranscribedSound::make(
 					"V7190WB0",
 					"One more word out of your goat-brain "
 					"and I'm gonna have your face for lambchops, alright? "
 					"This kid's gonna have to make it on his own, ok?")
-				: TranscribedSound(
+				: TranscribedSound::make(
 					"V7190WC0",
 					"One more word out of your goat-brain "
 					"and I'm gonna have your face for lambchops, ok? "
@@ -239,13 +239,13 @@ public:
 		case 15387:
 			room->playSpeech(
 				persistent->_gender == kMale
-				? TranscribedSound(
+				? TranscribedSound::make(
 					"V7210WB0",
 					"Oh, you want to be a hero? "
 					"Well you're gonna die a hero's death. "
 					"Typhoon's gonna chew you up in little "
 					"pieces and spit you out like a meatgrinder, kid")
-				: TranscribedSound(
+				: TranscribedSound::make(
 					"V7210WC0",
 					"Oh, you want to be a heroine? "
 					"Well you're gonna die a gruesome death. "
@@ -254,7 +254,7 @@ public:
 				15378);
 			break;
 		case 15388:
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7220WB1",
 						 "You dare to think you can outwit me? "
 						 "You, my little friend, will be ripped to shreads and slowly digested for eternity "
@@ -264,7 +264,7 @@ public:
 			break;
 		case 15389:
 			// unclear
-			room->playSpeech(TranscribedSound(
+			room->playSpeech(TranscribedSound::make(
 						 "V7180WB0",
 						 "Hey, there. Hi, there. Hoi, there. "
 						 "And welcome to my world. "
diff --git a/engines/hadesch/rooms/monster/illusion.cpp b/engines/hadesch/rooms/monster/illusion.cpp
index 4e5d8dd90b..6d52453498 100644
--- a/engines/hadesch/rooms/monster/illusion.cpp
+++ b/engines/hadesch/rooms/monster/illusion.cpp
@@ -316,7 +316,7 @@ void Illusion::enterIllusion(int level) {
 	for (unsigned i = 0; i < 6; i++)
 		room->enableHotzone(Common::String::format("Phil%d", i));
 	room->playAnimWithSpeech(Common::String::format("v7220bg%d", g_vm->getRnd().getRandomNumberRng(0, 5)),
-				 TranscribedSound("v7220xc1",
+				 TranscribedSound::make("v7220xc1",
 						  "It's me, Phil. These beasts are all that stands between me and freedom"), 600, // unclear
 				 PlayAnimParams::disappear(),
 				 15306);
@@ -360,10 +360,10 @@ void Illusion::handleEvent(int eventId) {
 		launchBird();
 		break;
 	case 15307:
-		room->playSpeech(TranscribedSound("v7220wg0", "Oh no, we're gonna fry"), 15308);
+		room->playSpeech(TranscribedSound::make("v7220wg0", "Oh no, we're gonna fry"), 15308);
 		break;
 	case 15308:
-		room->playSpeech(TranscribedSound("v7220wh0", "Let's get outta here"), 15309);
+		room->playSpeech(TranscribedSound::make("v7220wh0", "Let's get outta here"), 15309);
 		break;
 	case 15309:
 		g_vm->getCurrentHandler()->handleEvent(15383);
diff --git a/engines/hadesch/rooms/quiz.cpp b/engines/hadesch/rooms/quiz.cpp
index d12135044e..588d7ccf40 100644
--- a/engines/hadesch/rooms/quiz.cpp
+++ b/engines/hadesch/rooms/quiz.cpp
@@ -200,7 +200,7 @@ public:
 			break;
 
 		case kHadesFirstLaugh:
-			hadesAndZeus(TranscribedSound("ZeusNotFair", "Hold on, Hades. That's not fair. You've never explained the rules. That doesn't count"),
+			hadesAndZeus(TranscribedSound::make("ZeusNotFair", "Hold on, Hades. That's not fair. You've never explained the rules. That doesn't count"),
 				     kHadesInstructions);
 			_hadesIsFree = false;
 			break;
diff --git a/engines/hadesch/rooms/troy.cpp b/engines/hadesch/rooms/troy.cpp
index 1dc52ce61a..1254c2c9d2 100644
--- a/engines/hadesch/rooms/troy.cpp
+++ b/engines/hadesch/rooms/troy.cpp
@@ -475,7 +475,7 @@ public:
 			break;
 		case 10057:
 			room->playSpeech(
-				TranscribedSound("T2240wA0", "Official orders from king Priam: messenger is granted permissions to leave the city walls"), 10058);
+				TranscribedSound::make("T2240wA0", "Official orders from king Priam: messenger is granted permissions to leave the city walls"), 10058);
 			break;
 		case 10058:
 			room->enableMouse();
diff --git a/engines/hadesch/video.h b/engines/hadesch/video.h
index eb6b026f17..1337f31a01 100644
--- a/engines/hadesch/video.h
+++ b/engines/hadesch/video.h
@@ -148,14 +148,11 @@ struct TranscribedSound {
 	const char *soundName;
 	const char *transcript;
 
-	TranscribedSound(const char *s, const char *t) {
-		soundName = s;
-		transcript = t;
-	}
-
-	TranscribedSound() {
-		soundName = nullptr;
-		transcript = nullptr;
+	static TranscribedSound make(const char *s, const char *t) {
+		TranscribedSound res;
+		res.soundName = s;
+		res.transcript = t;
+		return res;
 	}
 };
 




More information about the Scummvm-git-logs mailing list