[Scummvm-cvs-logs] SF.net SVN: scummvm:[55161] scummvm/trunk/engines/sci/engine

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Jan 8 12:19:21 CET 2011


Revision: 55161
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55161&view=rev
Author:   thebluegr
Date:     2011-01-08 11:19:20 +0000 (Sat, 08 Jan 2011)

Log Message:
-----------
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)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.h
    scummvm/trunk/engines/sci/engine/kernel_tables.h
    scummvm/trunk/engines/sci/engine/ksound.cpp

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2011-01-08 10:34:04 UTC (rev 55160)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2011-01-08 11:19:20 UTC (rev 55161)
@@ -470,6 +470,7 @@
 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);

Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h	2011-01-08 10:34:04 UTC (rev 55160)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h	2011-01-08 11:19:20 UTC (rev 55161)
@@ -545,6 +545,7 @@
 	{ 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 @@
 
 	// 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 @@
 	// NewRoom
 	// MorphOn - used by SQ6
 	// SetHotRectangles - used by Phantasmagoria 1
-	// GetSierraProfileInt - used by Phantasmagoria 1
 #endif
 
 	{ NULL, NULL,                  SIG_EVERYWHERE,           NULL,                    NULL,            NULL }

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2011-01-08 10:34:04 UTC (rev 55160)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2011-01-08 11:19:20 UTC (rev 55161)
@@ -277,4 +277,21 @@
 	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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list