diff options
Diffstat (limited to 'engines/kyra/screen.h')
-rw-r--r-- | engines/kyra/screen.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 60bfeb3241..156b5b9a7c 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -146,7 +146,7 @@ private: */ class OldDOSFont : public Font { public: - OldDOSFont(Common::RenderMode mode, bool useHiResEGADithering); + OldDOSFont(Common::RenderMode mode); ~OldDOSFont(); bool load(Common::SeekableReadStream &file); @@ -168,8 +168,6 @@ private: int _numGlyphs; Common::RenderMode _renderMode; - bool _useHiResEGADithering; - bool _useLoResEGA; static uint16 *_cgaDitheringTable; static int _numRef; @@ -213,7 +211,7 @@ private: */ class SJISFont : public Font { public: - SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize); + SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool drawOutline, int extraSpacing); ~SJISFont() { unload(); } bool usesOverlay() const { return true; } @@ -232,6 +230,12 @@ private: Graphics::FontSJIS *_font; const uint8 _invisColor; const bool _is16Color; + const bool _drawOutline; + // We use this for cases where the font width returned by getWidth() or getCharWidth() does not match the original. + // The original Japanese game versions use hard coded sjis font widths of 8 or 9. However, this does not necessarily + // depend on whether an outline is used or not (neither LOL/PC-9801 nor LOL/FM-TOWNS use an outline, but the first + // version uses a font width of 8 where the latter uses a font width of 9). + const int _sjisWidthOffset; int _sjisWidth, _asciiWidth; int _fontHeight; @@ -426,12 +430,12 @@ public: void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src); void shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPage, int ticks, bool transparent); - virtual void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false); + void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false); void clearPage(int pageNum); - virtual uint8 getPagePixel(int pageNum, int x, int y); - virtual void setPagePixel(int pageNum, int x, int y, uint8 color); + uint8 getPagePixel(int pageNum, int x, int y); + void setPagePixel(int pageNum, int x, int y, uint8 color); const uint8 *getCPagePtr(int pageNum) const; uint8 *getPageRect(int pageNum, int x, int y, int w, int h); @@ -457,7 +461,7 @@ public: void copyPalette(const int dst, const int src); // gui specific (processing on _curPage) - virtual void drawLine(bool vertical, int x, int y, int length, int color); + void drawLine(bool vertical, int x, int y, int length, int color); void drawClippedLine(int x1, int y1, int x2, int y2, int color); virtual void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2); void drawBox(int x1, int y1, int x2, int y2, int color); @@ -470,9 +474,9 @@ public: int getFontWidth() const; int getCharWidth(uint16 c) const; - int getTextWidth(const char *str) const; + int getTextWidth(const char *str); - virtual void printText(const char *str, int x, int y, uint8 color1, uint8 color2); + void printText(const char *str, int x, int y, uint8 color1, uint8 color2); virtual void setTextColorMap(const uint8 *cmap) = 0; void setTextColor(const uint8 *cmap, int a, int b); @@ -549,7 +553,7 @@ public: protected: uint8 *getPagePtr(int pageNum); - void updateDirtyRects(); + virtual void updateDirtyRects(); void updateDirtyRectsAmiga(); void updateDirtyRectsOvl(); @@ -573,18 +577,17 @@ protected: uint8 *_pagePtrs[16]; uint8 *_sjisOverlayPtrs[SCREEN_OVLS_NUM]; - uint8 _pageScaleFactor[SCREEN_PAGE_NUM]; uint8 _pageMapping[SCREEN_PAGE_NUM]; bool _useOverlays; bool _useSJIS; bool _use16ColorMode; bool _useHiResEGADithering; - bool _useLoResEGA; bool _isAmiga; Common::RenderMode _renderMode; uint8 _sjisInvisibleColor; + bool _sjisMixedFontMode; Palette *_screenPalette; Common::Array<Palette *> _palettes; @@ -600,7 +603,7 @@ protected: int _animBlockSize; // dimension handling - const ScreenDim * const _dimTable; + const ScreenDim *const _dimTable; ScreenDim **_customDimTable; const int _dimTableCount; int _curDimIndex; |