Organise header files, use R_GetFlat

This commit is contained in:
Jaime Passos 2020-01-07 12:43:27 -03:00
parent f85476c723
commit 762ce146eb
3 changed files with 7 additions and 13 deletions

View file

@ -1127,7 +1127,7 @@ void R_DrawSinglePlane(visplane_t *pl)
case LEVELFLAT_NONE:
return;
case LEVELFLAT_FLAT:
ds_source = W_CacheLumpNum(levelflat->u.flat.lumpnum, PU_CACHE);
ds_source = R_GetFlat(levelflat->u.flat.lumpnum);
R_CheckFlatLength(W_LumpLength(levelflat->u.flat.lumpnum));
// Raw flats always have dimensions that are powers-of-two numbers.
ds_powersoftwo = true;
@ -1140,7 +1140,7 @@ void R_DrawSinglePlane(visplane_t *pl)
ds_source = R_GetTextureFlat(levelflat, true, false);
break;
default:
ds_source = W_CacheLumpNum(levelflat->u.flat.lumpnum, PU_STATIC);
ds_source = R_GetFlat(levelflat->u.flat.lumpnum);
flat = R_GetTextureFlat(levelflat, false,
#ifndef NO_PNG_LUMPS
( type == LEVELFLAT_PNG )

View file

@ -497,8 +497,6 @@ UINT8 *R_GetColumn(fixed_t tex, INT32 col)
return data + LONG(texturecolumnofs[tex][col]);
}
// convert flats to hicolor as they are requested
//
UINT8 *R_GetFlat(lumpnum_t flatlumpnum)
{
return W_CacheLumpNum(flatlumpnum, PU_CACHE);

View file

@ -85,24 +85,20 @@ extern UINT8 **texturecache; // graphics data for each generated full-size textu
void R_LoadTextures(void);
void R_FlushTextureCache(void);
// Texture generation
UINT8 *R_GenerateTexture(size_t texnum);
INT32 R_GetTextureNum(INT32 texnum);
void R_CheckTextureCache(INT32 tex);
void R_ClearTextureNumCache(boolean btell);
// Retrieve column data for span blitting.
// Retrieve texture data.
UINT8 *R_GetColumn(fixed_t tex, INT32 col);
UINT8 *R_GetFlat(lumpnum_t flatnum);
// Retrieval.
// Floor/ceiling opaque texture tiles,
// lookup by name. For animation?
lumpnum_t R_GetFlatNumForName(const char *name);
// Called by P_Ticker for switches and animations,
// returns the texture number for the texture name.
void R_ClearTextureNumCache(boolean btell);
// Returns the texture number for the texture name.
INT32 R_TextureNumForName(const char *name);
INT32 R_CheckTextureNumForName(const char *name);
lumpnum_t R_GetFlatNumForName(const char *name);
extern INT32 numtextures;