diff options
-rw-r--r-- | engines/adl/display.cpp | 10 | ||||
-rw-r--r-- | engines/adl/display.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp index 7283777fe3..fc20082b44 100644 --- a/engines/adl/display.cpp +++ b/engines/adl/display.cpp @@ -39,9 +39,6 @@ namespace Adl { // This implements the Apple II "Hi-Res" display mode -#define DISPLAY_PITCH (DISPLAY_WIDTH / 7) -#define DISPLAY_SIZE (DISPLAY_PITCH * DISPLAY_HEIGHT) - #define TEXT_BUF_SIZE (TEXT_WIDTH * TEXT_HEIGHT) #define COLOR_PALETTE_ENTRIES 8 @@ -201,8 +198,7 @@ bool Display::saveThumbnail(Common::WriteStream &out) { return retval; } -void Display::loadFrameBuffer(Common::ReadStream &stream) { - byte *dst = _frameBuf; +void Display::loadFrameBuffer(Common::ReadStream &stream, byte *dst) { for (uint j = 0; j < 8; ++j) { for (uint i = 0; i < 8; ++i) { stream.read(dst, DISPLAY_PITCH); @@ -221,6 +217,10 @@ void Display::loadFrameBuffer(Common::ReadStream &stream) { error("Failed to read frame buffer"); } +void Display::loadFrameBuffer(Common::ReadStream &stream) { + loadFrameBuffer(stream, _frameBuf); +} + void Display::putPixel(const Common::Point &p, byte color) { byte offset = p.x / 7; byte mask = 0x80 | (1 << (p.x % 7)); diff --git a/engines/adl/display.h b/engines/adl/display.h index 311a05893c..da083e85b7 100644 --- a/engines/adl/display.h +++ b/engines/adl/display.h @@ -40,6 +40,8 @@ namespace Adl { #define DISPLAY_WIDTH 280 #define DISPLAY_HEIGHT 192 +#define DISPLAY_PITCH (DISPLAY_WIDTH / 7) +#define DISPLAY_SIZE (DISPLAY_PITCH * DISPLAY_HEIGHT) #define TEXT_WIDTH 40 #define TEXT_HEIGHT 24 @@ -62,6 +64,7 @@ public: bool saveThumbnail(Common::WriteStream &out); // Graphics + static void loadFrameBuffer(Common::ReadStream &stream, byte *dst); void loadFrameBuffer(Common::ReadStream &stream); void putPixel(const Common::Point &p, byte color); void setPixelBit(const Common::Point &p, byte color); |