diff options
author | Filippos Karapetis | 2009-05-23 13:26:45 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-23 13:26:45 +0000 |
commit | 39f9894ee58c8f494216647e994566441f68b746 (patch) | |
tree | 47f4270129f4f54bfb7da1b0a2ed574e8cf9cec8 /engines | |
parent | 91d2fa2d0de0292292344736b56b7e646ac9772f (diff) | |
download | scummvm-rg350-39f9894ee58c8f494216647e994566441f68b746.tar.gz scummvm-rg350-39f9894ee58c8f494216647e994566441f68b746.tar.bz2 scummvm-rg350-39f9894ee58c8f494216647e994566441f68b746.zip |
Added a stub for SetVideoMode(), and fixed some of the palette glitches in the intro of KQ6 thanks to some comments by waltervn. Also, commented out the bounds rect in gfxr_pic_t, as it's currently unused
svn-id: r40808
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 17 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_resource.h | 2 |
4 files changed, 20 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 7985d3301b..98392803a4 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -211,6 +211,7 @@ SciKernelFunction kfunct_mappers[] = { DEFUN("ResCheck", kResCheck, "iii*"), DEFUN("SetQuitStr", kSetQuitStr, "r"), DEFUN("ShowMovie", kShowMovie, "ri"), + DEFUN("SetVideoMode", kSetVideoMode, ".*"), // Special and NOP stuff {KF_NEW, NULL, k_Unknown, NULL}, diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index c7110d5165..8269157ff9 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -434,6 +434,7 @@ reg_t kDoSync(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kResCheck(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kSetQuitStr(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv); +reg_t kSetVideoMode(EngineState *s, int funct_nr, int argc, reg_t *argv); reg_t k_Unknown(EngineState *s, int funct_nr, int argc, reg_t *argv); // The Unknown/Unnamed kernel function diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 580ec4fc54..5c2fe7b642 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -3374,4 +3374,21 @@ reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv) { return s->r_acc; } +reg_t kSetVideoMode(EngineState *s, int funct_nr, int argc, reg_t *argv) { + // This call is used for KQ6's intro. It has one parameter, which is + // 1 when the intro begins, and 0 when it ends. It is suspected that + // this is actually a flag to enable video planar memory access, as + // the video decoder in KQ6 is specifically written for the planar + // memory model. Planar memory mode access was used for VGA "Mode X" + // (320x240 resolution, although the intro in KQ6 is 320x200). + // Refer to http://en.wikipedia.org/wiki/Mode_X + + //warning("STUB: SetVideoMode %d", UKPV(0)); + + // We (ab)use this kernel function to free tagged resources when the + // intro of KQ6 starts. This fixes some palette issues in the intro. + s->gfx_state->gfxResMan->freeTaggedResources(); + return s->r_acc; +} + } // End of namespace Sci diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h index 711681c14d..292fdfa327 100644 --- a/engines/sci/gfx/gfx_resource.h +++ b/engines/sci/gfx/gfx_resource.h @@ -95,7 +95,7 @@ struct gfxr_pic_t { ** Bit 3-5: 'filled' (all three bits are set to 1) */ - rect_t bounds; + // rect_t bounds; // unused void *undithered_buffer; /* copies visual_map->index_data before dithering */ int undithered_buffer_size; |