[Scummvm-git-logs] scummvm master -> cfa0654ce80c6dff7b765e752a29e5d0ab3da65c
athrxx
athrxx at scummvm.org
Mon May 24 02:15:12 UTC 2021
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:
cfa0654ce8 SCUMM: (FM-TOWNS) - fix for builds w/o USE_RGBCOLOR
Commit: cfa0654ce80c6dff7b765e752a29e5d0ab3da65c
https://github.com/scummvm/scummvm/commit/cfa0654ce80c6dff7b765e752a29e5d0ab3da65c
Author: athrxx (athrxx at scummvm.org)
Date: 2021-05-24T04:13:23+02:00
Commit Message:
SCUMM: (FM-TOWNS) - fix for builds w/o USE_RGBCOLOR
These changes are currently pointless, since the affected function variants won't be called. The Japanese game versions for which they would be used are not supported in non-USE_RGBCOLOR builds. But the code should be correct nonetheless...
Changed paths:
engines/scumm/gfx_towns.cpp
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index 8a046052ad..39a464bee9 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -641,6 +641,7 @@ template void TownsScreen::transferRect<uint16, uint16, 2, 2, false>(uint8 *dst,
template void TownsScreen::transferRect<uint16, uint8, 1, 1, true>(uint8 *dst, TownsScreenLayer *l, int x, int y, int w, int h);
#else
template void TownsScreen::transferRect<uint8, uint8, 2, 2, false>(uint8 *dst, TownsScreenLayer *l, int x, int y, int w, int h);
+//template void TownsScreen::transferRect<uint8, uint8, 2, 2, true>(uint8 *dst, TownsScreenLayer *l, int x, int y, int w, int h);
template void TownsScreen::transferRect<uint8, uint8, 1, 1, false>(uint8 *dst, TownsScreenLayer *l, int x, int y, int w, int h);
template void TownsScreen::transferRect<uint8, uint8, 1, 1, true>(uint8 *dst, TownsScreenLayer *l, int x, int y, int w, int h);
#endif
@@ -672,8 +673,9 @@ template<typename dstPixelType> void TownsScreen::updateScreenBuffer() {
#else
if (l->numCol == 16) {
if (l->scaleH == 2 && l->scaleW == 2) {
- for (Common::List<Common::Rect>::iterator r = _dirtyRects.begin(); r != _dirtyRects.end(); ++r)
- transferRect<dstPixelType, uint8, 2, 2, true>(dst, l, r->left, r->top, r->right - r->left, r->bottom - r->top);
+ //for (Common::List<Common::Rect>::iterator r = _dirtyRects.begin(); r != _dirtyRects.end(); ++r)
+ // transferRect<dstPixelType, uint8, 2, 2, true>(dst, l, r->left >> 1, r->top >> 1, (r->right - r->left) >> 1, (r->bottom - r->top) >> 1);
+ error("TownsScreen::updateOutputBuffer(): Unsupported scale/color config");
} else
#endif
if (l->scaleH == 1 && l->scaleW == 1) {
@@ -686,7 +688,7 @@ template<typename dstPixelType> void TownsScreen::updateScreenBuffer() {
} else {
if (l->scaleH == 2 && l->scaleW == 2) {
for (Common::List<Common::Rect>::iterator r = _dirtyRects.begin(); r != _dirtyRects.end(); ++r)
- transferRect<dstPixelType, uint8, 2, 2, false>(dst, l, r->left, r->top, r->right - r->left, r->bottom - r->top);
+ transferRect<dstPixelType, uint8, 2, 2, false>(dst, l, r->left >> 1, r->top >> 1, (r->right - r->left) >> 1, (r->bottom - r->top) >> 1);
} else if (l->scaleH == 1 && l->scaleW == 1) {
for (Common::List<Common::Rect>::iterator r = _dirtyRects.begin(); r != _dirtyRects.end(); ++r)
transferRect<dstPixelType, uint8, 1, 1, false>(dst, l, r->left, r->top, r->right - r->left, r->bottom - r->top);
More information about the Scummvm-git-logs
mailing list