- narrowing down the public interface of the texture class
Cannot refactor if the entire class is this wide open to everything. Not complete yet, doesn't fully compile!
This commit is contained in:
parent
e83af15907
commit
6eab4a882c
74 changed files with 608 additions and 518 deletions
|
|
@ -1198,8 +1198,8 @@ static void AM_ScrollParchment (double dmapx, double dmapy)
|
|||
|
||||
if (backtex != NULL)
|
||||
{
|
||||
int pwidth = backtex->GetWidth();
|
||||
int pheight = backtex->GetHeight();
|
||||
int pwidth = backtex->GetDisplayWidth();
|
||||
int pheight = backtex->GetDisplayHeight();
|
||||
|
||||
while(mapxstart > 0)
|
||||
mapxstart -= pwidth;
|
||||
|
|
@ -1692,8 +1692,8 @@ void AM_clearFB (const AMColor &color)
|
|||
FTexture *backtex = TexMan[mapback];
|
||||
if (backtex != NULL)
|
||||
{
|
||||
int pwidth = backtex->GetWidth();
|
||||
int pheight = backtex->GetHeight();
|
||||
int pwidth = backtex->GetDisplayWidth();
|
||||
int pheight = backtex->GetDisplayHeight();
|
||||
int x, y;
|
||||
|
||||
//blit the automap background to the screen.
|
||||
|
|
@ -2212,8 +2212,7 @@ void AM_drawSubsectors()
|
|||
}
|
||||
|
||||
// Draw the polygon.
|
||||
FTexture *pic = TexMan(maptex);
|
||||
if (pic != nullptr && pic->UseType != ETextureType::Null)
|
||||
if (maptex.isValid())
|
||||
{
|
||||
// Hole filling "subsectors" are not necessarily convex so they require real triangulation.
|
||||
// These things are extremely rare so performance is secondary here.
|
||||
|
|
@ -3116,7 +3115,7 @@ void AM_drawThings ()
|
|||
static void DrawMarker (FTexture *tex, double x, double y, int yadjust,
|
||||
INTBOOL flip, double xscale, double yscale, int translation, double alpha, uint32_t fillcolor, FRenderStyle renderstyle)
|
||||
{
|
||||
if (tex == NULL || tex->UseType == ETextureType::Null)
|
||||
if (tex == NULL || !tex->isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -3125,8 +3124,8 @@ static void DrawMarker (FTexture *tex, double x, double y, int yadjust,
|
|||
AM_rotatePoint (&x, &y);
|
||||
}
|
||||
screen->DrawTexture (tex, CXMTOF(x) + f_x, CYMTOF(y) + yadjust + f_y,
|
||||
DTA_DestWidthF, tex->GetScaledWidthDouble() * CleanXfac * xscale,
|
||||
DTA_DestHeightF, tex->GetScaledHeightDouble() * CleanYfac * yscale,
|
||||
DTA_DestWidthF, tex->GetDisplayWidthDouble() * CleanXfac * xscale,
|
||||
DTA_DestHeightF, tex->GetDisplayHeightDouble() * CleanYfac * yscale,
|
||||
DTA_ClipTop, f_y,
|
||||
DTA_ClipBottom, f_y + f_h,
|
||||
DTA_ClipLeft, f_x,
|
||||
|
|
@ -3185,9 +3184,9 @@ void AM_drawAuthorMarkers ()
|
|||
if (mark->picnum.isValid())
|
||||
{
|
||||
tex = TexMan(mark->picnum);
|
||||
if (tex->Rotations != 0xFFFF)
|
||||
if (tex->GetRotations() != 0xFFFF)
|
||||
{
|
||||
spriteframe_t *sprframe = &SpriteFrames[tex->Rotations];
|
||||
spriteframe_t *sprframe = &SpriteFrames[tex->GetRotations()];
|
||||
picnum = sprframe->Texture[0];
|
||||
flip = sprframe->Flip & 1;
|
||||
tex = TexMan[picnum];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue