mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
Love Nystrom (=lovenystrom=at=hotmail=dot=com=), bug #4727
- Change some 'suspiciously looking' code in bootvid.dll. - BOOTCHAR_HEIGHT: a new macro to use instead of a plain integer. - CHAR_GEN_UPSIDE_DOWN: define it for upside down font data. svn path=/trunk/; revision=42350
This commit is contained in:
parent
f78dc5c1e5
commit
5da0923cf0
3 changed files with 20 additions and 7 deletions
|
@ -48,7 +48,10 @@ USHORT AT_Initialization[] =
|
|||
0x0 // End of command stream
|
||||
};
|
||||
|
||||
UCHAR FontData[256 * 13] =
|
||||
//
|
||||
// The character generator is in natural order, top of char is first element.
|
||||
//
|
||||
UCHAR FontData[256 * BOOTCHAR_HEIGHT] =
|
||||
{
|
||||
0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 0
|
||||
0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 13
|
||||
|
|
|
@ -146,10 +146,10 @@ DisplayCharacter(CHAR Character,
|
|||
ULONG i, j, XOffset;
|
||||
|
||||
/* Get the font line for this character */
|
||||
FontChar = &FontData[Character * 13 - Top];
|
||||
FontChar = &FontData[Character * BOOTCHAR_HEIGHT];
|
||||
|
||||
/* Loop each pixel height */
|
||||
i = 13;
|
||||
i = BOOTCHAR_HEIGHT;
|
||||
do
|
||||
{
|
||||
/* Loop each pixel width */
|
||||
|
@ -158,15 +158,20 @@ DisplayCharacter(CHAR Character,
|
|||
do
|
||||
{
|
||||
/* Check if we should draw this pixel */
|
||||
if (FontChar[Top] & (UCHAR)j)
|
||||
#ifdef CHAR_GEN_UPSIDE_DOWN
|
||||
if (FontChar[i] & (UCHAR)j)
|
||||
#else
|
||||
/* Normal character generator (top of char is first element) */
|
||||
if (FontChar[BOOTCHAR_HEIGHT - i] & (UCHAR)j)
|
||||
#endif
|
||||
{
|
||||
/* We do, use the given Text Color */
|
||||
SetPixel(XOffset, Top, (UCHAR)TextColor);
|
||||
}
|
||||
else if (BackTextColor < 16)
|
||||
{
|
||||
/* This is a background pixel. We're drawing it unless it's */
|
||||
/* transparent. */
|
||||
/* This is a background pixel. */
|
||||
/* We're drawing it unless it's transparent. */
|
||||
SetPixel(XOffset, Top, (UCHAR)BackTextColor);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
#include "halfuncs.h"
|
||||
#include "drivers/bootvid/bootvid.h"
|
||||
|
||||
/* Define if FontData has upside down characters */
|
||||
#undef CHAR_GEN_UPSIDE_DOWN
|
||||
|
||||
#define BOOTCHAR_HEIGHT 13
|
||||
|
||||
//
|
||||
// Command Stream Definitions
|
||||
//
|
||||
|
@ -43,4 +48,4 @@ extern ULONG curr_x;
|
|||
extern ULONG curr_y;
|
||||
extern ULONG_PTR VgaRegisterBase;
|
||||
extern ULONG_PTR VgaBase;
|
||||
extern UCHAR FontData[256 * 13];
|
||||
extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
|
||||
|
|
Loading…
Reference in a new issue