More code fixes - now it compiles.

This commit is contained in:
raa-eruanna 2016-09-14 06:28:39 -04:00
parent 004c7de89b
commit 3ebf8c7e74
3 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
#ifndef __RES_CMAP_H #ifndef __RES_CMAP_H
#define __RES_CMAP_H #define __RES_CMAP_H
struct FColormap; struct FSWColormap;
void R_InitColormaps (); void R_InitColormaps ();
void R_DeinitColormaps (); void R_DeinitColormaps ();

View file

@ -1516,6 +1516,7 @@ struct visstyle_t
{ {
int ColormapNum; // Which colormap is rendered int ColormapNum; // Which colormap is rendered
FSWColormap *BaseColormap; // Base colormap used together with ColormapNum FSWColormap *BaseColormap; // Base colormap used together with ColormapNum
lighttable_t *colormap; // [SP] Restored from GZDoom - will this work?
float Alpha; float Alpha;
FRenderStyle RenderStyle; FRenderStyle RenderStyle;
}; };

View file

@ -71,6 +71,7 @@ FRenderer *Renderer;
IMPLEMENT_ABSTRACT_CLASS (DCanvas) IMPLEMENT_ABSTRACT_CLASS (DCanvas)
IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer) IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer)
EXTERN_CVAR (Bool, swtruecolor)
#if defined(_DEBUG) && defined(_M_IX86) #if defined(_DEBUG) && defined(_M_IX86)
#define DBGBREAK { __asm int 3 } #define DBGBREAK { __asm int 3 }
@ -813,7 +814,7 @@ void DSimpleCanvas::Resize(int width, int height)
Pitch = width + MAX(0, CPU.DataL1LineSize - 8); 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]; MemBuffer = new BYTE[Pitch * height * bytes_per_pixel];
memset (MemBuffer, 0, Pitch * height * bytes_per_pixel); memset (MemBuffer, 0, Pitch * height * bytes_per_pixel);
} }