Remove CLUT4 palette swapping

This commit is contained in:
Steam Deck User 2023-03-16 10:04:36 -04:00
parent 6085a20fc9
commit c111883fde
2 changed files with 7 additions and 18 deletions

View file

@ -110,7 +110,6 @@ void VID_InitPaleteLM()
}
qboolean last_palette_wasnt_tx;
qboolean last_palette_wasnt_clut4;
void VID_SetPaletteLM()
{
@ -120,7 +119,6 @@ void VID_SetPaletteLM()
sceGuClutLoad(palette_size / 8, d_8to24tableLM);
reloaded_pallete = 1;
last_palette_wasnt_tx = qtrue;
last_palette_wasnt_clut4 = qtrue;
}
void VID_SetPaletteTX()
@ -131,7 +129,6 @@ void VID_SetPaletteTX()
sceGuClutLoad(palette_size / 8, d_8to24table);
reloaded_pallete = 1;
last_palette_wasnt_tx = qfalse;
last_palette_wasnt_clut4 = qtrue;
}
void VID_SetPalette4(unsigned char* clut4pal) {
@ -139,7 +136,6 @@ void VID_SetPalette4(unsigned char* clut4pal) {
sceKernelDcacheWritebackRange(clut4pal, sizeof(clut4pal));
sceGuClutLoad(2, clut4pal);
last_palette_wasnt_tx = qtrue;
last_palette_wasnt_clut4 = qfalse;
}
void VID_SetPalette(unsigned char* palette)
@ -163,7 +159,6 @@ void VID_SetPalette(unsigned char* palette)
sceGuClutLoad(palette_size / 8, d_8to24table);
reloaded_pallete = 1;
last_palette_wasnt_tx = qtrue;
last_palette_wasnt_clut4 = qtrue;
}
void VID_ShiftPalette(unsigned char* palette)

View file

@ -190,7 +190,6 @@ void GL_Copy(int texture_index, int dx, int dy, int sx, int sy, int w, int h)
void VID_SetPaletteTX();
extern qboolean last_palette_wasnt_tx;
extern qboolean last_palette_wasnt_clut4;
void GL_Bind (int texture_index)
{
// Binding the currently bound texture?
@ -206,18 +205,13 @@ void GL_Bind (int texture_index)
// Which texture is it?
const gltexture_t& texture = gltextures[texture_index];
// Set the palette (for CLUT4)
if (texture.format == GU_PSM_T4) {
VID_SetPalette4(texture.palette);
vid_palmode = GU_PSM_T4;
sceGuTexMode(texture.format, texture.mipmaps , 0, GU_TRUE);
} else {
// HACK HACK HACK: avoid setting this all the time
if (last_palette_wasnt_tx == qtrue)
VID_SetPaletteTX();
vid_palmode = GU_PSM_T8;
sceGuTexMode(texture.format, texture.mipmaps , 0, texture.swizzle);
}
// HACK HACK HACK: avoid setting this all the time
if (last_palette_wasnt_tx == qtrue)
VID_SetPaletteTX();
vid_palmode = GU_PSM_T8;
sceGuTexMode(texture.format, texture.mipmaps , 0, texture.swizzle);
// Set the Texture filter.
if (r_retro.value)