diff options
author | Filippos Karapetis | 2009-01-07 21:43:54 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-01-07 21:43:54 +0000 |
commit | 88a9a5a6cac12a4e1428aef6776786315f665203 (patch) | |
tree | c9192d8dc741282bd4059fc8ea8fc0d2075f3c25 /graphics/video/video_player.cpp | |
parent | 9129f13b091ec73904f2e151b70ccc3626528549 (diff) | |
download | scummvm-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/video/video_player.cpp')
-rw-r--r-- | graphics/video/video_player.cpp | 12 |
1 files changed, 7 insertions, 5 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() { |