[Scummvm-cvs-logs] SF.net SVN: scummvm:[40883] scummvm/trunk/engines/sci/engine
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Mon May 25 13:14:42 CEST 2009
Revision: 40883
http://scummvm.svn.sourceforge.net/scummvm/?rev=40883&view=rev
Author: waltervn
Date: 2009-05-25 11:14:42 +0000 (Mon, 25 May 2009)
Log Message:
-----------
SCI: Force movie palettes (KQ6).
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kgraphics.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2009-05-25 11:01:33 UTC (rev 40882)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2009-05-25 11:14:42 UTC (rev 40883)
@@ -211,7 +211,7 @@
DEFUN("ResCheck", kResCheck, "iii*"),
DEFUN("SetQuitStr", kSetQuitStr, "r"),
DEFUN("ShowMovie", kShowMovie, "ri"),
- DEFUN("SetVideoMode", kSetVideoMode, ".*"),
+ DEFUN("SetVideoMode", kSetVideoMode, "i"),
// Special and NOP stuff
{KF_NEW, NULL, k_Unknown, NULL},
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-25 11:01:33 UTC (rev 40882)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-25 11:14:42 UTC (rev 40883)
@@ -3336,6 +3336,7 @@
reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv) {
const char *filename = kernel_dereference_char_pointer(s, argv[0], 0);
int framerate = UKPV(1); // FIXME: verify
+ int frameNr = 0;
SeqDecoder seq;
if (!seq.loadFile(filename)) {
@@ -3346,6 +3347,10 @@
bool play = true;
while (play) {
gfx_pixmap_t *pixmap = seq.getFrame(play);
+
+ if (frameNr++ == 0)
+ pixmap->palette->forceInto(s->gfx_state->driver->mode->palette);
+
gfx_xlate_pixmap(pixmap, s->gfx_state->driver->mode, GFX_XLATE_FILTER_NONE);
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, pixmap, gfx_rect(0, 0, 320, 200), Common::Point(pixmap->xoffset, pixmap->yoffset)));
gfxop_update_box(s->gfx_state, gfx_rect(0, 0, 320, 200));
@@ -3383,11 +3388,8 @@
// (320x240 resolution, although the intro in KQ6 is 320x200).
// Refer to http://en.wikipedia.org/wiki/Mode_X
- //warning("STUB: SetVideoMode %d", UKPV(0));
+ 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;
}
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