- fix shadow and map rendering when bilinear filtering is on

This commit is contained in:
Ilya Shurumov 2021-02-16 22:02:39 +06:00
parent cba4736615
commit 3fdd9db9dc
2 changed files with 28 additions and 10 deletions

View File

@ -1759,16 +1759,16 @@ void InitTannerShadow(void)
if(GameLevel == 2) // [A] bug fix for vegas if(GameLevel == 2) // [A] bug fix for vegas
offs = 18; offs = 18;
poly->u0 = tannerShadow_texture.coords.u1 / 4; poly->u0 = tannerShadow_texture.coords.u1 / 4 - 1;
poly->v0 = tannerShadow_texture.coords.v1 + offs; poly->v0 = tannerShadow_texture.coords.v1 + offs;
poly->u1 = tannerShadow_texture.coords.u0 / 4; poly->u1 = tannerShadow_texture.coords.u0 / 4 + 1;
poly->v1 = tannerShadow_texture.coords.v0 + offs; poly->v1 = tannerShadow_texture.coords.v0 + offs;
poly->u2 = tannerShadow_texture.coords.u3 / 4; poly->u2 = tannerShadow_texture.coords.u3 / 4 - 1;
poly->v2 = tannerShadow_texture.coords.v3 + offs - 18; poly->v2 = tannerShadow_texture.coords.v3 + offs - 18;
poly->u3 = tannerShadow_texture.coords.u2 / 4; poly->u3 = tannerShadow_texture.coords.u2 / 4 + 1;
poly->v3 = tannerShadow_texture.coords.v2 + offs - 18; poly->v3 = tannerShadow_texture.coords.v2 + offs - 18;
poly->tpage = getTPage(2, 0, rectTannerWindow.x, rectTannerWindow.y); poly->tpage = getTPage(2, 0, rectTannerWindow.x, rectTannerWindow.y);

View File

@ -1360,8 +1360,16 @@ void DrawOverheadMap(void)
{ {
int tile; int tile;
tile = maptile[j][i]; tile = maptile[j][i];
width = MapTex[j].w; width = MapTex[j].w - 1;
height = MapTex[i].h; height = MapTex[i].h - 1;
#ifndef PSX
// make map fully detailed when filtering is not available
if (!g_bilinearFiltering)
{
width += 1;
height += 1;
}
#endif
spt = (POLY_FT4*)current->primptr; spt = (POLY_FT4*)current->primptr;
@ -1710,14 +1718,24 @@ void DrawFullscreenMap(void)
back->u0 = px; back->u0 = px;
back->v0 = py; back->v0 = py;
back->u1 = px + 32; back->u1 = px + 31;
back->v1 = py; back->v1 = py;
back->u2 = px; back->u2 = px;
back->v2 = py + 32; back->v2 = py + 31;
back->u3 = px + 32; back->u3 = px + 31;
back->v3 = py + 32; back->v3 = py + 31;
#ifndef PSX
// make map fully detailed when filtering is not available
if (!g_bilinearFiltering)
{
back->u1 += 1;
back->v2 += 1;
back->v3 += 1;
}
#endif
back->clut = MapClut; back->clut = MapClut;
back->tpage = MapTPage; back->tpage = MapTPage;