aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-08 11:19:20 +0000
committerFilippos Karapetis2011-01-08 11:19:20 +0000
commitc2acabd710ec48ca0eb5bf3d6cc0cd7791edece0 (patch)
tree61fe9b046cfc0cfe4818af77f7f65c6296760909 /engines
parentdd026268aa78a481cf80165d2d28de094d0d0e34 (diff)
downloadscummvm-rg350-c2acabd710ec48ca0eb5bf3d6cc0cd7791edece0.tar.gz
scummvm-rg350-c2acabd710ec48ca0eb5bf3d6cc0cd7791edece0.tar.bz2
scummvm-rg350-c2acabd710ec48ca0eb5bf3d6cc0cd7791edece0.zip
SCI2.1: Some functionality for Phantasmagoria 1 and MUMG Deluxe
- Added a stub for kSetLanguage, used in MUMG Deluxe - this needs support at the resource manager level - Made kGetSierraProfileInt a stub function (it's used in the Windows version of Phantasmagoria 1 to override the video speed setting obtained from kGetConfig) svn-id: r55161
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h39
-rw-r--r--engines/sci/engine/ksound.cpp17
3 files changed, 40 insertions, 17 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 2006585c41..8510e68bc2 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -470,6 +470,7 @@ reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv);
reg_t kWinHelp(EngineState *s, int argc, reg_t *argv);
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv);
reg_t kCelInfo(EngineState *s, int argc, reg_t *argv);
+reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv);
#endif
reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 97a376afa0..d22c7349d5 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -545,6 +545,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(WinHelp), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL },
{ MAP_CALL(CelInfo), SIG_EVERYWHERE, "iiiiii", NULL, NULL },
+ { MAP_CALL(SetLanguage), SIG_EVERYWHERE, "r", NULL, NULL },
// SCI2.1 Empty Functions
@@ -556,29 +557,34 @@ static SciKernelMapEntry s_kernelMap[] = {
// SetWindowsOption is used to set Windows specific options, like for example the title bar visibility of
// the game window in Phantasmagoria 2. We ignore these settings completely.
- { MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL },
+ { MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL },
+
+ // Used by the Windows version of Phantasmagoria 1 to get the video speed setting. This is called after
+ // kGetConfig and overrides the setting obtained by it. It is a dummy function in the DOS Version. We can
+ // just use GetConfig and mark this one as empty, like the DOS version does.
+ { MAP_EMPTY(GetSierraProfileInt), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// Unused / debug SCI2.1 unused functions, always mapped to kDummy
+
// The debug functions are called from the inbuilt debugger or polygon
// editor in SCI2.1 games. Related objects are: PEditor, EditablePolygon,
// aeDisplayClass and scalerCode
- { MAP_DUMMY(FindSelector), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(FindClass), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(CelRect), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(BaseLineSpan), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(CelLink), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(AddPolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(DeletePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(UpdatePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(Table), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(LoadChunk), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(Priority), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(DeletePic), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(FindSelector), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(FindClass), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(CelRect), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(BaseLineSpan), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(CelLink), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(AddPolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(DeletePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(UpdatePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(Table), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(LoadChunk), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(Priority), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(DeletePic), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// SCI2.1 unmapped functions - TODO!
- // SetLanguage - used by MUMG Deluxe from the main menu to switch languages
// Bitmap
// MovePlaneItems - used by SQ6
// Font
@@ -591,7 +597,6 @@ static SciKernelMapEntry s_kernelMap[] = {
// NewRoom
// MorphOn - used by SQ6
// SetHotRectangles - used by Phantasmagoria 1
- // GetSierraProfileInt - used by Phantasmagoria 1
#endif
{ NULL, NULL, SIG_EVERYWHERE, NULL, NULL, NULL }
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 32fe89a487..f6ec60acb6 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -277,4 +277,21 @@ reg_t kDoSync(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+#ifdef ENABLE_SCI32
+
+reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv) {
+ // This is used by script 90 of MUMG Deluxe from the main menu to toggle
+ // the audio language between English and Spanish.
+ // Basically, it instructs the interpreter to switch the audio resources
+ // (resource.aud and associated map files) and load them from the "Spanish"
+ // subdirectory instead. Therefore, this is only needed for the Spanish
+ // version, and it needs support at the resource manager level.
+ Common::String languageFolder = s->_segMan->getString(argv[0]);
+ warning("SetLanguage: set audio resource folder to '%s'", languageFolder.c_str());
+
+ return s->r_acc;
+}
+
+#endif
+
} // End of namespace Sci