Skip to content

Commit

Permalink
Externalize R_InitColormaps and R_SetUnderwaterPalette
Browse files Browse the repository at this point in the history
Not sure if R_SetUnderwaterPalette needed to be guarded by a macro in header file, but probably this will make sence for better understanding about the nature of this function, i.e. it's "for true color only".
  • Loading branch information
JNechaevsky committed Nov 28, 2023
1 parent b15db45 commit 772f346
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/heretic/f_finale.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,7 @@ void F_DrawUnderwater(void)
I_SetPalette(palette);
W_ReleaseLumpName(lumpname);
#else
{
extern void R_SetUnderwaterPalette(void);
R_SetUnderwaterPalette();
}
#endif
V_DrawFullscreenRawOrPatch(W_GetNumForName(DEH_String("E2END")));
}
Expand All @@ -378,10 +375,7 @@ void F_DrawUnderwater(void)
I_SetPalette(palette);
W_ReleaseLumpName(lumpname);
#else
{
extern void R_InitColormaps(void);
R_InitColormaps();
}
#endif
underwawa = false;
}
Expand Down
3 changes: 0 additions & 3 deletions src/heretic/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,13 +2035,10 @@ boolean MN_Responder(event_t * event)
#ifndef CRISPY_TRUECOLOR
I_SetPalette((byte *) W_CacheLumpName("PLAYPAL", PU_CACHE));
#else
{
extern void R_InitColormaps (void);
I_SetPalette(0);
R_InitColormaps();
BorderNeedRefresh = true;
SB_state = -1;
}
#endif
return true;
}
Expand Down
4 changes: 4 additions & 0 deletions src/heretic/r_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ byte *R_GetColumn(int tex, int col);
void R_InitData(void);
void R_PrecacheLevel(void);

extern void R_InitColormaps(void);
#ifdef CRISPY_TRUECOLOR
extern void R_SetUnderwaterPalette(void);
#endif

//
// R_things.c
Expand Down

0 comments on commit 772f346

Please sign in to comment.