diff options
author | Martin Kiewitz | 2010-01-19 17:45:14 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-19 17:45:14 +0000 |
commit | e7c1a34b3f3f1197fa37cf437d06a79a293453ef (patch) | |
tree | ba4581d1c8eebfd463f2169648220c748d992ffc | |
parent | 54638f005b4232511a4d9417bf6c53ca28330b92 (diff) | |
download | scummvm-rg350-e7c1a34b3f3f1197fa37cf437d06a79a293453ef.tar.gz scummvm-rg350-e7c1a34b3f3f1197fa37cf437d06a79a293453ef.tar.bz2 scummvm-rg350-e7c1a34b3f3f1197fa37cf437d06a79a293453ef.zip |
SCI: Remove upper 4 bits when drawing lines on EGA games (fixes window colors in kq1 and others)
svn-id: r47385
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 1677a4c9b3..df6ae2baa0 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -231,6 +231,10 @@ reg_t kGraph(EngineState *s, int argc, reg_t *argv) { control = (argc > 7) ? argv[7].toSint16() : -1; color = argv[5].toSint16(); + // TODO: Find out why we get >15 for color in EGA + if (!s->resMan->isVGA()) + color &= 0x0F; + s->_gui->graphDrawLine(Common::Point(x, y), Common::Point(x1, y1), color, priority, control); break; @@ -909,7 +913,7 @@ reg_t kDrawCel(EngineState *s, int argc, reg_t *argv) { int16 celNo = argv[2].toSint16(); uint16 x = argv[3].toUint16(); uint16 y = argv[4].toUint16(); - int16 priority = (argc > 5) ? argv[5].toSint16() : -1; + int16 priority = (argc > 5) ? argv[5].toSint16() : -1; uint16 paletteNo = (argc > 6) ? argv[6].toUint16() : 0; bool hiresMode = (argc > 7) ? true : false; reg_t upscaledHiresHandle = (argc > 7) ? argv[7] : NULL_REG; |