[Scummvm-git-logs] scummvm master -> b49a5d8866149d4bda23eeaeb18363cc6e2acaba
sev-
noreply at scummvm.org
Sun May 29 15:22:57 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:
b49a5d8866 SCUMM: Fix clashing overridden methods
Commit: b49a5d8866149d4bda23eeaeb18363cc6e2acaba
https://github.com/scummvm/scummvm/commit/b49a5d8866149d4bda23eeaeb18363cc6e2acaba
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-05-29T17:22:47+02:00
Commit Message:
SCUMM: Fix clashing overridden methods
Changed paths:
engines/scumm/charset.cpp
engines/scumm/charset.h
engines/scumm/charset_v7.h
engines/scumm/nut_renderer.cpp
engines/scumm/nut_renderer.h
engines/scumm/smush/smush_font.h
engines/scumm/string_v7.cpp
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 693c208f5f4..b313e807728 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1985,7 +1985,7 @@ int CharsetRendererV7::draw2byte(byte *buffer, Common::Rect &clipRect, int x, in
return _origWidth + _spacing;
}
-int CharsetRendererV7::drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) {
+int CharsetRendererV7::drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) {
if (!prepareDraw(chr))
return 0;
@@ -2095,9 +2095,9 @@ int CharsetRendererNut::draw2byte(byte *buffer, Common::Rect &clipRect, int x, i
return _current->draw2byte(buffer, clipRect, x, y, pitch, col, chr);
}
-int CharsetRendererNut::drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) {
+int CharsetRendererNut::drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) {
assert(_current);
- return _current->drawChar(buffer, clipRect, x, y, pitch, col, flags, chr);
+ return _current->drawCharV7(buffer, clipRect, x, y, pitch, col, flags, chr);
}
#endif
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index 9513c86c478..563f1f564c2 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -316,7 +316,7 @@ public:
void printChar(int, bool) override { error("CharsetRendererV7::printChar(): Unexpected call to deprecated function"); }
int draw2byte(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, uint16 chr) override;
- int drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override;
+ int drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override;
int getCharWidth(uint16 chr) const override;
int getCharHeight(uint16 chr) const override { return ((chr & 0x80) && _vm->_useCJKMode) ? _vm->_2byteHeight : _fontHeight; }
int getFontHeight() const override { return _fontHeight; }
@@ -340,7 +340,7 @@ public:
bool newStyleWrapping() const override { return true; }
int draw2byte(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, uint16 chr) override;
- int drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override;
+ int drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override;
int getFontHeight() const override;
int getCharWidth(uint16 chr) const override;
diff --git a/engines/scumm/charset_v7.h b/engines/scumm/charset_v7.h
index c1699471579..7d7fd33b3b0 100644
--- a/engines/scumm/charset_v7.h
+++ b/engines/scumm/charset_v7.h
@@ -41,7 +41,7 @@ public:
virtual ~GlyphRenderer_v7() {};
virtual int draw2byte(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, uint16 chr) = 0;
- virtual int drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) = 0;
+ virtual int drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) = 0;
virtual int getCharWidth(uint16 chr) const = 0;
virtual int getCharHeight(uint16 chr) const = 0;
virtual int getFontHeight() const = 0;
diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp
index 8a97407c158..17760f64cce 100644
--- a/engines/scumm/nut_renderer.cpp
+++ b/engines/scumm/nut_renderer.cpp
@@ -368,7 +368,7 @@ void NutRenderer::drawFrame(byte *dst, int c, int x, int y) {
}
}
-int NutRenderer::drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr, bool hardcodedColors, bool smushColorMode) {
+int NutRenderer::drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr, bool hardcodedColors, bool smushColorMode) {
if (_direction < 0)
x -= _chars[chr].width;
diff --git a/engines/scumm/nut_renderer.h b/engines/scumm/nut_renderer.h
index 95aaa415094..350071f7fc1 100644
--- a/engines/scumm/nut_renderer.h
+++ b/engines/scumm/nut_renderer.h
@@ -76,7 +76,7 @@ public:
void drawFrame(byte *dst, int c, int x, int y);
int draw2byte(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, uint16 chr);
- int drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr, bool hardcodedColors = false, bool smushColorMode = false);
+ int drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr, bool hardcodedColors = false, bool smushColorMode = false);
int getCharWidth(byte c) const;
int getCharHeight(byte c) const;
diff --git a/engines/scumm/smush/smush_font.h b/engines/scumm/smush/smush_font.h
index 3c103bc499d..753c855ed44 100644
--- a/engines/scumm/smush/smush_font.h
+++ b/engines/scumm/smush/smush_font.h
@@ -51,8 +51,8 @@ private:
return NutRenderer::draw2byte(buffer, clipRect, x, y, pitch, _vm->_game.id == GID_CMI ? 255 : (_vm->_game.id == GID_DIG && col == -1 ? 1 : col), chr);
}
- int drawChar(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override {
- return NutRenderer::drawChar(buffer, clipRect, x, y, pitch, col, flags, chr, _hardcodedFontColors, true);
+ int drawCharV7(byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags, byte chr) override {
+ return NutRenderer::drawCharV7(buffer, clipRect, x, y, pitch, col, flags, chr, _hardcodedFontColors, true);
}
int getCharWidth(uint16 chr) const override { return NutRenderer::getCharWidth(chr & 0xFF); }
diff --git a/engines/scumm/string_v7.cpp b/engines/scumm/string_v7.cpp
index 25df648fbeb..e774259331d 100644
--- a/engines/scumm/string_v7.cpp
+++ b/engines/scumm/string_v7.cpp
@@ -170,7 +170,7 @@ void TextRenderer_v7::drawSubstring(const char *str, uint numBytesMax, byte *buf
++i;
--numBytesMax;
} else if (str[i] != '\n' && str[i] != _lineBreakMarker) {
- x += _gr->drawChar(buffer, clipRect, x, y, pitch, col, flags, str[i]);
+ x += _gr->drawCharV7(buffer, clipRect, x, y, pitch, col, flags, str[i]);
}
--numBytesMax;
}
More information about the Scummvm-git-logs
mailing list