From 3ebf8c7e746ec0f0b9bab827e7b2fa9a0f91bd30 Mon Sep 17 00:00:00 2001 From: raa-eruanna Date: Wed, 14 Sep 2016 06:28:39 -0400 Subject: [PATCH] More code fixes - now it compiles. --- src/r_data/colormaps.h | 2 +- src/r_defs.h | 1 + src/v_video.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/r_data/colormaps.h b/src/r_data/colormaps.h index 039a85189..ca1574893 100644 --- a/src/r_data/colormaps.h +++ b/src/r_data/colormaps.h @@ -1,7 +1,7 @@ #ifndef __RES_CMAP_H #define __RES_CMAP_H -struct FColormap; +struct FSWColormap; void R_InitColormaps (); void R_DeinitColormaps (); diff --git a/src/r_defs.h b/src/r_defs.h index 7d7ad7eab..50d514fc5 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -1516,6 +1516,7 @@ struct visstyle_t { int ColormapNum; // Which colormap is rendered FSWColormap *BaseColormap; // Base colormap used together with ColormapNum + lighttable_t *colormap; // [SP] Restored from GZDoom - will this work? float Alpha; FRenderStyle RenderStyle; }; diff --git a/src/v_video.cpp b/src/v_video.cpp index d07fdc61a..1bef7df40 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -71,6 +71,7 @@ FRenderer *Renderer; IMPLEMENT_ABSTRACT_CLASS (DCanvas) IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer) +EXTERN_CVAR (Bool, swtruecolor) #if defined(_DEBUG) && defined(_M_IX86) #define DBGBREAK { __asm int 3 } @@ -813,7 +814,7 @@ void DSimpleCanvas::Resize(int width, int height) Pitch = width + MAX(0, CPU.DataL1LineSize - 8); } } - int bytes_per_pixel = bgra ? 4 : 1; + int bytes_per_pixel = swtruecolor ? 4 : 1; MemBuffer = new BYTE[Pitch * height * bytes_per_pixel]; memset (MemBuffer, 0, Pitch * height * bytes_per_pixel); }