mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
Created R_CheckTextureCache to make sure midtexture/FOF walls cache their textures before choosing colfunc_2s, for software mode
This commit is contained in:
parent
a9cfd12e04
commit
8e56582728
3 changed files with 19 additions and 0 deletions
12
src/r_data.c
12
src/r_data.c
|
@ -317,6 +317,18 @@ INT32 R_GetTextureNum(INT32 texnum)
|
|||
return texturetranslation[texnum];
|
||||
}
|
||||
|
||||
//
|
||||
// R_CheckTextureCache
|
||||
//
|
||||
// Use this if you need to make sure the texture is cached before R_GetColumn calls
|
||||
// e.g.: midtextures and FOF walls
|
||||
//
|
||||
void R_CheckTextureCache(INT32 tex)
|
||||
{
|
||||
if (!texturecache[tex])
|
||||
R_GenerateTexture(tex);
|
||||
}
|
||||
|
||||
//
|
||||
// R_GetColumn
|
||||
//
|
||||
|
|
|
@ -66,6 +66,7 @@ void R_LoadTextures(void);
|
|||
void R_FlushTextureCache(void);
|
||||
|
||||
INT32 R_GetTextureNum(INT32 texnum);
|
||||
void R_CheckTextureCache(INT32 tex);
|
||||
|
||||
// Retrieve column data for span blitting.
|
||||
UINT8 *R_GetColumn(fixed_t tex, INT32 col);
|
||||
|
|
|
@ -344,6 +344,9 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
rw_scalestep = ds->scalestep;
|
||||
spryscale = ds->scale1 + (x1 - ds->x1)*rw_scalestep;
|
||||
|
||||
// Texture must be cached before setting colfunc_2s,
|
||||
// otherwise texture[texnum]->holes may be false when it shouldn't be
|
||||
R_CheckTextureCache(texnum);
|
||||
// handle case where multipatch texture is drawn on a 2sided wall, multi-patch textures
|
||||
// are not stored per-column with post info in SRB2
|
||||
if (textures[texnum]->holes)
|
||||
|
@ -968,6 +971,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
|
||||
dc_texturemid += offsetvalue;
|
||||
|
||||
// Texture must be cached before setting colfunc_2s,
|
||||
// otherwise texture[texnum]->holes may be false when it shouldn't be
|
||||
R_CheckTextureCache(texnum);
|
||||
//faB: handle case where multipatch texture is drawn on a 2sided wall, multi-patch textures
|
||||
// are not stored per-column with post info anymore in Doom Legacy
|
||||
if (textures[texnum]->holes)
|
||||
|
|
Loading…
Reference in a new issue