ReactOS 0.4.16-dev-2204-g370eb8c
precomp.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Boot Video Driver
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Precompiled header
5 * COPYRIGHT: Copyright 2007 Alex Ionescu <alex.ionescu@reactos.org>
6 * Copyright 2020 Dmitry Borisov <di.sean@protonmail.com>
7 * Copyright 2020 Stanislav Motylkov <x86corez@gmail.com>
8 */
9
10#pragma once
11
12#include <ntifs.h>
13#include <ndk/halfuncs.h>
15
16/* Module-specific header */
17#ifdef MODULE_HEADER
18#include MODULE_HEADER
19#endif
20
21/* Define if FontData has upside-down characters */
22#undef CHAR_GEN_UPSIDE_DOWN
23
24#define BOOTCHAR_HEIGHT 13
25#define BOOTCHAR_WIDTH 8 // Each character line is encoded in a UCHAR.
26
27/* Bitmap Header */
28typedef struct tagBITMAPINFOHEADER
29{
42
43/* Supported bitmap compression formats */
44#define BI_RGB 0
45#define BI_RLE4 2
46
47typedef ULONG RGBQUAD;
48
49typedef struct _URECT
50{
56
57/*
58 * Globals
59 */
60extern UCHAR VidpTextColor;
61extern ULONG VidpCurrentX;
62extern ULONG VidpCurrentY;
64extern const UCHAR VidpFontData[256 * BOOTCHAR_HEIGHT];
66
67#define RGB(r, g, b) ((RGBQUAD)(((UCHAR)(b) | ((USHORT)((UCHAR)(g))<<8)) | (((ULONG)(UCHAR)(r))<<16)))
68
69#define GetRValue(quad) ((UCHAR)(((quad)>>16) & 0xFF))
70#define GetGValue(quad) ((UCHAR)(((quad)>>8) & 0xFF))
71#define GetBValue(quad) ((UCHAR)((quad) & 0xFF))
72
73#define InitializePalette() InitPaletteWithTable((PULONG)VidpDefaultPalette, BV_MAX_COLORS)
74
75#ifdef CHAR_GEN_UPSIDE_DOWN
76# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1)
77# define FONT_PTR_DELTA (-1)
78#else
79# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT])
80# define FONT_PTR_DELTA (1)
81#endif
82
83
84VOID
86 _In_ ULONG CurrentTop,
87 _In_ ULONG TopDelta,
88 _In_ BOOLEAN Restore);
89
90VOID
92 _In_ ULONG Scroll);
93
94VOID
96 _In_ CHAR Character,
97 _In_ ULONG Left,
99 _In_ ULONG TextColor,
100 _In_ ULONG BackColor);
101
102VOID
104 _In_ BOOLEAN SetMode);
unsigned char BOOLEAN
static LPHIST_ENTRY Top
Definition: history.c:53
struct tagBITMAPINFOHEADER * PBITMAPINFOHEADER
VOID PreserveRow(_In_ ULONG CurrentTop, _In_ ULONG TopDelta, _In_ BOOLEAN Restore)
Definition: bootvid.c:159
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
const RGBQUAD VidpDefaultPalette[BV_MAX_COLORS]
Definition: common.c:19
const UCHAR VidpFontData[256 *BOOTCHAR_HEIGHT]
Definition: fontdata.c:16
UCHAR VidpTextColor
Definition: console.c:14
ULONG VidpCurrentY
Definition: console.c:16
VOID ResetDisplay(_In_ BOOLEAN SetMode)
Definition: bootvid.c:263
ULONG RGBQUAD
Definition: precomp.h:47
ULONG VidpCurrentX
Definition: console.c:15
URECT VidpScrollRegion
Definition: console.c:17
VOID DisplayCharacter(_In_ CHAR Character, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG TextColor, _In_ ULONG BackColor)
Definition: bootvid.c:67
VOID DoScroll(_In_ ULONG Scroll)
Definition: bootvid.c:112
#define BOOTCHAR_HEIGHT
Definition: precomp.h:24
struct _URECT URECT
#define _In_
Definition: no_sal2.h:158
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define BV_MAX_COLORS
Definition: display.h:32
Definition: precomp.h:50
ULONG Right
Definition: precomp.h:53
ULONG Top
Definition: precomp.h:52
ULONG Bottom
Definition: precomp.h:54
ULONG Left
Definition: precomp.h:51
ULONG biClrImportant
Definition: precomp.h:40
USHORT biBitCount
Definition: precomp.h:34
LONG biYPelsPerMeter
Definition: precomp.h:38
ULONG biCompression
Definition: precomp.h:35
LONG biXPelsPerMeter
Definition: precomp.h:37
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175