[Scummvm-cvs-logs] SF.net SVN: scummvm:[40808] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat May 23 15:26:45 CEST 2009
Revision: 40808
http://scummvm.svn.sourceforge.net/scummvm/?rev=40808&view=rev
Author: thebluegr
Date: 2009-05-23 13:26:45 +0000 (Sat, 23 May 2009)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/gfx/gfx_resource.h
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2009-05-23 12:08:36 UTC (rev 40807)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2009-05-23 13:26:45 UTC (rev 40808)
@@ -211,6 +211,7 @@
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},
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2009-05-23 12:08:36 UTC (rev 40807)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2009-05-23 13:26:45 UTC (rev 40808)
@@ -434,6 +434,7 @@
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
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-23 12:08:36 UTC (rev 40807)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-23 13:26:45 UTC (rev 40808)
@@ -3374,4 +3374,21 @@
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
Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.h 2009-05-23 12:08:36 UTC (rev 40807)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.h 2009-05-23 13:26:45 UTC (rev 40808)
@@ -95,7 +95,7 @@
** 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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list