xref: /reactos/drivers/base/bootvid/precomp.h (revision 019f21ee)
1 #ifndef _BOOTVID_PCH_
2 #define _BOOTVID_PCH_
3 
4 #include <ntifs.h>
5 #include <ndk/halfuncs.h>
6 #include <drivers/bootvid/bootvid.h>
7 
8 /* Arch specific includes */
9 #if defined(_M_IX86) || defined(_M_AMD64)
10 #include "i386/pc/vga.h"
11 #include "i386/pc/pc.h"
12 #elif defined(_M_ARM)
13 #include "arm/arm.h"
14 #else
15 #error Unknown architecture
16 #endif
17 
18 /* Define if FontData has upside down characters */
19 #undef CHAR_GEN_UPSIDE_DOWN
20 
21 #define BOOTCHAR_HEIGHT 13
22 #define BOOTCHAR_WIDTH  8 // Each character line is encoded in a UCHAR.
23 
24 /* Bitmap Header */
25 typedef struct tagBITMAPINFOHEADER
26 {
27     ULONG biSize;
28     LONG biWidth;
29     LONG biHeight;
30     USHORT biPlanes;
31     USHORT biBitCount;
32     ULONG biCompression;
33     ULONG biSizeImage;
34     LONG biXPelsPerMeter;
35     LONG biYPelsPerMeter;
36     ULONG biClrUsed;
37     ULONG biClrImportant;
38 } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
39 
40 /* Supported bitmap compression formats */
41 #define BI_RGB  0
42 #define BI_RLE4 2
43 
44 typedef struct _PALETTE_ENTRY
45 {
46     UCHAR Red;
47     UCHAR Green;
48     UCHAR Blue;
49 } PALETTE_ENTRY, *PPALETTE_ENTRY;
50 
51 VOID
52 NTAPI
53 InitializePalette(VOID);
54 
55 VOID
56 NTAPI
57 DisplayCharacter(
58     _In_ CHAR Character,
59     _In_ ULONG Left,
60     _In_ ULONG Top,
61     _In_ ULONG TextColor,
62     _In_ ULONG BackColor
63 );
64 
65 VOID
66 PrepareForSetPixel(VOID);
67 
68 VOID
69 NTAPI
70 InitPaletteWithTable(
71     _In_ PULONG Table,
72     _In_ ULONG Count);
73 
74 /*
75  * Globals
76  */
77 extern UCHAR VidpTextColor;
78 extern ULONG VidpCurrentX;
79 extern ULONG VidpCurrentY;
80 extern ULONG VidpScrollRegion[4];
81 extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
82 
83 #endif /* _BOOTVID_PCH_ */
84