mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Code cleanup: remove unused gDP.texRect struct and related code.
This commit is contained in:
parent
fa1ef45101
commit
eb42f8fe46
58
Textures.cpp
58
Textures.cpp
|
@ -555,62 +555,6 @@ void _calcTileSizes(u32 _t, TileSizes & _sizes, gDPTile * _pLoadTile)
|
|||
u32 maskHeight = 1 << pTile->maskt;
|
||||
u32 width, height;
|
||||
|
||||
#if 0
|
||||
if (pTile->textureMode == TEXTUREMODE_TEXRECT) {
|
||||
u16 texRectWidth = gDP.texRect.width - pTile->uls;
|
||||
u16 texRectHeight = gDP.texRect.height - pTile->ult;
|
||||
|
||||
if (pTile->masks && ((maskWidth * maskHeight) <= maxTexels))
|
||||
width = maskWidth;
|
||||
else if (bUseLoadSizes) {
|
||||
width = loadWidth;
|
||||
if (pTile->size < gDP.loadTile->size)
|
||||
width <<= (gDP.loadTile->size - pTile->size);
|
||||
} else if ((tileWidth * tileHeight) <= maxTexels)
|
||||
width = tileWidth;
|
||||
else if ((tileWidth * texRectHeight) <= maxTexels)
|
||||
width = tileWidth;
|
||||
else if ((texRectWidth * tileHeight) <= maxTexels)
|
||||
width = gDP.texRect.width;
|
||||
else if ((texRectWidth * texRectHeight) <= maxTexels)
|
||||
width = gDP.texRect.width;
|
||||
else
|
||||
width = lineWidth;
|
||||
|
||||
if (pTile->maskt && ((maskWidth * maskHeight) <= maxTexels))
|
||||
height = maskHeight;
|
||||
else if (bUseLoadSizes)
|
||||
height = loadHeight;
|
||||
else if ((tileWidth * tileHeight) <= maxTexels)
|
||||
height = tileHeight;
|
||||
else if ((tileWidth * texRectHeight) <= maxTexels)
|
||||
height = gDP.texRect.height;
|
||||
else if ((texRectWidth * tileHeight) <= maxTexels)
|
||||
height = tileHeight;
|
||||
else if ((texRectWidth * texRectHeight) <= maxTexels)
|
||||
height = gDP.texRect.height;
|
||||
else
|
||||
height = lineHeight;
|
||||
} else {
|
||||
if (pTile->masks && ((maskWidth * maskHeight) <= maxTexels))
|
||||
width = maskWidth; // Use mask width if set and valid
|
||||
else if ((tileWidth * tileHeight) <= maxTexels)
|
||||
width = tileWidth; // else use tile width if valid
|
||||
else if (bUseLoadSizes)
|
||||
width = loadWidth; // else use load width if load done with LoadTile
|
||||
else
|
||||
width = lineWidth; // else use line-based width
|
||||
|
||||
if (pTile->maskt && ((maskWidth * maskHeight) <= maxTexels))
|
||||
height = maskHeight;
|
||||
else if ((tileWidth * tileHeight) <= maxTexels)
|
||||
height = tileHeight;
|
||||
else if (bUseLoadSizes)
|
||||
height = loadHeight;
|
||||
else
|
||||
height = lineHeight;
|
||||
}
|
||||
#else
|
||||
gDPLoadTileInfo &info = gDP.loadInfo[pTile->tmem];
|
||||
if (info.loadType == LOADTYPE_TILE) {
|
||||
width = min(info.width, info.texWidth);
|
||||
|
@ -632,7 +576,7 @@ void _calcTileSizes(u32 _t, TileSizes & _sizes, gDPTile * _pLoadTile)
|
|||
else
|
||||
height = lineHeight;
|
||||
}
|
||||
#endif
|
||||
|
||||
_sizes.clampWidth = (pTile->clamps && gDP.otherMode.cycleType != G_CYC_COPY) ? tileWidth : width;
|
||||
_sizes.clampHeight = (pTile->clampt && gDP.otherMode.cycleType != G_CYC_COPY) ? tileHeight : height;
|
||||
|
||||
|
|
3
gDP.cpp
3
gDP.cpp
|
@ -1013,9 +1013,6 @@ void gDPTextureRectangle( f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, f32 s, f
|
|||
lrt = t + (lry - uly - 1) * dtdy;
|
||||
}
|
||||
|
||||
gDP.texRect.width = (u32)(max( lrs, s ) + dsdx);
|
||||
gDP.texRect.height = (u32)(max( lrt, t ) + dtdy);
|
||||
|
||||
OGLRender::TexturedRectParams params(ulx, uly, lrx, lry, s, t, lrs, lrt, (RSP.cmd == G_TEXRECTFLIP));
|
||||
video().getRender().drawTexturedRect(params);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user