diff options
author | Filippos Karapetis | 2009-05-18 09:07:31 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-18 09:07:31 +0000 |
commit | 76ad23ddbd90fb1cb8bb3ee8a884d763e1186c69 (patch) | |
tree | a38d1efa75c7d59932d058458404310adb344797 | |
parent | 1e547f320c83d276834a432572a8ac61ccfe4fc8 (diff) | |
download | scummvm-rg350-76ad23ddbd90fb1cb8bb3ee8a884d763e1186c69.tar.gz scummvm-rg350-76ad23ddbd90fb1cb8bb3ee8a884d763e1186c69.tar.bz2 scummvm-rg350-76ad23ddbd90fb1cb8bb3ee8a884d763e1186c69.zip |
Added a workaround for LSL6, thanks to waltervn's comments
svn-id: r40677
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 5158361dc6..3e3e65836d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -2378,12 +2378,19 @@ reg_t kSetPort(EngineState *s, int funct_nr, int argc, reg_t *argv) { return s->r_acc; } - s->gfx_state->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4), - UKPV(3), UKPV(2)); - - // FIXME: Should really only invalidate all loaded pic resources here; - // this is overkill - s->gfx_state->gfxResMan->freeAllResources(); + // LSL6 calls kSetPort to extend the screen to draw the GUI. If we free all resources + // here, the background picture is freed too, and this makes everything a big mess. + // FIXME/TODO: This code really needs to be rewritten to conform to the original behavior + if (s->_gameName != "LSL6") { + s->gfx_state->pic_port_bounds = gfx_rect(UKPV(5), UKPV(4), UKPV(3), UKPV(2)); + + // FIXME: Should really only invalidate all loaded pic resources here; + // this is overkill + s->gfx_state->gfxResMan->freeAllResources(); + } else { + // WORKAROUND for LSL6 + printf("SetPort case 6 called in LSL6. Origin: %d, %d - Clip rect: %d, %d, %d, %d\n", SKPV(0), SKPV(1), UKPV(2), UKPV(3), UKPV(4), UKPV(5)); + } break; } |