From b4bbed6ed89dc350101d5861d053d7368a5028e3 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Tue, 25 Mar 2008 13:12:27 +0000 Subject: [PATCH] Do not actually blit movie frame if palette has been changed --- CHANGELOG.txt | 1 + main/movie.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4f9d98a4c..a8799d286 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D2X-Rebirth Changelog 20080225 -------- include/loadgl.h, main/newmenu.c, main/titles.c: Added definitions for OpenGL fucntions which might not be included in system headers; Cleaned and declared briefings palette hacks (EMULATING_D1 needs work!); Menu right border shadow was too wide; +main/movie.c: Do not actually blit movie frame if palette has been changed 20080323 -------- diff --git a/main/movie.c b/main/movie.c index a5840ee95..7c6441b5a 100644 --- a/main/movie.c +++ b/main/movie.c @@ -174,6 +174,14 @@ int PlayMovie(const char *filename, int must_have) void MovieShowFrame(ubyte *buf, uint bufw, uint bufh, uint sx, uint sy, uint w, uint h, uint dstx, uint dsty) { grs_bitmap source_bm; + static ubyte old_pal[768]; + + if (memcmp(old_pal,gr_palette,768)) + { + memcpy(old_pal,gr_palette,768); + return; + } + memcpy(old_pal,gr_palette,768); //mprintf((0,"MovieShowFrame %d,%d %d,%d %d,%d %d,%d\n",bufw,bufh,sx,sy,w,h,dstx,dsty));