vgabios: Rewrite vgafb.c graphics operations to set of 4 standard operators.

The vgabios graphics manipulations can all be implemented on top of 4
basic primitives: read 8 pixels, write 8 pixels, move pixels, and
clear pixels.  Implement these four operators for all the graphics
modes and rewrite the graphics functions in vgafb.c to use them.  This
simplifies the graphics code as the high level logic no longer needs
to be implemented for each graphical framebuffer type.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/vgasrc/vgabios.h b/vgasrc/vgabios.h
index de6ae59..645e0e2 100644
--- a/vgasrc/vgabios.h
+++ b/vgasrc/vgabios.h
@@ -56,6 +56,28 @@
     u16 sstart;
 };
 
+// Graphics pixel operations.
+struct gfx_op {
+    struct vgamode_s *vmode_g;
+    u32 linelength;
+
+    u8 op;
+    u16 x, y;
+
+    u8 pixels[8];
+    u16 xlen, ylen;
+    u16 srcy;
+};
+
+#define GO_READ8   1
+#define GO_WRITE8  2
+#define GO_MEMSET  3
+#define GO_MEMMOVE 4
+
+// Debug settings
+#define DEBUG_VGA_POST 1
+#define DEBUG_VGA_10 3
+
 // vgafonts.c
 extern u8 vgafont8[];
 extern u8 vgafont14[];
@@ -63,10 +85,6 @@
 extern u8 vgafont14alt[];
 extern u8 vgafont16alt[];
 
-// Debug settings
-#define DEBUG_VGA_POST 1
-#define DEBUG_VGA_10 3
-
 // vgainit.c
 extern struct VideoSavePointer_s video_save_pointer_table;