diff options
author | Filippos Karapetis | 2009-12-24 15:02:06 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-24 15:02:06 +0000 |
commit | 9072b0c26e01615d9a8b029ed703ede102659e99 (patch) | |
tree | 4b8f998ba494a5cd0a6c7523666aafc63afdae4e | |
parent | c8a3d163d1b06c71e397222becaed87f61bf9597 (diff) | |
download | scummvm-rg350-9072b0c26e01615d9a8b029ed703ede102659e99.tar.gz scummvm-rg350-9072b0c26e01615d9a8b029ed703ede102659e99.tar.bz2 scummvm-rg350-9072b0c26e01615d9a8b029ed703ede102659e99.zip |
SCI32: Added some more stubs for picture manipulation, screen update and animation functions
svn-id: r46529
-rw-r--r-- | engines/sci/engine/kernel.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 8 | ||||
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 67 |
3 files changed, 81 insertions, 0 deletions
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 |