aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2009-01-07 21:43:54 +0000
committerFilippos Karapetis2009-01-07 21:43:54 +0000
commit88a9a5a6cac12a4e1428aef6776786315f665203 (patch)
treec9192d8dc741282bd4059fc8ea8fc0d2075f3c25 /graphics
parent9129f13b091ec73904f2e151b70ccc3626528549 (diff)
downloadscummvm-rg350-88a9a5a6cac12a4e1428aef6776786315f665203.tar.gz
scummvm-rg350-88a9a5a6cac12a4e1428aef6776786315f665203.tar.bz2
scummvm-rg350-88a9a5a6cac12a4e1428aef6776786315f665203.zip
Move videoPalette inside setPalette(), as it's only used there
svn-id: r35774
Diffstat (limited to 'graphics')
-rw-r--r--graphics/video/video_player.cpp12
-rw-r--r--graphics/video/video_player.h1
2 files changed, 7 insertions, 6 deletions
diff --git a/graphics/video/video_player.cpp b/graphics/video/video_player.cpp
index 5fc2c72fbf..f3d2f58ed1 100644
--- a/graphics/video/video_player.cpp
+++ b/graphics/video/video_player.cpp
@@ -123,14 +123,16 @@ void VideoPlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) {
}
void VideoPlayer::setPalette(byte *pal) {
+ byte videoPalette[256 * 4];
+
for (int i = 0; i < 256; i++) {
- _videoPalette[i * 4 + 0] = *pal++;
- _videoPalette[i * 4 + 1] = *pal++;
- _videoPalette[i * 4 + 2] = *pal++;
- _videoPalette[i * 4 + 3] = 0;
+ videoPalette[i * 4 + 0] = *pal++;
+ videoPalette[i * 4 + 1] = *pal++;
+ videoPalette[i * 4 + 2] = *pal++;
+ videoPalette[i * 4 + 3] = 0;
}
- g_system->setPalette(_videoPalette, 0, 256);
+ g_system->setPalette(videoPalette, 0, 256);
}
bool VideoPlayer::decodeNextFrame() {
diff --git a/graphics/video/video_player.h b/graphics/video/video_player.h
index 6d346f398d..18483043a7 100644
--- a/graphics/video/video_player.h
+++ b/graphics/video/video_player.h
@@ -158,7 +158,6 @@ protected:
Common::SeekableReadStream *_fileStream;
byte *_videoFrameBuffer;
- byte _videoPalette[256 * 4];
bool _skipVideo;
private: