Merge commit '8678baf6f589a68635939a1063a28231a0aa01a1'

# Conflicts:
#	src/r_data/colormaps.cpp
#	src/r_main.cpp
#	src/r_segs.cpp
#	src/r_things.cpp
#	wadsrc/static/language.enu
#	wadsrc/static/menudef.txt
This commit is contained in:
raa-eruanna 2016-10-21 07:42:28 -04:00
commit 1ae478aacd

View file

@ -73,6 +73,7 @@ struct FakeCmap
TArray<FakeCmap> fakecmaps;
FSWColormap realcolormaps;
FSWColormap realfbcolormaps; //[SP] For fullbright use
size_t numfakecmaps;
@ -456,6 +457,12 @@ void R_DeinitColormaps ()
SpecialColormaps.Clear();
fakecmaps.Clear();
delete[] realcolormaps.Maps;
if (realfbcolormaps != NULL)
{
delete[] realfbcolormaps;
realfbcolormaps = NULL;
}
delete[] realfbcolormaps.Maps;
FreeSpecialLights();
}
@ -545,12 +552,20 @@ void R_InitColormaps ()
}
}
}
// [SP] Create a copy of the colormap
if (!realfbcolormaps)
{
realfbcolormaps = new BYTE[256*NUMCOLORMAPS*fakecmaps.Size()];
memcpy(realfbcolormaps, realcolormaps, 256*NUMCOLORMAPS*fakecmaps.Size());
}
NormalLight.Color = PalEntry (255, 255, 255);
NormalLight.Fade = 0;
NormalLight.Maps = realcolormaps.Maps;
FullNormalLight.Color = PalEntry (255, 255, 255);
FullNormalLight.Fade = 0;
FullNormalLight.Maps = realcolormaps.Maps;
FullNormalLight.Maps = realfbcolormaps.Maps;
NormalLightHasFixedLights = R_CheckForFixedLights(realcolormaps.Maps);
numfakecmaps = fakecmaps.Size();