aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kgraphics.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-30 22:55:35 +0000
committerFilippos Karapetis2009-10-30 22:55:35 +0000
commit86cafd561f8777fc06913dda10e3fe561ecf137e (patch)
tree263cabd62b8526cfd6245946f6ce298edadb0cfa /engines/sci/engine/kgraphics.cpp
parent1c158c52a1217225cfa4aadb289a537287eec6a2 (diff)
downloadscummvm-rg350-86cafd561f8777fc06913dda10e3fe561ecf137e.tar.gz
scummvm-rg350-86cafd561f8777fc06913dda10e3fe561ecf137e.tar.bz2
scummvm-rg350-86cafd561f8777fc06913dda10e3fe561ecf137e.zip
Some work on the kPortrait kernel function, used to show hires character portraits in the Windows CD version of KQ6
svn-id: r45552
Diffstat (limited to 'engines/sci/engine/kgraphics.cpp')
-rw-r--r--engines/sci/engine/kgraphics.cpp53
1 files changed, 52 insertions, 1 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 0fe1d40e38..9b88ad1bda 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -197,7 +197,8 @@ enum {
K_GRAPH_FILL_BOX_ANY = 11,
K_GRAPH_UPDATE_BOX = 12,
K_GRAPH_REDRAW_BOX = 13,
- K_GRAPH_ADJUST_PRIORITY = 14
+ K_GRAPH_ADJUST_PRIORITY = 14,
+ K_GRAPH_SAVE_UNSCALED_BOX = 15 // KQ6CD Windows version
};
reg_t kGraph(EngineState *s, int argc, reg_t *argv) {
@@ -271,6 +272,11 @@ reg_t kGraph(EngineState *s, int argc, reg_t *argv) {
s->priority_last = argv[2].toSint16() - 10;
break;
+ case K_GRAPH_SAVE_UNSCALED_BOX:
+ // Save an area given in unscaled coordinates, so that a hires control will be drawn over it
+ // TODO
+ break;
+
default:
error("Unsupported kGraph() operation %04x", argv[0].toSint16());
}
@@ -621,6 +627,51 @@ reg_t kAssertPalette(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+// Used to show hires character portraits in the Windows CD version of KQ6
+reg_t kPortrait(EngineState *s, int argc, reg_t *argv) {
+ uint16 operation = argv[0].toUint16();
+
+ switch (operation) {
+ case 0: // load resource (the corresponding .BIN file from the ACTORS directory)
+ {
+ Common::String resName = s->_segMan->getString(argv[1]);
+ warning("kPortrait, load portrait %s", resName.c_str());
+ // TODO
+ }
+ break;
+ case 1: // show portrait
+ {
+ Common::String resName = s->_segMan->getString(argv[1]);
+
+ // Show the portrait and sync the sound resource (like kDoSync)
+ /*
+ Common::Point portraitPos = Common::Point(argv[2].toUint16(), argv[3].toUint16());
+ uint resourceNum = argv[4].toUint16() & 0xff;
+ uint noun = argv[5].toUint16() & 0xff;
+ uint verb = argv[6].toUint16() & 0xff;
+ uint cond = argv[7].toUint16() & 0xff;
+ uint seq = argv[8].toUint16() & 0xff;
+ // argv[9] is usually 0
+ */
+
+ warning("kPortrait, show portrait %s", resName.c_str());
+ // TODO
+ }
+ break;
+ case 2: // unload resource
+ {
+ uint16 portraitId = argv[1].toUint16();
+ warning("kPortrait, unload portrait ID %d", portraitId);
+ // TODO
+ }
+ break;
+ default:
+ warning("kPortrait(%d), not implemented (argc = %d)", operation, argc);
+ }
+
+ return NULL_REG;
+}
+
void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) {
SegManager *segMan = s->_segMan;
int16 type = GET_SEL32V(segMan, controlObject, type);