aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorJohannes Schickel2011-07-01 05:38:20 +0200
committerJohannes Schickel2011-07-01 05:42:54 +0200
commit933ee5b156fd8031a75b84bae5329843221208dc (patch)
tree17c2c8480e338aeae0479608e662a0e3130a34a9 /engines/sci
parent685e32dbd7bf352c27e935b930ea24dc8b3380da (diff)
downloadscummvm-rg350-933ee5b156fd8031a75b84bae5329843221208dc.tar.gz
scummvm-rg350-933ee5b156fd8031a75b84bae5329843221208dc.tar.bz2
scummvm-rg350-933ee5b156fd8031a75b84bae5329843221208dc.zip
GRAPHICS: Remove default values from FontSJIS::drawChar.
drawChar is overloaded in FontSJIS. One takes a "Surface &" as first parameter another one "void *", they furthermore have the exact same number of required parameters. The one "void *" just had a few extra parameters with default values. This resulted in a bug in SCUMM, where "VirtScreen *" (a subclass of Surface) was passed instead of "VirtScreen &" and thus the method taking "void *" was incorrectly used. To make it easier to spot such bugs in the future I just removed the default values and thus disallow such calls.
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/screen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 4ab0b9719f..dbe2135143 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -338,7 +338,7 @@ void GfxScreen::drawLine(Common::Point startPoint, Common::Point endPoint, byte
void GfxScreen::putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color) {
byte *displayPtr = _displayScreen + y * _displayWidth * 2 + x * 2;
// we don't use outline, so color 0 is actually not used
- commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0);
+ commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0, -1, -1);
}
byte GfxScreen::getVisual(int x, int y) {