diff options
-rw-r--r-- | engines/adl/display.cpp | 12 | ||||
-rw-r--r-- | engines/adl/display.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp index fc20082b44..52fb1b44d7 100644 --- a/engines/adl/display.cpp +++ b/engines/adl/display.cpp @@ -241,6 +241,12 @@ void Display::putPixel(const Common::Point &p, byte color) { writeFrameBuffer(p, color, mask); } +void Display::setPixelByte(const Common::Point &p, byte color) { + assert(p.x >= 0 && p.x < DISPLAY_WIDTH && p.y >= 0 && p.y < DISPLAY_HEIGHT); + + _frameBuf[p.y * DISPLAY_PITCH + p.x / 7] = color; +} + void Display::setPixelBit(const Common::Point &p, byte color) { writeFrameBuffer(p, color, 1 << (p.x % 7)); } @@ -249,6 +255,12 @@ void Display::setPixelPalette(const Common::Point &p, byte color) { writeFrameBuffer(p, color, 0x80); } +byte Display::getPixelByte(const Common::Point &p) const { + assert(p.x >= 0 && p.x < DISPLAY_WIDTH && p.y >= 0 && p.y < DISPLAY_HEIGHT); + + return _frameBuf[p.y * DISPLAY_PITCH + p.x / 7]; +} + bool Display::getPixelBit(const Common::Point &p) const { assert(p.x >= 0 && p.x < DISPLAY_WIDTH && p.y >= 0 && p.y < DISPLAY_HEIGHT); diff --git a/engines/adl/display.h b/engines/adl/display.h index da083e85b7..c1c0f410fe 100644 --- a/engines/adl/display.h +++ b/engines/adl/display.h @@ -67,8 +67,10 @@ public: static void loadFrameBuffer(Common::ReadStream &stream, byte *dst); void loadFrameBuffer(Common::ReadStream &stream); void putPixel(const Common::Point &p, byte color); + void setPixelByte(const Common::Point &p, byte color); void setPixelBit(const Common::Point &p, byte color); void setPixelPalette(const Common::Point &p, byte color); + byte getPixelByte(const Common::Point &p) const; bool getPixelBit(const Common::Point &p) const; void clear(byte color); |