ScummVM API documentation
Kyra::ChineseFont Class Referenceabstract
Inheritance diagram for Kyra::ChineseFont:
Kyra::Font Kyra::ChineseOneByteFontHOF Kyra::ChineseOneByteFontLoK Kyra::ChineseOneByteFontMR Kyra::ChineseTwoByteFontHOF Kyra::ChineseTwoByteFontLoK Kyra::ChineseTwoByteFontMR

Public Member Functions

 ChineseFont (int pitch, int renderWidth, int renderHeight, int spacingWidth, int spacingHeight, int extraSpacingWidth, int extraSpacingHeight)
 
virtual Type getType () const override
 
bool load (Common::SeekableReadStream &data) override
 
void setStyles (int styles) override
 
int getHeight () const override
 
int getWidth () const override
 
int getCharWidth (uint16 c) const override
 
int getCharHeight (uint16 c) const override
 
void setColorMap (const uint8 *src) override
 
void drawChar (uint16 c, byte *dst, int pitch, int) const override
 
- Public Member Functions inherited from Kyra::Font
virtual bool usesOverlay () const
 
virtual void set16bitColorMap (const uint16 *src)
 
virtual void drawChar (uint16 c, byte *dst, int pitch, int xOffs, int yOffs) const
 

Protected Member Functions

uint32 getGlyphDataSize () const
 

Protected Attributes

uint16 _textColor [2]
 
bool _pixelColorShading
 
const uint8 * _colorMap
 
bool _border
 

Additional Inherited Members

- Public Types inherited from Kyra::Font
enum  Type {
  kASCII = 0, kJIS_X0201, kSJIS, kBIG5,
  kJohab
}
 
enum  FontStyle {
  kStyleNone = 0, kStyleLeftShadow = 1 << 0, kStyleBorder = 1 << 1, kStyleFat = 1 << 2,
  kStyleNarrow1 = 1 << 3, kStyleNarrow2 = 1 << 4, kStyleFullWidth = 1 << 5, kStyleForceOneByte = 1 << 6
}
 

Member Function Documentation

◆ getType()

virtual Type Kyra::ChineseFont::getType ( ) const
inlineoverridevirtual

Whether the font is Ascii or Sjis.

Implements Kyra::Font.

◆ load()

bool Kyra::ChineseFont::load ( Common::SeekableReadStream file)
overridevirtual

Tries to load a file from the given stream

Implements Kyra::Font.

◆ setStyles()

void Kyra::ChineseFont::setStyles ( int  styles)
inlineoverridevirtual

Sets a drawing style. Only rudimentary implementation based on what is needed.

Reimplemented from Kyra::Font.

◆ getHeight()

int Kyra::ChineseFont::getHeight ( ) const
inlineoverridevirtual

The font height.

Implements Kyra::Font.

◆ getWidth()

int Kyra::ChineseFont::getWidth ( ) const
inlineoverridevirtual

The font width, this is the maximal character width.

Implements Kyra::Font.

◆ getCharWidth()

int Kyra::ChineseFont::getCharWidth ( uint16  c) const
inlineoverridevirtual

Gets the width of a specific character.

Implements Kyra::Font.

◆ getCharHeight()

int Kyra::ChineseFont::getCharHeight ( uint16  c) const
inlineoverridevirtual

Gets the height of a specific character. The only font that needs this is the SegaCD one. For all other fonts this is a fixed value.

Reimplemented from Kyra::Font.

◆ setColorMap()

void Kyra::ChineseFont::setColorMap ( const uint8 *  src)
overridevirtual

Sets a text palette map. The map contains 16 entries.

Implements Kyra::Font.

◆ drawChar()

void Kyra::ChineseFont::drawChar ( uint16  c,
byte *  dst,
int  pitch,
int  bpp 
) const
overridevirtual

Draws a specific character.

TODO/FIXME: Replace this with a nicer API. Currently the user has to assure that the character fits. We use this API, since it's hard to assure dirty rect handling from outside Screen.

Implements Kyra::Font.


The documentation for this class was generated from the following file: