47 class GraphicsAdapter {
51 enum class Emulation {
53 PC_Text_80x25_16Colors,
54 PC_Text_40x25_16Colors,
55 PC_Graphics_320x200_4Colors,
56 PC_Graphics_640x200_2Colors,
57 PC_Graphics_HGC_720x348,
64 void setEmulation(Emulation emulation);
65 Emulation emulation() {
return m_emulation; }
67 void setVideoBuffer(
void const * videoBuffer);
70 void setCursorShape(
int start,
int end);
71 void setCursorPos(
int row,
int column);
72 void setCursorVisible(
bool value) { m_cursorVisible = value; }
73 void setBit7Blink(
bool value) { m_bit7blink = value; }
74 int getTextColumns() {
return m_columns; }
75 int getTextRows() {
return m_rows; }
78 void setPCGraphicsBackgroundColorIndex(
int colorIndex);
79 void setPCGraphicsForegroundColorIndex(
int colorIndex);
80 void setPCGraphicsPaletteInUse(
int paletteIndex);
81 int getGraphWidth() {
return m_VGADCtrl.getViewPortWidth(); }
82 int getGraphHeight() {
return m_VGADCtrl.getViewPortHeight(); }
84 bool VSync() {
return m_VGADCtrl.VSync(); }
94 void setFont(FontInfo
const * font);
96 void createCursorGlyph(
int width,
int height,
int start,
int end);
98 static void drawScanline_PC_Text_80x25_16Colors(
void * arg, uint8_t * dest,
int scanLine);
99 static void drawScanline_PC_Text_40x25_16Colors(
void * arg, uint8_t * dest,
int scanLine);
100 static void drawScanline_PC_Graphics_320x200_4Colors(
void * arg, uint8_t * dest,
int scanLine);
101 static void drawScanline_PC_Graphics_640x200_2Colors(
void * arg, uint8_t * dest,
int scanLine);
102 static void drawScanline_PC_Graphics_HGC_720x348(
void * arg, uint8_t * dest,
int scanLine);
105 VGADirectController m_VGADCtrl;
106 Emulation m_emulation;
107 uint8_t
const * m_videoBuffer;
111 uint32_t m_frameCounter;
119 uint8_t m_cursorStart;
121 bool m_cursorVisible;
122 uint8_t * m_cursorGlyph;
126 int8_t m_PCGraphicsBackgroundColorIndex;
127 int8_t m_PCGraphicsForegroundColorIndex;
128 int8_t m_PCGraphicsPaletteInUse;
This file is the all in one include file. Application can just include this file to use FabGL library...