aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/display.h
diff options
context:
space:
mode:
authorWalter van Niftrik2016-03-04 16:12:11 +0100
committerWalter van Niftrik2016-03-09 10:03:13 +0100
commit4f7e5da4dad61f11553e5f51f00d33506b9ef342 (patch)
tree8351d502ccbd0fb35c6fdcae9a2e7b5e909302fc /engines/adl/display.h
parentd5cc42f1c233a45abb879818af503ec7b91c6f34 (diff)
downloadscummvm-rg350-4f7e5da4dad61f11553e5f51f00d33506b9ef342.tar.gz
scummvm-rg350-4f7e5da4dad61f11553e5f51f00d33506b9ef342.tar.bz2
scummvm-rg350-4f7e5da4dad61f11553e5f51f00d33506b9ef342.zip
ADL: Clean up Display class
Diffstat (limited to 'engines/adl/display.h')
-rw-r--r--engines/adl/display.h46
1 files changed, 22 insertions, 24 deletions
diff --git a/engines/adl/display.h b/engines/adl/display.h
index 0452b2768f..70dc42df63 100644
--- a/engines/adl/display.h
+++ b/engines/adl/display.h
@@ -24,7 +24,6 @@
#define ADL_DISPLAY_H
#include <common/types.h>
-#include <common/array.h>
namespace Common {
class ReadStream;
@@ -39,6 +38,9 @@ class Surface;
namespace Adl {
+#define DISPLAY_WIDTH 280
+#define DISPLAY_HEIGHT 192
+
#define APPLECHAR(C) ((char)((C) | 0x80))
class Display {
@@ -51,17 +53,20 @@ public:
Display();
~Display();
- void enableScanlines(bool enable);
- void setMonoPalette();
- void setColorPalette();
+
+ void setMode(Mode mode) { _mode = mode; }
+ void updateScreen();
+ bool saveThumbnail(Common::WriteStream &out);
+
+ // Graphics
void loadFrameBuffer(Common::ReadStream &stream);
void decodeFrameBuffer();
- void updateScreen();
- void setMode(Mode mode) { _mode = mode; }
void putPixel(Common::Point p1, byte color);
void clear(byte color);
- void setCursorPos(Common::Point pos);
+ // Text
+ void updateTextSurface();
+ void setCursorPos(Common::Point pos);
void home();
void moveCursorTo(const Common::Point &pos);
void moveCursorForward();
@@ -69,40 +74,33 @@ public:
void printString(const Common::String &str);
void setCharAtCursor(byte c);
void showCursor(bool enable);
- void updateTextSurface();
- bool saveThumbnail(Common::WriteStream &out);
private:
enum {
- kWidth = 280,
- kHeight = 192,
kTextBufSize = 40 * 24
};
- struct PixelPos {
- uint16 rowAddr;
- byte byteOffset;
- byte bitMask;
- };
+ void enableScanlines(bool enable);
+ void decodeScanlineColor(byte *dst, int pitch, byte *src) const;
+ void decodeScanlineMono(byte *dst, int pitch, byte *src) const;
+ void decodeScanline(byte *dst, int pitch, byte *src) const;
- void decodeScanline(byte *dst, int pitch, byte *src);
- void decodeScanlineColor(byte *dst, int pitch, byte *src);
- void decodeScanlineMono(byte *dst, int pitch, byte *src);
void drawChar(byte c, int x, int y);
void createFont();
-
void scrollUp();
- bool _scanlines;
+ Mode _mode;
+
byte *_frameBuf;
- byte *_textBuf;
Graphics::Surface *_frameBufSurface;
+ bool _scanlines;
+ bool _monochrome;
+
+ byte *_textBuf;
Graphics::Surface *_textBufSurface;
Graphics::Surface *_font;
int _cursorPos;
- Mode _mode;
bool _showCursor;
- bool _monochrome;
};
} // End of namespace Adl