aboutsummaryrefslogtreecommitdiffstats
path: root/UefiMonitorTest/UefiMonitorTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiMonitorTest/UefiMonitorTest.c')
-rw-r--r--UefiMonitorTest/UefiMonitorTest.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c
index 3eb7323..1b6e026 100644
--- a/UefiMonitorTest/UefiMonitorTest.c
+++ b/UefiMonitorTest/UefiMonitorTest.c
@@ -11,6 +11,7 @@
#include <Protocol/GraphicsOutput.h>
#include "UefiMonitorTest.h"
+#include "fonts/System-8x16.h"
#define SWAP(A, B, C) \
C = A; \
@@ -305,6 +306,35 @@ PutRect (
}
}
+/**
+ Draws a character to the screen
+
+ @retval VOID
+**/
+STATIC
+VOID
+DrawChar (
+ IN GRAPHICS_CONTEXT *Graphics,
+ IN UINTN X,
+ IN UINTN Y,
+ IN UINT32 Icolor,
+ IN CHAR16 Char
+ )
+{
+ UINTN Index;
+ UINTN l, c;
+
+ Index = Char * (SYSTEM8X16_FONT_WIDTH * SYSTEM8X16_FONT_HEIGHT) - (SYSTEM8X16_FONT_WIDTH * SYSTEM8X16_FONT_HEIGHT);
+ for (l = 0; l < SYSTEM8X16_FONT_HEIGHT; l++) {
+ for (c = 0; c < SYSTEM8X16_FONT_WIDTH; c++) {
+ if (gFontSystem8x16[Index] == 1) {
+ PUT_PUXEL (Graphics, (X + c), (Y + l), Icolor);
+ }
+ Index++;
+ }
+ }
+}
+
STATIC
EFI_STATUS
Run (