Add V_DrawTutorialBack for drawing a console-like background box, add Lorem ipsum as filler test

This commit is contained in:
Monster Iestyn 2018-09-04 19:21:58 +01:00 committed by mazmazz
parent e5d16c520d
commit 77447492ec
2 changed files with 20 additions and 0 deletions

View file

@ -1480,6 +1480,25 @@ void V_DrawFadeConsBack(INT32 plines)
*buf = consolebgmap[*buf];
}
// Very similar to F_DrawFadeConsBack, except we draw from the middle(-ish) of the screen to the bottom.
void V_DrawTutorialBack(void)
{
INT32 charheight = 8*vid.dupy;
UINT8 *deststop, *buf;
#ifdef HWRENDER
if (rendermode != render_soft) // no support for OpenGL yet
return;
#endif
// heavily simplified -- we don't need to know x or y position,
// just the start and stop positions
deststop = screens[0] + vid.rowbytes * vid.height;
buf = deststop - vid.rowbytes * ((charheight * 4) + (charheight/2)*5); // 4 lines of space plus gaps between and some leeway
for (; buf < deststop; ++buf)
*buf = consolebgmap[*buf];
}
// Gets string colormap, used for 0x80 color codes
//
static const UINT8 *V_GetStringColormap(INT32 colorflags)

View file

@ -158,6 +158,7 @@ void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum);
void V_DrawFadeScreen(UINT16 color, UINT8 strength);
void V_DrawFadeConsBack(INT32 plines);
void V_DrawTutorialBack(void);
// draw a single character
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);