[Scummvm-git-logs] scummvm master -> 7c6973ed8a6c3f19d923c84d4f5dc78aa83998fa
athrxx
noreply at scummvm.org
Fri Jul 29 16:12:54 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7c6973ed8a SCUMM: (LOOM/VGA) - fix dissolve effect for EGA dithering mode
Commit: 7c6973ed8a6c3f19d923c84d4f5dc78aa83998fa
https://github.com/scummvm/scummvm/commit/7c6973ed8a6c3f19d923c84d4f5dc78aa83998fa
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-29T18:11:55+02:00
Commit Message:
SCUMM: (LOOM/VGA) - fix dissolve effect for EGA dithering mode
Changed paths:
engines/scumm/gfx.cpp
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 7d8a1ab97ee..077f14b7a4b 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -973,7 +973,7 @@ const byte *ScummEngine::ditherVGAtoEGA(int &pitch, int &x, int &y, int &width,
uint8 *dst1 = _hercCGAScaleBuf + pitch;
uint8 *src = _compositeBuf;
- for (int i = height, st = 1; i; --i, st ^= 1) {
+ for (int i = height, st = 1 ^ (y & 1); i; --i, st ^= 1) {
for (int ii = width; ii; --ii) {
byte in = *src++;
*dst0++ = *dst1++ = _egaColorMap[st][in];
@@ -4272,10 +4272,20 @@ void ScummEngine::dissolveEffect(int width, int height) {
int wd = width;
int ht = height;
- if (_enableEGADithering)
+ if (_enableEGADithering) {
+ if (width == 1 && height == 1) {
+ *_compositeBuf = *src;
+ } else {
+ for (int i = 0; i < height; ++i) {
+ memcpy(_compositeBuf + width * i, src, width);
+ src += pitch;
+ }
+ }
+ pitch = width;
src = ditherVGAtoEGA(pitch, x, y, wd, ht);
+ }
- _system->copyRectToScreen(src, vs->pitch, x, y, wd, ht);
+ _system->copyRectToScreen(src, pitch, x, y, wd, ht);
}
// Test for 1x1 pattern...
More information about the Scummvm-git-logs
mailing list