aboutsummaryrefslogtreecommitdiff
path: root/graphics/sjis.h
diff options
context:
space:
mode:
authorJohannes Schickel2009-10-11 11:28:43 +0000
committerJohannes Schickel2009-10-11 11:28:43 +0000
commit6492c00a3ad24c16ef77e837c478bbc1b4c1e1bb (patch)
tree72fc95ea86a5de267594860db3440c702687f9f4 /graphics/sjis.h
parent353fe8ae563d52eaa0ae07a71f6a839d8854b68a (diff)
downloadscummvm-rg350-6492c00a3ad24c16ef77e837c478bbc1b4c1e1bb.tar.gz
scummvm-rg350-6492c00a3ad24c16ef77e837c478bbc1b4c1e1bb.tar.bz2
scummvm-rg350-6492c00a3ad24c16ef77e837c478bbc1b4c1e1bb.zip
Revert changes to graphics/sjis.h in r44709.
svn-id: r44904
Diffstat (limited to 'graphics/sjis.h')
-rw-r--r--graphics/sjis.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 87882e2fae..14a5187914 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -72,20 +72,13 @@ public:
/**
* Enable outline drawing.
+ *
+ * After changing outline state, getFontHeight and getMaxFontWidth / getCharWidth might return
+ * different values!
*/
virtual void enableOutline(bool enable) {}
/**
- * Toggle values returned by getFontHeight and getMaxFontWidth / getCharWidth.
- * These methods have to return different values when emulating PC-98 text mode.
- * We cannot simply match this with enableOutline(), since there are situations
- * where outlines get disabled in graphic mode, too. In these admittedly rare
- * cases (Kyra 1: Brynn's note, Kyra 2: spell book) the values returned by
- * getFontHeight and getMaxFontWidth / getCharWidth have to remain the same.
- */
- virtual void toggleCharSize(bool textMode) {}
-
- /**
* Returns the height of the font.
*/
virtual uint getFontHeight() const = 0;
@@ -129,13 +122,12 @@ public:
*/
class FontSJIS16x16 : public FontSJIS {
public:
- FontSJIS16x16() : _outlineEnabled(false), _pc98TextModeCharSize(false) {}
+ FontSJIS16x16() : _outlineEnabled(false) {}
void enableOutline(bool enable) { _outlineEnabled = enable; }
- void toggleCharSize(bool textMode) { _pc98TextModeCharSize = textMode; }
- uint getFontHeight() const { return _pc98TextModeCharSize ? 16 : 18; }
- uint getMaxFontWidth() const { return _pc98TextModeCharSize ? 16 : 18; }
+ uint getFontHeight() const { return _outlineEnabled ? 18 : 16; }
+ uint getMaxFontWidth() const { return _outlineEnabled ? 18 : 16; }
virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2) const;
@@ -148,7 +140,6 @@ private:
protected:
bool _outlineEnabled;
- bool _pc98TextModeCharSize;
virtual const uint16 *getCharData(uint16 c) const = 0;
};