aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-08 12:28:47 +0000
committerFilippos Karapetis2011-01-08 12:28:47 +0000
commit12b44f2fc01b05c1fe1d34be8bc2556543967bca (patch)
tree6bdc8a1a2828d86cf5c19b52c17e1f14d7928ed2 /engines/sci/engine
parentc2acabd710ec48ca0eb5bf3d6cc0cd7791edece0 (diff)
downloadscummvm-rg350-12b44f2fc01b05c1fe1d34be8bc2556543967bca.tar.gz
scummvm-rg350-12b44f2fc01b05c1fe1d34be8bc2556543967bca.tar.bz2
scummvm-rg350-12b44f2fc01b05c1fe1d34be8bc2556543967bca.zip
SCI2.1: Some stubs used by SQ6
- Added a stub and some info about the (large) kScrollWindow kernel call - Added info about kMovePlaneItems svn-id: r55163
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h5
-rw-r--r--engines/sci/engine/kgraphics.cpp104
3 files changed, 107 insertions, 3 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 8510e68bc2..81ea1b143f 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -471,6 +471,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);
+reg_t kScrollWindow(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 d22c7349d5..558b94dc66 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -546,6 +546,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL },
{ MAP_CALL(CelInfo), SIG_EVERYWHERE, "iiiiii", NULL, NULL },
{ MAP_CALL(SetLanguage), SIG_EVERYWHERE, "r", NULL, NULL },
+ { MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// SCI2.1 Empty Functions
@@ -586,13 +587,11 @@ static SciKernelMapEntry s_kernelMap[] = {
// SCI2.1 unmapped functions - TODO!
// Bitmap
- // MovePlaneItems - used by SQ6
+ // MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons
// Font
- // ScrollWindow - used by Phantasmagoria 1 and SQ6
// AddLine - used by Torin's Passage to highlight the chapter buttons
// DeleteLine - used by Torin's Passage to delete the highlight from the chapter buttons
// UpdateLine = used by LSL6
- // GetConfig - used by Phantasmagoria 1
// SetPalStyleRange
// NewRoom
// MorphOn - used by SQ6
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 88596bb2f3..85be6798e2 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1517,6 +1517,110 @@ reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
+ // Used by Phantasmagoria 1 and SQ6. In SQ6, it is used for the messages
+ // shown in the scroll window at the bottom of the screen.
+
+ // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now
+ kStub(s, argc, argv);
+
+ switch (argv[0].toUint16()) {
+ case 0: // Init
+ // 2 parameters
+ // argv[1] points to the scroll object (e.g. textScroller in SQ6)
+ // argv[2] is an integer (e.g. 0x32)
+ break;
+ case 1: // Show message
+ // 5 or 6 parameters
+ // Seems to be called with 5 parameters when the narrator speaks, and
+ // with 6 when Roger speaks
+ // argv[1] unknown (usually 0)
+ // argv[2] the text to show
+ // argv[3] a small integer (e.g. 0x32)
+ // argv[4] a small integer (e.g. 0x54)
+ // argv[5] optional, unknown (usually 0)
+ warning("kScrollWindow: '%s'", s->_segMan->getString(argv[2]).c_str());
+ break;
+ case 2: // Clear
+ // 2 parameters
+ // TODO
+ break;
+ case 3: // Page up
+ // 2 parameters
+ // TODO
+ break;
+ case 4: // Page down
+ // 2 parameters
+ // TODO
+ break;
+ case 5: // Up arrow
+ // 2 parameters
+ // TODO
+ break;
+ case 6: // Down arrow
+ // 2 parameters
+ // TODO
+ break;
+ case 7: // Home
+ // 2 parameters
+ // TODO
+ break;
+ case 8: // End
+ // 2 parameters
+ // TODO
+ break;
+ case 9: // Resize
+ // 3 parameters
+ // TODO
+ break;
+ case 10: // Where
+ // 3 parameters
+ // TODO
+ break;
+ case 11: // Go
+ // 4 parameters
+ // TODO
+ break;
+ case 12: // Insert
+ // 7 parameters
+ // TODO
+ break;
+ case 13: // Delete
+ // 3 parameters
+ // TODO
+ break;
+ case 14: // Modify
+ // 7 or 8 parameters
+ // TODO
+ break;
+ case 15: // Hide
+ // 2 parameters
+ // TODO
+ break;
+ case 16: // Show
+ // 2 parameters
+ // TODO
+ break;
+ case 17: // Destroy
+ // 2 parameters
+ // TODO
+ break;
+ case 18: // Text
+ // 2 parameters
+ // TODO
+ break;
+ case 19: // Reconstruct
+ // 3 parameters
+ // TODO
+ break;
+ default:
+ error("kScrollWindow: unknown subop %d", argv[0].toUint16());
+ break;
+ }
+
+ return s->r_acc;
+}
+
#endif
} // End of namespace Sci