mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- Fullbright fixes
This commit is contained in:
parent
df6214b142
commit
8678baf6f5
1 changed files with 15 additions and 1 deletions
|
@ -73,6 +73,7 @@ struct FakeCmap
|
|||
|
||||
TArray<FakeCmap> fakecmaps;
|
||||
BYTE *realcolormaps;
|
||||
BYTE *realfbcolormaps; //[SP] For fullbright use
|
||||
size_t numfakecmaps;
|
||||
|
||||
|
||||
|
@ -460,6 +461,11 @@ void R_DeinitColormaps ()
|
|||
delete[] realcolormaps;
|
||||
realcolormaps = NULL;
|
||||
}
|
||||
if (realfbcolormaps != NULL)
|
||||
{
|
||||
delete[] realfbcolormaps;
|
||||
realfbcolormaps = NULL;
|
||||
}
|
||||
FreeSpecialLights();
|
||||
}
|
||||
|
||||
|
@ -549,12 +555,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;
|
||||
FullNormalLight.Color = PalEntry (255, 255, 255);
|
||||
FullNormalLight.Fade = 0;
|
||||
FullNormalLight.Maps = realcolormaps;
|
||||
FullNormalLight.Maps = realfbcolormaps;
|
||||
NormalLightHasFixedLights = R_CheckForFixedLights(realcolormaps);
|
||||
numfakecmaps = fakecmaps.Size();
|
||||
|
||||
|
|
Loading…
Reference in a new issue