From e62e80669365a6c887bc882fa0f0e3ad1ab544bd Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 18 May 2012 02:30:07 +0000 Subject: [PATCH] - ZDoom no longer errors if no precalculated COLORMAP is found. SVN r3662 (trunk) --- src/r_data/colormaps.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/r_data/colormaps.cpp b/src/r_data/colormaps.cpp index b78d87256f..c3004a4daf 100644 --- a/src/r_data/colormaps.cpp +++ b/src/r_data/colormaps.cpp @@ -396,8 +396,12 @@ void R_SetDefaultColormap (const char *name) BYTE unremap[256]; BYTE remap[256]; + lump = Wads.CheckNumForName (name, ns_colormaps); + if (lump == -1) + lump = Wads.CheckNumForName (name, ns_global); + // [RH] If using BUILD's palette, generate the colormap - if (Wads.CheckNumForFullName("palette.dat") >= 0 || Wads.CheckNumForFullName("blood.pal") >= 0) + if (lump == -1 || Wads.CheckNumForFullName("palette.dat") >= 0 || Wads.CheckNumForFullName("blood.pal") >= 0) { Printf ("Make colormap\n"); FDynamicColormap foo; @@ -411,9 +415,6 @@ void R_SetDefaultColormap (const char *name) } else { - lump = Wads.CheckNumForName (name, ns_colormaps); - if (lump == -1) - lump = Wads.CheckNumForName (name, ns_global); FWadLump lumpr = Wads.OpenLumpNum (lump); // [RH] The colormap may not have been designed for the specific