mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
SCI: Added skeleton code for kEditText (still not working)
This commit is contained in:
parent
d8db7b11c1
commit
4ac2940bc5
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -78,6 +78,7 @@ MODULE_OBJS := \
|
||||
|
||||
ifdef ENABLE_SCI32
|
||||
MODULE_OBJS += \
|
||||
graphics/controls32.o \
|
||||
graphics/frameout.o \
|
||||
graphics/paint32.o \
|
||||
graphics/text32.o \
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "sci/graphics/cache.h"
|
||||
#include "sci/graphics/compare.h"
|
||||
#include "sci/graphics/controls16.h"
|
||||
#include "sci/graphics/controls32.h"
|
||||
#include "sci/graphics/coordadjuster.h"
|
||||
#include "sci/graphics/cursor.h"
|
||||
#include "sci/graphics/maciconbar.h"
|
||||
@ -147,6 +148,7 @@ SciEngine::~SciEngine() {
|
||||
DebugMan.clearAllDebugChannels();
|
||||
|
||||
#ifdef ENABLE_SCI32
|
||||
delete _gfxControls32;
|
||||
delete _gfxText32;
|
||||
delete _robotDecoder;
|
||||
delete _gfxFrameout;
|
||||
@ -600,6 +602,7 @@ void SciEngine::initGraphics() {
|
||||
_gfxText16 = 0;
|
||||
_gfxTransitions = 0;
|
||||
#ifdef ENABLE_SCI32
|
||||
_gfxControls32 = 0;
|
||||
_gfxText32 = 0;
|
||||
_robotDecoder = 0;
|
||||
_gfxFrameout = 0;
|
||||
@ -622,6 +625,7 @@ void SciEngine::initGraphics() {
|
||||
_gfxPaint32 = new GfxPaint32(_resMan, _gamestate->_segMan, _kernel, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette);
|
||||
_gfxPaint = _gfxPaint32;
|
||||
_gfxText32 = new GfxText32(_gamestate->_segMan, _gfxCache, _gfxScreen);
|
||||
_gfxControls32 = new GfxControls32(_gamestate->_segMan, _gfxCache, _gfxScreen);
|
||||
_robotDecoder = new RobotDecoder(g_system->getMixer(), getPlatform() == Common::kPlatformMacintosh);
|
||||
_gfxFrameout = new GfxFrameout(_gamestate->_segMan, _resMan, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32);
|
||||
} else {
|
||||
|
@ -60,6 +60,7 @@ class GfxAnimate;
|
||||
class GfxCache;
|
||||
class GfxCompare;
|
||||
class GfxControls16;
|
||||
class GfxControls32;
|
||||
class GfxCoordAdjuster;
|
||||
class GfxCursor;
|
||||
class GfxMacIconBar;
|
||||
@ -304,6 +305,7 @@ public:
|
||||
GfxCache *_gfxCache;
|
||||
GfxCompare *_gfxCompare;
|
||||
GfxControls16 *_gfxControls16; // Controls for 16-bit gfx
|
||||
GfxControls32 *_gfxControls32; // Controls for 32-bit gfx
|
||||
GfxCoordAdjuster *_gfxCoordAdjuster;
|
||||
GfxCursor *_gfxCursor;
|
||||
GfxMenu *_gfxMenu; // Menu for 16-bit gfx
|
||||
|
Loading…
x
Reference in New Issue
Block a user