diff options
-rw-r--r-- | engines/parallaction/graphics.cpp | 15 | ||||
-rw-r--r-- | engines/parallaction/graphics.h | 1 | ||||
-rw-r--r-- | engines/parallaction/gui_ns.cpp | 7 |
3 files changed, 22 insertions, 1 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index bd4e094156..a60f272ca8 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -334,6 +334,21 @@ void Gfx::floodFill(Gfx::Buffers buffer, const Common::Rect& r, byte color) { return; } +void Gfx::invertRect(Gfx::Buffers buffer, const Common::Rect& r) { + + byte *d = (byte*)_buffers[buffer]->getBasePtr(r.left, r.top); + + for (int i = 0; i < r.height(); i++) { + for (int j = 0; j < r.width(); j++) { + *d ^= 0x1F; + d++; + } + + d += (_buffers[buffer]->pitch - r.width()); + } + +} + void Gfx::screenClip(Common::Rect& r, Common::Point& p) { int32 x = r.left; diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index 9f1101efa2..8a0779144a 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -238,6 +238,7 @@ public: void copyRect(Gfx::Buffers dstbuffer, const Common::Rect& r, byte *src, uint16 pitch); void grabRect(byte *dst, const Common::Rect& r, Gfx::Buffers srcbuffer, uint16 pitch); void floodFill(Gfx::Buffers buffer, const Common::Rect& r, byte color); + void invertRect(Gfx::Buffers buffer, const Common::Rect& r); // palette void setPalette(Palette palette); diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index 21c1f87787..3909761501 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -350,8 +350,13 @@ int Parallaction_ns::guiGetSelectedBlock(const Common::Point &p) { } } - if (selection != -1) { + if ((selection != -1) && (getPlatform() == Common::kPlatformAmiga)) { + _gfx->invertRect(Gfx::kBitFront, codeTrueBlocks[selection]); + _gfx->updateScreen(); beep(); + g_system->delayMillis(100); + _gfx->invertRect(Gfx::kBitFront, codeTrueBlocks[selection]); + _gfx->updateScreen(); } return selection; |