From d669a4e84ac4e4292a8b95ab88f4948090282741 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 29 Apr 2017 16:40:07 +0100 Subject: [PATCH] Introducing pMasterPalette. Used instead of pLocalPalette when attempting to determine objective truths, such as "the colours of this gif without color profile modification" and "what indicies should this colormap remap to". Also, made f_wipe.c's paldiv only get calculated once. --- src/f_wipe.c | 7 ++++--- src/m_anigif.c | 19 +++++++------------ src/m_misc.c | 46 +++++++++++++++++----------------------------- src/r_data.c | 20 ++++++++++---------- src/v_video.c | 11 +++++++---- src/v_video.h | 1 + 6 files changed, 46 insertions(+), 58 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index a0b685a32..acc4efaaa 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -86,7 +86,7 @@ INT32 lastwipetic = 0; static UINT8 *wipe_scr_start; //screen 3 static UINT8 *wipe_scr_end; //screen 4 static UINT8 *wipe_scr; //screen 0 (main drawing) -static fixed_t paldiv; +static fixed_t paldiv = 0; /** Create fademask_t from lump * @@ -145,7 +145,7 @@ static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) { while (lsize--) { // Determine pixel to use from fademask - pcolor = &pLocalPalette[*lump++]; + pcolor = &pMasterPalette[*lump++]; *mask++ = FixedDiv((pcolor->s.red+1)<>FRACBITS; } @@ -337,7 +337,8 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) UINT8 wipeframe = 0; fademask_t *fmask; - paldiv = FixedDiv(257<