Delete remaining traces of ylookup and columnofs

This commit is contained in:
Lactozilla 2023-11-28 14:37:12 -03:00
parent b85c345c97
commit aa3a03a885
4 changed files with 1 additions and 43 deletions

View file

@ -506,14 +506,12 @@ static void D_Display(void)
if (rendermode != render_none)
{
viewwindowy = vid.height / 2;
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
topleft = screens[0] + viewwindowx*vid.height + viewwindowy;
R_RenderPlayerView(&players[secondarydisplayplayer]);
viewwindowy = 0;
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
}
}

View file

@ -39,23 +39,6 @@
*/
INT32 viewwidth, scaledviewwidth, viewheight, viewwindowx, viewwindowy;
/** \brief pointer to the start of each line of the screen,
*/
UINT8 *ylookup[MAXVIDHEIGHT*4];
/** \brief pointer to the start of each line of the screen, for view1 (splitscreen)
*/
UINT8 *ylookup1[MAXVIDHEIGHT*4];
/** \brief pointer to the start of each line of the screen, for view2 (splitscreen)
*/
UINT8 *ylookup2[MAXVIDHEIGHT*4];
/** \brief x byte offset for columns inside the viewwindow,
so the first column starts at (SCRWIDTH - VIEWWIDTH)/2
*/
INT32 columnofs[MAXVIDWIDTH*4];
UINT8 *topleft;
// =========================================================================
@ -690,7 +673,7 @@ UINT16 R_GetSuperColorByName(const char *name)
void R_InitViewBuffer(INT32 width, INT32 height)
{
INT32 i, bytesperpixel = vid.bpp;
INT32 bytesperpixel = vid.bpp;
if (width > MAXVIDWIDTH)
width = MAXVIDWIDTH;
@ -702,22 +685,11 @@ void R_InitViewBuffer(INT32 width, INT32 height)
// Handle resize, e.g. smaller view windows with border and/or status bar.
viewwindowx = (vid.width - width) >> 1;
// Column offset for those columns of the view window, but relative to the entire screen
for (i = 0; i < width; i++)
columnofs[i] = (viewwindowx + i) * bytesperpixel;
// Same with base row offset.
if (width == vid.width)
viewwindowy = 0;
else
viewwindowy = (vid.height - height) >> 1;
// Precalculate all row offsets.
for (i = 0; i < height; i++)
{
ylookup[i] = ylookup1[i] = screens[0] + (i+viewwindowy)*vid.width*bytesperpixel;
ylookup2[i] = screens[0] + (i+(vid.height>>1))*vid.width*bytesperpixel; // for splitscreen
}
}
/** \brief The R_VideoErase function

View file

@ -19,10 +19,6 @@
// -------------------------------
// COMMON STUFF FOR 8bpp AND 16bpp
// -------------------------------
extern UINT8 *ylookup[MAXVIDHEIGHT*4];
extern UINT8 *ylookup1[MAXVIDHEIGHT*4];
extern UINT8 *ylookup2[MAXVIDHEIGHT*4];
extern INT32 columnofs[MAXVIDWIDTH*4];
extern UINT8 *topleft;
// -------------------------

View file

@ -40,8 +40,6 @@ void R_DrawColumn_8(void)
#endif
// Framebuffer destination address.
// Use ylookup LUT to avoid multiply with ScreenWidth.
// Use columnofs LUT for subwindows?
dest = &topleft[dc_x*vid.height + dc_yl];
count++;
@ -118,8 +116,6 @@ void R_Draw2sMultiPatchColumn_8(void)
#endif
// Framebuffer destination address.
// Use ylookup LUT to avoid multiply with ScreenWidth.
// Use columnofs LUT for subwindows?
dest = &topleft[dc_x*vid.height + dc_yl];
count++;
@ -212,8 +208,6 @@ void R_Draw2sMultiPatchTranslucentColumn_8(void)
#endif
// Framebuffer destination address.
// Use ylookup LUT to avoid multiply with ScreenWidth.
// Use columnofs LUT for subwindows?
dest = &topleft[dc_x*vid.height + dc_yl];
count++;
@ -1776,8 +1770,6 @@ void R_DrawFogColumn_8(void)
#endif
// Framebuffer destination address.
// Use ylookup LUT to avoid multiply with ScreenWidth.
// Use columnofs LUT for subwindows?
dest = &topleft[dc_x*vid.height + dc_yl];
// Determine scaling, which is the only mapping to be done.