SCI: Implement the GetConfig call for LSL7

svn-id: r54369
This commit is contained in:
Lars Skovlund 2010-11-19 12:46:36 +00:00
parent 9e5b554dc3
commit fbf5a453c7
3 changed files with 10 additions and 0 deletions

View File

@ -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 kWinDLL(EngineState *s, int argc, reg_t *argv);
reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv);
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv);
#endif
reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);

View File

@ -542,6 +542,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(GetWindowsOption), SIG_EVERYWHERE, "i", NULL, NULL },
{ MAP_CALL(WinHelp), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL },
// Commented out because it needs to be implemented in full generality in Shivers/Full.
// Since it is not essential to game play, removing it also works.
//

View File

@ -329,6 +329,14 @@ reg_t kIconBar(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) {
Common::String setting = s->_segMan->getString(argv[0]);
reg_t data = readSelector(s->_segMan, argv[1], SELECTOR(data));
warning("Get config setting %s", setting.c_str());
s->_segMan->strcpy(data, "");
return argv[1];
}
enum kSciPlatforms {
kSciPlatformDOS = 1,
kSciPlatformWindows = 2