ReactOS  0.4.15-dev-1384-g878186b
precomp.h
Go to the documentation of this file.
1 #ifndef _BOOTVID_PCH_
2 #define _BOOTVID_PCH_
3 
4 #include <ntifs.h>
5 #include <ndk/halfuncs.h>
7 
8 /* Arch specific includes */
9 #if defined(_M_IX86) || defined(_M_AMD64)
10 #if defined(SARCH_PC98)
11 #include "i386/pc98/pc98.h"
12 #elif defined(SARCH_XBOX)
13 #include "i386/xbox/xbox.h"
14 #else
15 #include "i386/pc/vga.h"
16 #include "i386/pc/pc.h"
17 #endif
18 #elif defined(_M_ARM)
19 #include "arm/arm.h"
20 #else
21 #error Unknown architecture
22 #endif
23 
24 /* Define if FontData has upside down characters */
25 #undef CHAR_GEN_UPSIDE_DOWN
26 
27 #define BOOTCHAR_HEIGHT 13
28 #define BOOTCHAR_WIDTH 8 // Each character line is encoded in a UCHAR.
29 
30 /* Bitmap Header */
31 typedef struct tagBITMAPINFOHEADER
32 {
45 
46 /* Supported bitmap compression formats */
47 #define BI_RGB 0
48 #define BI_RLE4 2
49 
50 typedef ULONG RGBQUAD;
51 
52 /*
53  * Globals
54  */
55 extern UCHAR VidpTextColor;
56 extern ULONG VidpCurrentX;
57 extern ULONG VidpCurrentY;
58 extern ULONG VidpScrollRegion[4];
59 extern UCHAR VidpFontData[256 * BOOTCHAR_HEIGHT];
61 
62 #define RGB(r, g, b) ((RGBQUAD)(((UCHAR)(b) | ((USHORT)((UCHAR)(g))<<8)) | (((ULONG)(UCHAR)(r))<<16)))
63 
64 #define GetRValue(quad) ((UCHAR)(((quad)>>16) & 0xFF))
65 #define GetGValue(quad) ((UCHAR)(((quad)>>8) & 0xFF))
66 #define GetBValue(quad) ((UCHAR)((quad) & 0xFF))
67 
68 #define InitializePalette() InitPaletteWithTable((PULONG)VidpDefaultPalette, BV_MAX_COLORS)
69 
70 #ifdef CHAR_GEN_UPSIDE_DOWN
71 # define GetFontPtr(_Char) &VidpFontData[_Char * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1;
72 # define FONT_PTR_DELTA (-1)
73 #else
74 # define GetFontPtr(_Char) &VidpFontData[_Char * BOOTCHAR_HEIGHT];
75 # define FONT_PTR_DELTA (1)
76 #endif
77 
78 #endif /* _BOOTVID_PCH_ */
ULONG VidpCurrentX
Definition: common.c:7
USHORT biBitCount
Definition: precomp.h:37
LONG biXPelsPerMeter
Definition: precomp.h:40
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
ULONG biCompression
Definition: precomp.h:38
UCHAR VidpFontData[256 *BOOTCHAR_HEIGHT]
Definition: fontdata.c:9
#define BOOTCHAR_HEIGHT
Definition: precomp.h:27
UCHAR VidpTextColor
Definition: common.c:5
ULONG VidpScrollRegion[4]
Definition: common.c:10
struct tagBITMAPINFOHEADER * PBITMAPINFOHEADER
long LONG
Definition: pedump.c:60
ULONG biClrImportant
Definition: precomp.h:43
ULONG VidpCurrentY
Definition: common.c:8
ULONG RGBQUAD
Definition: precomp.h:50
unsigned char UCHAR
Definition: xmlstorage.h:181
LONG biYPelsPerMeter
Definition: precomp.h:41
unsigned short USHORT
Definition: pedump.c:61
const RGBQUAD VidpDefaultPalette[BV_MAX_COLORS]
Definition: common.c:23
unsigned int ULONG
Definition: retypes.h:1
#define BV_MAX_COLORS
Definition: display.h:32