mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-24 14:31:02 +00:00
Merge branch 'load-palette-before-map-data' into 'big-large-map-markers'
Load palette before map data See merge request KartKrew/Kart!705
This commit is contained in:
commit
b36195bfe8
3 changed files with 10 additions and 5 deletions
|
|
@ -1438,6 +1438,10 @@ void D_SRB2Main(void)
|
|||
|
||||
#endif //ifndef DEVELOP
|
||||
|
||||
// Do it before P_InitMapData because PNG patch
|
||||
// conversion sometimes needs the palette
|
||||
V_ReloadPalette();
|
||||
|
||||
//
|
||||
// search for mainwad maps
|
||||
//
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ const char *GetPalette(void)
|
|||
return "PLAYPAL";
|
||||
}
|
||||
|
||||
static void LoadMapPalette(void)
|
||||
void V_ReloadPalette(void)
|
||||
{
|
||||
LoadPalette(GetPalette());
|
||||
}
|
||||
|
|
@ -416,7 +416,7 @@ static void LoadMapPalette(void)
|
|||
void V_SetPalette(INT32 palettenum)
|
||||
{
|
||||
if (!pLocalPalette)
|
||||
LoadMapPalette();
|
||||
V_ReloadPalette();
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
|
|
@ -449,7 +449,7 @@ void V_SetPaletteLump(const char *pal)
|
|||
static void CV_palette_OnChange(void)
|
||||
{
|
||||
// reload palette
|
||||
LoadMapPalette();
|
||||
V_ReloadPalette();
|
||||
V_SetPalette(0);
|
||||
}
|
||||
|
||||
|
|
@ -2980,8 +2980,6 @@ void V_Init(void)
|
|||
UINT8 *base = vid.buffer;
|
||||
const INT32 screensize = vid.rowbytes * vid.height;
|
||||
|
||||
LoadMapPalette();
|
||||
|
||||
for (i = 0; i < NUMSCREENS; i++)
|
||||
screens[i] = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ void InitColorLUT(colorlookup_t *lut, RGBA_t *palette, boolean makecolors);
|
|||
UINT8 GetColorLUT(colorlookup_t *lut, UINT8 r, UINT8 g, UINT8 b);
|
||||
UINT8 GetColorLUTDirect(colorlookup_t *lut, UINT8 r, UINT8 g, UINT8 b);
|
||||
|
||||
// Loads the correct palette into memory
|
||||
void V_ReloadPalette(void);
|
||||
|
||||
// Set the current RGB palette lookup to use for palettized graphics
|
||||
void V_SetPalette(INT32 palettenum);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue