diff options
author | Filippos Karapetis | 2011-10-28 22:19:52 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-28 22:20:33 +0300 |
commit | 4ac2940bc59bbb192a5aa0636e590df4e71becad (patch) | |
tree | 41a91e207a712c9160a61849211d484bed5c750b /engines/sci/engine | |
parent | d8db7b11c14c03704c7b1a50bbaff72008eddf7a (diff) | |
download | scummvm-rg350-4ac2940bc59bbb192a5aa0636e590df4e71becad.tar.gz scummvm-rg350-4ac2940bc59bbb192a5aa0636e590df4e71becad.tar.bz2 scummvm-rg350-4ac2940bc59bbb192a5aa0636e590df4e71becad.zip |
SCI: Added skeleton code for kEditText (still not working)
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 8 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 15 |
3 files changed, 17 insertions, 7 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 8cb294e166..e549c1f8ae 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -457,6 +457,7 @@ reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv); reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv); reg_t kInPolygon(EngineState *s, int argc, reg_t *argv); reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv); +reg_t kEditText(EngineState *s, int argc, reg_t *argv); // SCI2.1 Kernel Functions reg_t kText(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index afe6b176e5..d8d9f6bd82 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -499,6 +499,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(UpdatePlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(ObjectIntersect), SIG_EVERYWHERE, "oo", NULL, NULL }, + { MAP_CALL(EditText), SIG_EVERYWHERE, "o", NULL, NULL }, // SCI2 unmapped functions - TODO! @@ -523,13 +524,6 @@ static SciKernelMapEntry s_kernelMap[] = { // TODO: Implement once the original save/load menus are implemented. { MAP_DUMMY(MakeSaveFileName), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - // Used for edit boxes in save/load dialogs. It's a rewritten version of kEditControl, - // but it handles events on its own, using an internal loop, instead of using SCI - // scripts for event management like kEditControl does. Called by script 64914, - // DEdit::hilite(). - // TODO: Implement once the original save/load menus are implemented. - { MAP_DUMMY(EditText), SIG_EVERYWHERE, "o", NULL, NULL }, - // Unused / debug SCI2 unused functions, always mapped to kDummy // AddMagnify/DeleteMagnify are both called by script 64979 (the Magnifier diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 566f2a9a7d..1483b99125 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -49,6 +49,7 @@ #include "sci/graphics/text16.h" #include "sci/graphics/view.h" #ifdef ENABLE_SCI32 +#include "sci/graphics/controls32.h" #include "sci/graphics/font.h" // TODO: remove once kBitmap is moved in a separate class #include "sci/graphics/text32.h" #include "sci/graphics/frameout.h" @@ -1798,6 +1799,20 @@ reg_t kBitmap(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +// Used for edit boxes in save/load dialogs. It's a rewritten version of kEditControl, +// but it handles events on its own, using an internal loop, instead of using SCI +// scripts for event management like kEditControl does. Called by script 64914, +// DEdit::hilite(). +reg_t kEditText(EngineState *s, int argc, reg_t *argv) { + reg_t controlObject = argv[0]; + + if (!controlObject.isNull()) { + g_sci->_gfxControls32->kernelTexteditChange(controlObject); + } + + return s->r_acc; +} + #endif } // End of namespace Sci |