aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-07 20:58:33 +0000
committerMartin Kiewitz2009-10-07 20:58:33 +0000
commit0b83993a6476dc63475f985feb20d3044d20d7f8 (patch)
tree4f35c81992876cd02f7e5625c212dcba2b7d89b7 /engines/sci/engine
parent20a51e79e889fa10fd0f0b9ba3c66e11855c8b5b (diff)
downloadscummvm-rg350-0b83993a6476dc63475f985feb20d3044d20d7f8.tar.gz
scummvm-rg350-0b83993a6476dc63475f985feb20d3044d20d7f8.tar.bz2
scummvm-rg350-0b83993a6476dc63475f985feb20d3044d20d7f8.zip
SCI/newgui: kDrawPic cleanup, addToFlag inverse detection currently not working needs fixing
svn-id: r44756
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index a8c50fbdc1..9a96d07579 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -906,22 +906,30 @@ void _k_view_list_free_backgrounds(EngineState *s, ViewObject *list, int list_nr
reg_t kDrawPic(EngineState *s, int argc, reg_t *argv) {
GuiResourceId pictureId = argv[0].toUint16();
- uint16 flags = 0;
- uint16 style = 1;
+ int16 flags = 0;
+ int16 animationNr = -1;
+ bool mirroredFlag = false;
+ bool addToFlag = false;
int16 EGApaletteNo = 0; // default needs to be 0
- if (argc >= 2)
- style = argv[1].toUint16();
+ if (argc >= 2) {
+ flags = argv[1].toSint16();
+ animationNr = flags & 0xFF;
+ if (flags & K_DRAWPIC_FLAG_MIRRORED)
+ mirroredFlag = true;
+ }
if (argc >= 3) {
- if (!s->_kernel->usesOldGfxFunctions())
- flags = !argv[2].toUint16();
- else
- flags = argv[2].toUint16();
+ // FIXME: usesOldGfxFunctions() seems to be butchered, cause sq3 has it set, but uses bit 0 correctly
+ //if (!s->_kernel->usesOldGfxFunctions())
+ // flags = !argv[2].toUint16();
+ //else
+ if (!argv[2].isNull())
+ addToFlag = true;
}
if (argc >= 4)
EGApaletteNo = argv[3].toUint16();
- s->gui->drawPicture(pictureId, style, flags, EGApaletteNo);
+ s->gui->drawPicture(pictureId, animationNr, mirroredFlag, addToFlag, EGApaletteNo);
return s->r_acc;
}