49class GraphicsAdapter {
53 enum class Emulation {
55 PC_Text_40x25_16Colors,
56 PC_Text_80x25_16Colors,
57 PC_Graphics_320x200_4Colors,
58 PC_Graphics_640x200_2Colors,
59 PC_Graphics_HGC_720x348,
66 void setEmulation(Emulation emulation);
67 Emulation emulation() {
return m_emulation; }
69 bool enableVideo(
bool value);
71 void setVideoBuffer(
void const * videoBuffer);
74 void setCursorShape(
int start,
int end);
75 void setCursorPos(
int row,
int column);
76 void setCursorVisible(
bool value) { m_cursorVisible = value; }
77 void setBit7Blink(
bool value) { m_bit7blink = value; }
78 int getTextColumns() {
return m_columns; }
79 int getTextRows() {
return m_rows; }
82 void setPCGraphicsBackgroundColorIndex(
int colorIndex);
83 void setPCGraphicsForegroundColorIndex(
int colorIndex);
84 void setPCGraphicsPaletteInUse(
int paletteIndex);
85 int getGraphWidth() {
return m_VGADCtrl.getViewPortWidth(); }
86 int getGraphHeight() {
return m_VGADCtrl.getViewPortHeight(); }
88 bool VSync() {
return m_VGADCtrl.VSync(); }
98 void setFont(FontInfo
const * font);
100 void createCursorGlyph(
int width,
int height,
int start,
int end);
102 void setupEmulation(Emulation emulation);
104 static void drawScanline_PC_Text_80x25_16Colors(
void * arg, uint8_t * dest,
int scanLine);
105 static void drawScanline_PC_Text_40x25_16Colors(
void * arg, uint8_t * dest,
int scanLine);
106 static void drawScanline_PC_Graphics_320x200_4Colors(
void * arg, uint8_t * dest,
int scanLine);
107 static void drawScanline_PC_Graphics_640x200_2Colors(
void * arg, uint8_t * dest,
int scanLine);
108 static void drawScanline_PC_Graphics_HGC_720x348(
void * arg, uint8_t * dest,
int scanLine);
111 VGADirectController m_VGADCtrl;
112 Emulation m_emulation;
113 uint8_t
const * m_videoBuffer;
117 uint32_t m_frameCounter;
125 uint8_t m_cursorStart;
127 bool m_cursorVisible;
128 uint8_t * m_cursorGlyph;
132 int8_t m_PCGraphicsBackgroundColorIndex;
133 int8_t m_PCGraphicsForegroundColorIndex;
134 int8_t m_PCGraphicsPaletteInUse;
This file is the all in one include file. Application can just include this file to use FabGL library...