diff options
author | Martin Kiewitz | 2010-07-24 07:55:29 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-24 07:55:29 +0000 |
commit | c8cde0735fdc1ccbcdeb9075433d9f31bf03f86f (patch) | |
tree | 942a4bcba98c3a989f7886e24019a6e13b68d922 /engines/sci/graphics | |
parent | bc04a8377be36480b4a4b737e7f3ca14cde62e6e (diff) | |
download | scummvm-rg350-c8cde0735fdc1ccbcdeb9075433d9f31bf03f86f.tar.gz scummvm-rg350-c8cde0735fdc1ccbcdeb9075433d9f31bf03f86f.tar.bz2 scummvm-rg350-c8cde0735fdc1ccbcdeb9075433d9f31bf03f86f.zip |
SCI: adding workaround for sq4 room 391
svn-id: r51238
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index bd164b79b8..9361c1adbc 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -464,7 +464,7 @@ void GfxPaint16::kernelGraphRedrawBox(Common::Rect rect) { #define SCI_DISPLAY_DONTSHOWBITS 121 reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { - int displayArg; + reg_t displayArg; TextAlignment alignment = SCI_TEXT16_ALIGNMENT_LEFT; int16 colorPen = -1, colorBack = -1, width = -1, bRedraw = 1; bool doSaveUnder = false; @@ -481,12 +481,11 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { _ports->textGreyedOutput(false); // processing codes in argv while (argc > 0) { - if (argv[0].segment) - displayArg = 0xFFFF; - else - displayArg = argv[0].toUint16(); + displayArg = argv[0]; + if (displayArg.segment) + displayArg.offset = 0xFFFF; argc--; argv++; - switch (displayArg) { + switch (displayArg.offset) { case SCI_DISPLAY_MOVEPEN: _ports->moveTo(argv[0].toUint16(), argv[1].toUint16()); argc -= 2; argv += 2; @@ -536,7 +535,7 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { case SCI_DISPLAY_DUMMY2: if (!((g_sci->getGameId() == GID_LONGBOW) && (g_sci->isDemo()))) error("Unknown kDisplay argument %X", displayArg); - if (displayArg == SCI_DISPLAY_DUMMY2) { + if (displayArg.offset == SCI_DISPLAY_DUMMY2) { if (argc) { argc--; argv++; } else { @@ -548,7 +547,7 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { SciTrackOriginReply originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kDisplay_workarounds, &originReply); if (solution.type == WORKAROUND_NONE) - error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", PRINT_REG(argv[0]), originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset); + error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset); assert(solution.type == WORKAROUND_IGNORE); break; } |