aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2007-11-01 21:56:14 +0000
committerNicola Mettifogo2007-11-01 21:56:14 +0000
commit1ea0b305a533b1ad8cbab9489f1ae1b6247b860b (patch)
tree3965c85b0e373123601993f62051e59db951a0d9
parent10c0f9de8667844ff25d24d7a1c813346c0b5991 (diff)
downloadscummvm-rg350-1ea0b305a533b1ad8cbab9489f1ae1b6247b860b.tar.gz
scummvm-rg350-1ea0b305a533b1ad8cbab9489f1ae1b6247b860b.tar.bz2
scummvm-rg350-1ea0b305a533b1ad8cbab9489f1ae1b6247b860b.zip
Added color-inversion effect in character selection screen. The effect doesn't exactly work like the original yet (Amiga only).
svn-id: r29372
-rw-r--r--engines/parallaction/graphics.cpp15
-rw-r--r--engines/parallaction/graphics.h1
-rw-r--r--engines/parallaction/gui_ns.cpp7
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;