components/prboom/v_video.c
//
// V_SetPalette
//
// CPhipps - New function to set the palette to palette number pal.
// Handles loading of PLAYPAL and calls I_SetPalette
V_SetPalette
CPhipps - New function to set the palette to palette number pal.
Handles loading of PLAYPAL and calls I_SetPalette
V_SetPalette CPhipps - New function to set the palette to palette number pal . Handles loading of PLAYPAL and calls I_SetPalette
void V_SetPalette(int pal)
{
  currentPaletteIndex = pal;
  if (V_GetMode() == VID_MODEGL) {
#ifdef GL_DOOM
    gld_SetPalette(pal);
#endif
  } else {
    I_SetPalette(pal);
    if (V_GetMode() == VID_MODE15 || V_GetMode() == VID_MODE16 || V_GetMode() == VID_MODE32) {
      if (W_CheckNumForName("PLAYPAL") >= 0) {
        V_UpdateTrueColorPalette(V_GetMode());
      }
    }
  }
}
void V_SetPalette ( int pal ) { currentPaletteIndex = pal ; if ( V_GetMode ( ) == VID_MODEGL ) { #ifdef GL_DOOM gld_SetPalette ( pal ) ; #endif } else { I_SetPalette ( pal ) ; if ( V_GetMode ( ) == VID_MODE15 || V_GetMode ( ) == VID_MODE16 || V_GetMode ( ) == VID_MODE32 ) { if ( W_CheckNumForName ( " " ) >= 0 ) { V_UpdateTrueColorPalette ( V_GetMode ( ) ) ; } } } }
V_SetPalette
CPhipps - New function to set the palette to palette number pal.
V_SetPalette CPhipps - New function to set the palette to palette number pal .
// V_SetPalette can be called as part of the gamma setting before // we've loaded any wads, which prevents us from reading the palette - POPE