- get rid of 'picnum' in common code.

This commit is contained in:
Christoph Oelckers 2023-05-20 12:40:34 +02:00
parent de6b5fec7b
commit a76494363c
7 changed files with 16 additions and 16 deletions

View file

@ -217,7 +217,7 @@ public:
double originx, double originy, double scalex, double scaley,
DAngle rotation, const FColormap &colormap, PalEntry flatcolor, double lightlevel, uint32_t *indices, size_t indexcount);
void AddPoly(FGameTexture* img, FVector4 *vt, size_t vtcount, const unsigned int *ind, size_t idxcount, int translation, PalEntry color, FRenderStyle style, const IntRect* clip);
void FillPolygon(int* rx1, int* ry1, int* xb1, int32_t npoints, int picnum, int palette, int shade, int props, const FVector2& xtex, const FVector2& ytex, const FVector2& otex,
void FillPolygon(int* rx1, int* ry1, int* xb1, int32_t npoints, int pic, int palette, int shade, int props, const FVector2& xtex, const FVector2& ytex, const FVector2& otex,
int clipx1, int clipy1, int clipx2, int clipy2);
void AddFlatFill(int left, int top, int right, int bottom, FGameTexture *src, int local_origin = false, double flatscale = 1.0, PalEntry color = 0xffffffff, ERenderStyle rs = STYLE_Normal);

View file

@ -1786,12 +1786,12 @@ DEFINE_ACTION_FUNCTION(FCanvas, Dim)
//
//==========================================================================
void DrawBorder (F2DDrawer *drawer, FTextureID picnum, int x1, int y1, int x2, int y2)
void DrawBorder (F2DDrawer *drawer, FTextureID texid, int x1, int y1, int x2, int y2)
{
int filltype = (ui_screenborder_classic_scaling) ? -1 : 0;
if (picnum.isValid())
if (texid.isValid())
{
drawer->AddFlatFill (x1, y1, x2, y2, TexMan.GetGameTexture(picnum, false), filltype);
drawer->AddFlatFill (x1, y1, x2, y2, TexMan.GetGameTexture(texid, false), filltype);
}
else
{

View file

@ -65,21 +65,21 @@ protected:
FSinglePicFont::FSinglePicFont(const char *picname) :
FFont(-1) // Since lump is only needed for priority information we don't need to worry about this here.
{
FTextureID picnum = TexMan.CheckForTexture (picname, ETextureType::Any);
FTextureID texid = TexMan.CheckForTexture (picname, ETextureType::Any);
if (!picnum.isValid())
if (!texid.isValid())
{
I_FatalError ("%s is not a font or texture", picname);
}
auto pic = TexMan.GetGameTexture(picnum);
auto pic = TexMan.GetGameTexture(texid);
FontName = picname;
FontHeight = (int)pic->GetDisplayHeight();
SpaceWidth = (int)pic->GetDisplayWidth();
GlobalKerning = 0;
FirstChar = LastChar = 'A';
PicNum = picnum;
PicNum = texid;
}
//==========================================================================

View file

@ -138,10 +138,10 @@ FFont *V_GetFont(const char *name, const char *fontlumpname)
return font;
}
}
FTextureID picnum = TexMan.CheckForTexture (name, ETextureType::Any);
if (picnum.isValid())
FTextureID texid = TexMan.CheckForTexture (name, ETextureType::Any);
if (texid.isValid())
{
auto tex = TexMan.GetGameTexture(picnum);
auto tex = TexMan.GetGameTexture(texid);
if (tex && tex->GetSourceLump() >= folderfile)
{
FFont *CreateSinglePicFont(const char *name);

View file

@ -498,9 +498,9 @@ FTextureID FTextureManager::CreateTexture (int lumpnum, ETextureType usetype)
//
//==========================================================================
void FTextureManager::ReplaceTexture (FTextureID picnum, FGameTexture *newtexture, bool free)
void FTextureManager::ReplaceTexture (FTextureID texid, FGameTexture *newtexture, bool free)
{
int index = picnum.GetIndex();
int index = texid.GetIndex();
if (unsigned(index) >= Textures.Size())
return;

View file

@ -137,7 +137,7 @@ public:
void AddTextures(void (*progressFunc_)(), void (*checkForHacks)(BuildInfo&), void (*customtexturehandler)() = nullptr);
void DeleteAll();
void ReplaceTexture (FTextureID picnum, FGameTexture *newtexture, bool free);
void ReplaceTexture (FTextureID texid, FGameTexture *newtexture, bool free);
int NumTextures () const { return (int)Textures.Size(); }

View file

@ -62,8 +62,8 @@ void FImageCollection::Add (const char **patchNames, int numPatches, ETextureTyp
for (int i = 0; i < numPatches; ++i)
{
FTextureID picnum = TexMan.CheckForTexture(patchNames[i], namespc);
ImageMap[OldCount + i] = picnum;
FTextureID texid = TexMan.CheckForTexture(patchNames[i], namespc);
ImageMap[OldCount + i] = texid;
}
}