aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Hamm2002-04-25 11:06:15 +0000
committerVincent Hamm2002-04-25 11:06:15 +0000
commitce464ac7e4e7f5325e990764de6ad49e55cd87c4 (patch)
treefe19266b800924eb5c9782be65651de7248a6021
parentf3aab1ce9c791ee366f70d1678e70e61d4844597 (diff)
downloadscummvm-rg350-ce464ac7e4e7f5325e990764de6ad49e55cd87c4.tar.gz
scummvm-rg350-ce464ac7e4e7f5325e990764de6ad49e55cd87c4.tar.bz2
scummvm-rg350-ce464ac7e4e7f5325e990764de6ad49e55cd87c4.zip
Fixed insane palette. Slowed down insane playback (need to find a better way)
svn-id: r4080
-rw-r--r--insane.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/insane.cpp b/insane.cpp
index a56005f7ee..eeb9d54ced 100644
--- a/insane.cpp
+++ b/insane.cpp
@@ -255,7 +255,7 @@ void codec37_proc5(byte *dst, byte *src, int next_offs, int bw, int bh,
}
-
+// this table is the same in FT and Dig
static const int8 maketable_bytes[] = {
0, 0, 1, 0, 2, 0, 3, 0, 5, 0, 8, 0, 13, 0, 21, 0,
-1, 0, -2, 0, -3, 0, -5, 0, -8, 0, -13, 0, -17, 0, -21, 0,
@@ -592,8 +592,19 @@ void SmushPlayer::setPalette()
{
int i;
- for (i = 0; i < 768; i++)
- sm->_currentPalette[i] = _fluPalette[i];
+ byte palette_colors[1024];
+ byte *p = palette_colors;
+
+ byte *data = _fluPalette;
+
+ for (i = 0; i != 256; i++, data += 3, p+=4) {
+ p[0] = data[0];
+ p[1] = data[1];
+ p[2] = data[2];
+ p[3] = 0;
+ }
+ sm->_system->set_palette(palette_colors, 0, 256);
+
}
void SmushPlayer::startVideo(short int arg, byte *videoFile)
@@ -658,7 +669,7 @@ void SmushPlayer::startVideo(short int arg, byte *videoFile)
if (_paletteChanged) {
_paletteChanged = false;
setPalette();
- sm->setDirtyColors(0, 255);
+ // sm->setDirtyColors(0, 255);
}
if (_frameChanged) {
@@ -666,7 +677,7 @@ void SmushPlayer::startVideo(short int arg, byte *videoFile)
sm->_system->copy_rect(sm->_videoBuffer, 320, 0, 0, 320, 200);
sm->_system->update_screen();
- sm->waitForTimer(20);
+ sm->waitForTimer(60);
//sm->delta = sm->_system->waitTick(sm->delta);
}