ReactOS 0.4.15-dev-8241-g63935f8
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#ifndef _BOOTVID_PCH_
11#define _BOOTVID_PCH_
12
13#include <ntifs.h>
14#include <ndk/halfuncs.h>
16
17/* Arch specific includes */
18#if defined(_M_IX86) || defined(_M_AMD64)
19#if defined(SARCH_PC98)
20#include "i386/pc98/pc98.h"
21#elif defined(SARCH_XBOX)
22#include "i386/xbox/xbox.h"
23#else
24#include "i386/pc/vga.h"
25#include "i386/pc/pc.h"
26#endif
27#elif defined(_M_ARM)
28#include "arm/arm.h"
29#else
30#error Unknown architecture
31#endif
32
33/* Define if FontData has upside down characters */
34#undef CHAR_GEN_UPSIDE_DOWN
35
36#define BOOTCHAR_HEIGHT 13
37#define BOOTCHAR_WIDTH 8 // Each character line is encoded in a UCHAR.
38
39/* Bitmap Header */
40typedef struct tagBITMAPINFOHEADER
41{
54
55/* Supported bitmap compression formats */
56#define BI_RGB 0
57#define BI_RLE4 2
58
59typedef ULONG RGBQUAD;
60
61/*
62 * Globals
63 */
64extern UCHAR VidpTextColor;
65extern ULONG VidpCurrentX;
66extern ULONG VidpCurrentY;
67extern ULONG VidpScrollRegion[4];
70
71#define RGB(r, g, b) ((RGBQUAD)(((UCHAR)(b) | ((USHORT)((UCHAR)(g))<<8)) | (((ULONG)(UCHAR)(r))<<16)))
72
73#define GetRValue(quad) ((UCHAR)(((quad)>>16) & 0xFF))
74#define GetGValue(quad) ((UCHAR)(((quad)>>8) & 0xFF))
75#define GetBValue(quad) ((UCHAR)((quad) & 0xFF))
76
77#define InitializePalette() InitPaletteWithTable((PULONG)VidpDefaultPalette, BV_MAX_COLORS)
78
79#ifdef CHAR_GEN_UPSIDE_DOWN
80# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1)
81# define FONT_PTR_DELTA (-1)
82#else
83# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT])
84# define FONT_PTR_DELTA (1)
85#endif
86
87#endif /* _BOOTVID_PCH_ */
struct tagBITMAPINFOHEADER * PBITMAPINFOHEADER
UCHAR VidpFontData[256 *BOOTCHAR_HEIGHT]
Definition: fontdata.c:16
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
const RGBQUAD VidpDefaultPalette[BV_MAX_COLORS]
Definition: common.c:32
UCHAR VidpTextColor
Definition: common.c:14
ULONG VidpCurrentY
Definition: common.c:17
ULONG RGBQUAD
Definition: precomp.h:59
ULONG VidpCurrentX
Definition: common.c:16
#define BOOTCHAR_HEIGHT
Definition: precomp.h:36
ULONG VidpScrollRegion[4]
Definition: common.c:19
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:52
USHORT biBitCount
Definition: precomp.h:46
LONG biYPelsPerMeter
Definition: precomp.h:50
ULONG biCompression
Definition: precomp.h:47
LONG biXPelsPerMeter
Definition: precomp.h:49
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181