[Scummvm-git-logs] scummvm master -> dd93fe858c474510c6094e12a5ea219b6692f5b8

alxpnv a04198622 at gmail.com
Wed Oct 20 13:03:07 UTC 2021


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:
40f6daac76 ASYLUM: fix crash in demo version
dd93fe858c ASYLUM: fix playing library voices in demo version


Commit: 40f6daac766bd9d41356d8edc2b4b334468765be
    https://github.com/scummvm/scummvm/commit/40f6daac766bd9d41356d8edc2b4b334468765be
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-20T16:05:36+03:00

Commit Message:
ASYLUM: fix crash in demo version

Changed paths:
    engines/asylum/resources/special.cpp


diff --git a/engines/asylum/resources/special.cpp b/engines/asylum/resources/special.cpp
index 13feaf8a3a..af1608b8b1 100644
--- a/engines/asylum/resources/special.cpp
+++ b/engines/asylum/resources/special.cpp
@@ -1248,6 +1248,9 @@ void Special::playChapterSound(Object *object, ActorIndex actorIndex) {
 }
 
 void Special::playSoundChapter1(Object *object, ActorIndex actorIndex) {
+	if (_vm->checkGameVersion("Demo"))
+		return;
+
 	if (actorIndex == kActorInvalid) {
 		switch(object->getId()) {
 		default:


Commit: dd93fe858c474510c6094e12a5ea219b6692f5b8
    https://github.com/scummvm/scummvm/commit/dd93fe858c474510c6094e12a5ea219b6692f5b8
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-20T16:05:36+03:00

Commit Message:
ASYLUM: fix playing library voices in demo version

Changed paths:
    engines/asylum/system/speech.cpp


diff --git a/engines/asylum/system/speech.cpp b/engines/asylum/system/speech.cpp
index 2ec9ff8c07..f106c69411 100644
--- a/engines/asylum/system/speech.cpp
+++ b/engines/asylum/system/speech.cpp
@@ -56,10 +56,20 @@ ResourceId Speech::play(ResourceId soundResourceId, ResourceId textResourceId) {
 ResourceId Speech::playIndexed(int32 index) {
 	int processedIndex;
 
-	if (getWorld()->actorType || index != -1) {
+	if (_vm->checkGameVersion("Demo")) {
+		switch (index) {
+		default:
+		case 1:
+			processedIndex = 43 + _vm->getRandom(5);
+			break;
+		case 3:
+			processedIndex = 58 + _vm->getRandom(5);
+			break;
+		}
+	} else if (getWorld()->actorType || index != -1) {
 		processedIndex = (int)speechIndex[index + 5 * getWorld()->actorType] + (int)rnd(speechIndexRandom[index + 5 * getWorld()->actorType]);
 	} else {
-		switch(_vm->getRandom(3)) {
+		switch (_vm->getRandom(3)) {
 		default:
 		case 0:
 			processedIndex = 23;
@@ -87,7 +97,10 @@ ResourceId Speech::playIndexed(int32 index) {
 		break;
 
 	case kActorMax:
-		return play(MAKE_RESOURCE(kResourcePackSpeech, processedIndex), MAKE_RESOURCE(kResourcePackText, processedIndex + 83));
+		if (_vm->checkGameVersion("Demo"))
+			return play(MAKE_RESOURCE(kResourcePackSharedSound, processedIndex), MAKE_RESOURCE(kResourcePackText, processedIndex - 1));
+		else
+			return play(MAKE_RESOURCE(kResourcePackSpeech, processedIndex), MAKE_RESOURCE(kResourcePackText, processedIndex + 83));
 
 	case kActorSarah:
 		return play(MAKE_RESOURCE(kResourcePackSharedSound, processedIndex + 1927), MAKE_RESOURCE(kResourcePackText, processedIndex + 586));




More information about the Scummvm-git-logs mailing list