aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/ksound.cpp10
-rw-r--r--engines/sci/resource.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index adb7d60c14..584e58c0be 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -143,8 +143,14 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) {
// In SCI1.1: tests for digital audio support
if (getSciVersion() == SCI_VERSION_1_1)
return make_reg(0, 1);
- else
- s->resMan->setAudioLanguage(argv[1].toSint16());
+ else {
+ int16 language = argv[1].toSint16();
+
+ if (language != -1)
+ s->resMan->setAudioLanguage(language);
+
+ return make_reg(0, s->resMan->getAudioLanguage());
+ }
break;
case kSciAudioCD:
return kDoCdAudio(s, argc - 1, argv + 1);
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 661b954256..2b6519a950 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -270,6 +270,7 @@ public:
Common::List<ResourceId> *listResources(ResourceType type, int mapNumber = -1);
void setAudioLanguage(int language);
+ int getAudioLanguage() const { return (_audioMapSCI1 ? _audioMapSCI1->volume_number : 0); }
bool isVGA() const { return (_viewType == kViewVga) || (_viewType == kViewVga11); }
bool isAmiga32color() const { return _viewType == kViewAmiga; }
ViewType getViewType() const { return _viewType; }