mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 05:11:01 +00:00
OpenGL Map Specific palettes working
This makes OpenGL stop using a specific function that doesn't really do anything for it anymore. It looks like it was used for a hack that would change the colour of polygons for the flashpal equivalent in DOOM. I made it so ST_DoPaletteStuff doesn't set the flashpal in OpenGL as it already does its own hacky overlay and doing that would cause all the textures to be flushed more mid-level, it could be enabled for more correct flashpals, but they still wouldn't effect fog or lighting. This means the palette will be set when going to the title screen, and twice when starting a map, (causing the OpenGL cached textures to also be flushed at those times)
This commit is contained in:
parent
8e5ac64d7c
commit
092e709235
3 changed files with 6 additions and 16 deletions
|
@ -730,11 +730,6 @@ void D_StartTitle(void)
|
|||
CON_ToggleOff();
|
||||
|
||||
// Reset the palette
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
HWR_SetPaletteColor(0);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");
|
||||
}
|
||||
|
@ -1223,7 +1218,7 @@ void D_SRB2Main(void)
|
|||
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
|
||||
R_Init();
|
||||
|
||||
// setting up sound
|
||||
// setting up sound
|
||||
if (dedicated)
|
||||
{
|
||||
nosound = true;
|
||||
|
|
|
@ -2503,11 +2503,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
|
||||
// Reset the palette
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
HWR_SetPaletteColor(0);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");
|
||||
|
||||
|
|
|
@ -210,17 +210,17 @@ void ST_doPaletteStuff(void)
|
|||
else
|
||||
palette = 0;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
palette = 0; // No flashpals here in OpenGL
|
||||
#endif
|
||||
|
||||
palette = min(max(palette, 0), 13);
|
||||
|
||||
if (palette != st_palette)
|
||||
{
|
||||
st_palette = palette;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
HWR_SetPaletteColor(0);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||
|
|
Loading…
Reference in a new issue