22 #include "adl/display.h" 24 #ifndef ADL_DISPLAY_A2_H 25 #define ADL_DISPLAY_A2_H 37 kGfxPitch = kGfxWidth / 7,
38 kGfxSize = kGfxPitch * kGfxHeight,
47 uint getGfxWidth()
const {
return kGfxWidth; }
48 uint getGfxHeight()
const {
return kGfxHeight; }
49 uint getGfxPitch()
const {
return kGfxPitch; }
58 void clear(byte color);
61 char asciiToNative(
char c)
const override {
return c | 0x80; }
62 void printChar(
char c)
override;
63 void showCursor(
bool enable)
override;
68 static uint16 getBits(
const Display_A2 *display, uint y, uint x) {
69 const uint charPos = (y >> 3) * kTextWidth + x;
70 byte m = display->_textBuf[charPos];
71 byte b = _font[m & 0x3f][y % 8];
73 if (display->_showCursor && charPos == display->_cursorPos) {
74 if (!display->_enableApple2eCursor) {
75 m = (m & 0x3f) | 0x40;
77 if (display->_blink) {
79 0x00, 0x00, 0x2a, 0x14,
80 0x2a, 0x14, 0x2a, 0x00
88 if (!(m & 0x80) && (!(m & 0x40) || display->_blink))
94 static uint8 getStartY(
const Display_A2 *display) {
95 if (display->_mode == kModeText)
98 return kGfxHeight - kSplitHeight;
101 static uint8 getEndY(
const Display_A2 *display) {
return kGfxHeight; }
106 static uint16 getBits(
const Display_A2 *display, uint y, uint x) {
107 return display->_frameBuf[y * kGfxPitch + x];
110 static uint8 getStartY(
const Display_A2 *display) {
return 0; }
112 static uint8 getEndY(
const Display_A2 *display) {
113 if (display->_mode == kModeGraphics)
116 return kGfxHeight - kSplitHeight;
123 bool _enableScanlines;
124 bool _enableMonoText;
125 bool _enableApple2eCursor;
129 void writeFrameBuffer(
const Common::Point &p, byte color, byte mask);
131 static const byte _font[64][8];
Definition: display_a2.h:29
Definition: display_a2.h:104
Definition: display_a2.h:66