mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
Added color-inversion effect in character selection screen. The effect doesn't exactly work like the original yet (Amiga only).
svn-id: r29372
This commit is contained in:
parent
10c0f9de86
commit
1ea0b305a5
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user