aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--UefiMonitorTest/Graphics.c19
-rw-r--r--UefiMonitorTest/Graphics.h22
-rw-r--r--UefiMonitorTest/UefiMonitorTest.c35
3 files changed, 41 insertions, 35 deletions
diff --git a/UefiMonitorTest/Graphics.c b/UefiMonitorTest/Graphics.c
index ce0b757..0570dd8 100644
--- a/UefiMonitorTest/Graphics.c
+++ b/UefiMonitorTest/Graphics.c
@@ -33,6 +33,25 @@ CONST EFI_PIXEL_BITMASK mBgrPixelMasks = {
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
};
+CONST GRAPHICS_PIXEL_COLOR gUmtColors[UMT_COLOR_END] = {
+ { 0x00, 0x00, 0x00, 0x00 },
+ { 0xFF, 0xFF, 0xFF, 0x00 },
+ { 0x00, 0x00, 0xFF, 0x00 },
+ { 0x00, 0xFF, 0x00, 0x00 },
+ { 0xFF, 0x00, 0x00, 0x00 },
+ { 0x00, 0xFF, 0xFF, 0x00 },
+ { 0xFF, 0xFF, 0x00, 0x00 },
+ { 0xFF, 0x00, 0xFF, 0x00 },
+ { 0xC0, 0xC0, 0xC0, 0x00 },
+ { 0x80, 0x80, 0x80, 0x00 },
+ { 0x00, 0x00, 0x80, 0x00 },
+ { 0x00, 0x80, 0x80, 0x00 },
+ { 0x00, 0x80, 0x00, 0x00 },
+ { 0x80, 0x00, 0x80, 0x00 },
+ { 0x80, 0x80, 0x00, 0x00 },
+ { 0x80, 0x00, 0x00, 0x00 }
+};
+
STATIC
VOID
ParseGraphicsPixelFormat (
diff --git a/UefiMonitorTest/Graphics.h b/UefiMonitorTest/Graphics.h
index 44c72aa..503a222 100644
--- a/UefiMonitorTest/Graphics.h
+++ b/UefiMonitorTest/Graphics.h
@@ -79,6 +79,28 @@ typedef struct {
EFI_SIMPLE_POINTER_PROTOCOL *MouseInterface;
} GRAPHICS_CONTEXT;
+enum UMT_COLORS {
+ UMT_COLOR_BLACK = 0,
+ UMT_COLOR_WHITE,
+ UMT_COLOR_RED,
+ UMT_COLOR_LIME,
+ UMT_COLOR_BLUE,
+ UMT_COLOR_YELLOW,
+ UMT_COLOR_AQUA,
+ UMT_COLOR_MAGENTA,
+ UMT_COLOR_SILVER,
+ UMT_COLOR_GRAY,
+ UMT_COLOR_MAROON,
+ UMT_COLOR_OLIVE,
+ UMT_COLOR_GREEN,
+ UMT_COLOR_PURPLE,
+ UMT_COLOR_TEAL,
+ UMT_COLOR_NAVY,
+ UMT_COLOR_END
+};
+
+extern CONST GRAPHICS_PIXEL_COLOR gUmtColors[];
+
EFI_STATUS
PrepareGraphicsInfo (
IN GRAPHICS_CONTEXT *Graphics,
diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c
index 1fadfca..09923a1 100644
--- a/UefiMonitorTest/UefiMonitorTest.c
+++ b/UefiMonitorTest/UefiMonitorTest.c
@@ -7,41 +7,6 @@
#include "UefiMonitorTest.h"
-#define UMT_COLOR_BLACK 0
-#define UMT_COLOR_WHITE 1
-#define UMT_COLOR_RED 2
-#define UMT_COLOR_LIME 3
-#define UMT_COLOR_BLUE 4
-#define UMT_COLOR_YELLOW 5
-#define UMT_COLOR_AQUA 6
-#define UMT_COLOR_MAGENTA 7
-#define UMT_COLOR_SILVER 8
-#define UMT_COLOR_GRAY 9
-#define UMT_COLOR_MAROON 10
-#define UMT_COLOR_OLIVE 11
-#define UMT_COLOR_GREEN 12
-#define UMT_COLOR_PURPLE 13
-#define UMT_COLOR_TEAL 14
-#define UMT_COLOR_NAVY 15
-
-STATIC GRAPHICS_PIXEL_COLOR mColors[16] = {
- { 0x00, 0x00, 0x00, 0x00 },
- { 0xFF, 0xFF, 0xFF, 0x00 },
- { 0x00, 0x00, 0xFF, 0x00 },
- { 0x00, 0xFF, 0x00, 0x00 },
- { 0xFF, 0x00, 0x00, 0x00 },
- { 0x00, 0xFF, 0xFF, 0x00 },
- { 0xFF, 0xFF, 0x00, 0x00 },
- { 0xFF, 0x00, 0xFF, 0x00 },
- { 0xC0, 0xC0, 0xC0, 0x00 },
- { 0x80, 0x80, 0x80, 0x00 },
- { 0x00, 0x00, 0x80, 0x00 },
- { 0x00, 0x80, 0x80, 0x00 },
- { 0x00, 0x80, 0x00, 0x00 },
- { 0x80, 0x00, 0x80, 0x00 },
- { 0x80, 0x80, 0x00, 0x00 },
- { 0x80, 0x00, 0x00, 0x00 }
-};
STATIC
EFI_GRAPHICS_OUTPUT_PROTOCOL *