mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Delete remaining traces of ylookup and columnofs
This commit is contained in:
parent
b85c345c97
commit
aa3a03a885
4 changed files with 1 additions and 43 deletions
|
@ -506,14 +506,12 @@ static void D_Display(void)
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
viewwindowy = vid.height / 2;
|
viewwindowy = vid.height / 2;
|
||||||
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
|
|
||||||
|
|
||||||
topleft = screens[0] + viewwindowx*vid.height + viewwindowy;
|
topleft = screens[0] + viewwindowx*vid.height + viewwindowy;
|
||||||
|
|
||||||
R_RenderPlayerView(&players[secondarydisplayplayer]);
|
R_RenderPlayerView(&players[secondarydisplayplayer]);
|
||||||
|
|
||||||
viewwindowy = 0;
|
viewwindowy = 0;
|
||||||
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
30
src/r_draw.c
30
src/r_draw.c
|
@ -39,23 +39,6 @@
|
||||||
*/
|
*/
|
||||||
INT32 viewwidth, scaledviewwidth, viewheight, viewwindowx, viewwindowy;
|
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;
|
UINT8 *topleft;
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
@ -690,7 +673,7 @@ UINT16 R_GetSuperColorByName(const char *name)
|
||||||
|
|
||||||
void R_InitViewBuffer(INT32 width, INT32 height)
|
void R_InitViewBuffer(INT32 width, INT32 height)
|
||||||
{
|
{
|
||||||
INT32 i, bytesperpixel = vid.bpp;
|
INT32 bytesperpixel = vid.bpp;
|
||||||
|
|
||||||
if (width > MAXVIDWIDTH)
|
if (width > MAXVIDWIDTH)
|
||||||
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.
|
// Handle resize, e.g. smaller view windows with border and/or status bar.
|
||||||
viewwindowx = (vid.width - width) >> 1;
|
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.
|
// Same with base row offset.
|
||||||
if (width == vid.width)
|
if (width == vid.width)
|
||||||
viewwindowy = 0;
|
viewwindowy = 0;
|
||||||
else
|
else
|
||||||
viewwindowy = (vid.height - height) >> 1;
|
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
|
/** \brief The R_VideoErase function
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// COMMON STUFF FOR 8bpp AND 16bpp
|
// 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;
|
extern UINT8 *topleft;
|
||||||
|
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
|
@ -40,8 +40,6 @@ void R_DrawColumn_8(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Framebuffer destination address.
|
// Framebuffer destination address.
|
||||||
// Use ylookup LUT to avoid multiply with ScreenWidth.
|
|
||||||
// Use columnofs LUT for subwindows?
|
|
||||||
dest = &topleft[dc_x*vid.height + dc_yl];
|
dest = &topleft[dc_x*vid.height + dc_yl];
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -118,8 +116,6 @@ void R_Draw2sMultiPatchColumn_8(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Framebuffer destination address.
|
// Framebuffer destination address.
|
||||||
// Use ylookup LUT to avoid multiply with ScreenWidth.
|
|
||||||
// Use columnofs LUT for subwindows?
|
|
||||||
dest = &topleft[dc_x*vid.height + dc_yl];
|
dest = &topleft[dc_x*vid.height + dc_yl];
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -212,8 +208,6 @@ void R_Draw2sMultiPatchTranslucentColumn_8(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Framebuffer destination address.
|
// Framebuffer destination address.
|
||||||
// Use ylookup LUT to avoid multiply with ScreenWidth.
|
|
||||||
// Use columnofs LUT for subwindows?
|
|
||||||
dest = &topleft[dc_x*vid.height + dc_yl];
|
dest = &topleft[dc_x*vid.height + dc_yl];
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -1776,8 +1770,6 @@ void R_DrawFogColumn_8(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Framebuffer destination address.
|
// Framebuffer destination address.
|
||||||
// Use ylookup LUT to avoid multiply with ScreenWidth.
|
|
||||||
// Use columnofs LUT for subwindows?
|
|
||||||
dest = &topleft[dc_x*vid.height + dc_yl];
|
dest = &topleft[dc_x*vid.height + dc_yl];
|
||||||
|
|
||||||
// Determine scaling, which is the only mapping to be done.
|
// Determine scaling, which is the only mapping to be done.
|
||||||
|
|
Loading…
Reference in a new issue