ReactOS 0.4.15-dev-7788-g1ad9096
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 */
31typedef struct tagBITMAPINFOHEADER
32{
45
46/* Supported bitmap compression formats */
47#define BI_RGB 0
48#define BI_RLE4 2
49
50typedef ULONG RGBQUAD;
51
52/*
53 * Globals
54 */
55extern UCHAR VidpTextColor;
56extern ULONG VidpCurrentX;
57extern ULONG VidpCurrentY;
58extern ULONG VidpScrollRegion[4];
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_ */
struct tagBITMAPINFOHEADER * PBITMAPINFOHEADER
UCHAR VidpFontData[256 *BOOTCHAR_HEIGHT]
Definition: fontdata.c:9
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
const RGBQUAD VidpDefaultPalette[BV_MAX_COLORS]
Definition: common.c:23
UCHAR VidpTextColor
Definition: common.c:5
ULONG VidpCurrentY
Definition: common.c:8
ULONG RGBQUAD
Definition: precomp.h:50
ULONG VidpCurrentX
Definition: common.c:7
#define BOOTCHAR_HEIGHT
Definition: precomp.h:27
ULONG VidpScrollRegion[4]
Definition: common.c:10
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define BV_MAX_COLORS
Definition: display.h:32
ULONG biClrImportant
Definition: precomp.h:43
USHORT biBitCount
Definition: precomp.h:37
LONG biYPelsPerMeter
Definition: precomp.h:41
ULONG biCompression
Definition: precomp.h:38
LONG biXPelsPerMeter
Definition: precomp.h:40
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181