Skip to content

Commit

Permalink
Update special_case.cpp
Browse files Browse the repository at this point in the history
Requested attempt at gardening.
  • Loading branch information
zaphod77 authored Dec 16, 2024
1 parent 1fcc280 commit 657e750
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/gl/special_case.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,13 @@ uint32_t gl_special_case(uint32_t primitivetype, uint32_t vertextype, struct nve
else if (enable_bilinear && (vertextype != TLVERTEX || mode == MODE_MENU || (current_state.texture_set && VREF(texture_set, ogl.gl_set->force_filter)))) current_state.texture_filter = true;

// since we are no longer disabling all filtering on interal textures, we need to shut it off for the ones that filtering breaks.
// don't filter original textures in submarine minigame
if (current_state.texture_set && (mode == MODE_SUBMARINE) && !(VREF(texture_set, ogl.external))) // only ff7 has a submarine mode.

if (current_state.texture_set && !ff8 && !(VREF(texture_set, ogl.external)))
{
current_state.texture_filter = false; // don't filter original submarine textures, this causes thin lines, and original did not.
}
// or coaster minigame
if (current_state.texture_set && (mode == MODE_COASTER) && !(VREF(texture_set, ogl.external))) // only ff7 has coaster minigame.
{
current_state.texture_filter = false; // don't filter original coaster textures
if ((mode == MODE_SUBMARINE) || (mode == MODE_COASTER))
{
current_state.texture_filter = false; // required to avoid thin lines at the edges of the HUD textures in these modes.
}
}
// some modpath textures have z-sort forced on
if(current_state.texture_set && VREF(texture_set, ogl.gl_set->force_zsort) && VREF(texture_set, ogl.external)) defer = true;
Expand Down Expand Up @@ -117,28 +115,24 @@ uint32_t gl_special_case(uint32_t primitivetype, uint32_t vertextype, struct nve
// avoid filtering window borders
if (!_strnicmp(VREF(tex_header, file.pc_name), "menu/btl_win_c_", strlen("menu/btl_win_c_") - 1) && VREF(texture_set, palette_index) == 0) current_state.texture_filter = false;

// don't filter original menu textures in ff7, because it introduces glitches
if ((VREF(texture_set, ogl.external)))
{

}
else
// the following internal textures can glitch when filtered in ff7.
if (!(VREF(texture_set, ogl.external)))
{
if (!ff8 && (!_strnicmp(VREF(tex_header, file.pc_name), "menu/btl_win_", strlen("menu/btl_win_") - 1)))
{
current_state.texture_filter = false; // don't filter original btl_win.
current_state.texture_filter = false; // shows lines with anisotropic filtering off
}
if (!ff8 && (!_strnicmp(VREF(tex_header, file.pc_name), "menu/usfont_", strlen("menu/usfont_") - 1)))
{
current_state.texture_filter = false; // or the us menu font.
current_state.texture_filter = false; // shows lines with anisotropic filtering off
}
if (!ff8 && (!_strnicmp(VREF(tex_header, file.pc_name), "menu/jafont_", strlen("menu/jafont_") - 1)))
{
current_state.texture_filter = false; // or the japanese menu font either..
current_state.texture_filter = false; // almost certainly needed, though i can't test.
}
if (!ff8 && (!_strnicmp(VREF(tex_header, file.pc_name), "flevel/hand", strlen("flevel/hand") - 1)))
{
current_state.texture_filter = false; // or the field cursor.
current_state.texture_filter = false; // the field target indicators also glitch.
}

}
Expand Down

0 comments on commit 657e750

Please sign in to comment.