From 933ee5b156fd8031a75b84bae5329843221208dc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 1 Jul 2011 05:38:20 +0200 Subject: 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. --- engines/kyra/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/kyra') diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index b4304a6de0..8f008a58b6 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -3359,7 +3359,7 @@ void SJISFont::drawChar(uint16 c, byte *dst, int pitch) const { color2 = _colorMap[0]; } - _font->drawChar(dst, c, 640, 1, color1, color2); + _font->drawChar(dst, c, 640, 1, color1, color2, 640, 400); } #pragma mark - -- cgit v1.2.3