From 9072b0c26e01615d9a8b029ed703ede102659e99 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 24 Dec 2009 15:02:06 +0000 Subject: SCI32: Added some more stubs for picture manipulation, screen update and animation functions svn-id: r46529 --- engines/sci/engine/kernel.cpp | 6 ++++ engines/sci/engine/kernel.h | 8 +++++ engines/sci/engine/kernel32.cpp | 67 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) (limited to 'engines') diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 831f54cd6c..4054d0374b 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -345,6 +345,12 @@ SciKernelFunction kfunct_mappers[] = { DEFUN("AddScreenItem", kAddScreenItem, "o"), DEFUN("UpdateScreenItem", kUpdateScreenItem, "o"), DEFUN("DeleteScreenItem", kDeleteScreenItem, "o"), + DEFUN("AddPlane", kAddPlane, "o"), + DEFUN("DeletePlane", kDeletePlane, "o"), + DEFUN("UpdatePlane", kUpdatePlane, "o"), + DEFUN("RepaintPlane", kRepaintPlane, "o"), + DEFUN("FrameOut", kFrameOut, ""), + DEFUN("ListEachElementDo", kListEachElementDo, ".*"), // SCI2.1 Kernel Functions DEFUN("Save", kSave, ".*"), diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 3119df4c62..8f43a1b7f5 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -395,9 +395,17 @@ reg_t kTextFonts(EngineState *s, int argc, reg_t *argv); reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv); reg_t kArray(EngineState *s, int argc, reg_t *argv); reg_t kString(EngineState *s, int argc, reg_t *argv); +// "Screen items" in SCI32 are views reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv); reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv); reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv); +// "Planes" in SCI32 are pictures +reg_t kAddPlane(EngineState *s, int argc, reg_t *argv); +reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv); +reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv); +reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv); +reg_t kFrameOut(EngineState *s, int argc, reg_t *argv); +reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv); // SCI2.1 Kernel Functions reg_t kSave(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index caaec8ad6f..59e3168340 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -603,6 +603,8 @@ reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) { // HACK: just draw the view on screen s->_gui->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0); + // TODO + warning("kAddScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority); //s->_gui->addToPicView(viewId, loopNo, celNo, leftPos, topPos, priority, control); return NULL_REG; @@ -618,6 +620,8 @@ reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) { int16 priority = GET_SEL32V(s->_segMan, viewObj, priority); //int16 control = 0; + // TODO + warning("kUpdateScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority); return NULL_REG; } @@ -631,10 +635,73 @@ reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) { //int16 topPos = 0; int16 priority = GET_SEL32V(s->_segMan, viewObj, priority); //int16 control = 0; + + // TODO + warning("kDeleteScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority); return NULL_REG; } +reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) { + reg_t picObj = argv[0]; + // This kernel call shows pictures on screen + // The picture ID is likely in the "picture" selector (?) + + // TODO + + warning("kAddPlane object %04x:%04x", PRINT_REG(picObj)); + return NULL_REG; +} + +reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) { + reg_t picObj = argv[0]; + // The picture ID is likely in the "picture" selector (?) + + // TODO + + warning("kDeletePlane object %04x:%04x", PRINT_REG(picObj)); + return NULL_REG; +} + +reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) { + reg_t picObj = argv[0]; + // The picture ID is likely in the "picture" selector (?) + + // TODO + + warning("kUpdatePlane object %04x:%04x", PRINT_REG(picObj)); + return NULL_REG; +} + +reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv) { + reg_t picObj = argv[0]; + // The picture ID is likely in the "picture" selector (?) + + // TODO + + warning("kRepaintPlane object %04x:%04x", PRINT_REG(picObj)); + return NULL_REG; +} + +reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) { + // This kernel call likely seems to be doing the screen updates, + // as its called right after a view is updated + + // TODO + + return NULL_REG; +} + +reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) { + + // Likely performs doit() on each element, for screen updates/animations? + // It's called constantly, so perhaps that's its purpose... + + // TODO + + return NULL_REG; +} + } // End of namespace Sci #endif // ENABLE_SCI32 -- cgit v1.2.3