ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A base class to render monochrome SJIS fonts. More...

#include <sjis.h>

Inheritance diagram for Graphics::FontSJISBase:
Collaboration diagram for Graphics::FontSJISBase:

List of all members.

Public Member Functions

 FontSJISBase ()
virtual void setDrawingMode (DrawingMode mode)
virtual void toggleFlippedMode (bool enable)
 Enable flipped character drawing if supported by the Font (e.g.
virtual void toggleFatPrint (bool enable)
 Enable fat character drawing if supported by the Font (used in EOB II FM-Towns).
virtual uint getFontHeight () const
 Returns the height of the font.
virtual uint getMaxFontWidth () const
 Returns the max.
virtual uint getCharWidth (uint16 ch) const
 Returns the width of a specific character.
virtual void drawChar (void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const
 Draws a SJIS char on the given raw buffer.

Protected Types

enum  DrawingFeature {
  kFeatDefault = 1 << 0, kFeatOutline = 1 << 1, kFeatShadow = 1 << 2, kFeatFMTownsShadow = 1 << 3,
  kFeatFlipped = 1 << 4, kFeatFatPrint = 1 << 5
}

Protected Member Functions

bool isASCII (uint16 ch) const
virtual const uint8getCharData (uint16 c) const =0
virtual bool hasFeature (int feat) const =0

Protected Attributes

DrawingMode _drawMode
bool _flippedMode
bool _fatPrint
int _fontWidth
int _fontHeight
uint8 _bitPosNewLineMask

Private Member Functions

template<typename Color >
void blitCharacter (const uint8 *glyph, const int w, const int h, uint8 *dst, int pitch, Color c) const
void createOutline (uint8 *outline, const uint8 *glyph, const int w, const int h) const
const uint8flipCharacter (const uint8 *glyph, const int w) const
const uint8makeFatCharacter (const uint8 *glyph, const int w) const

Private Attributes

uint8 _tempGlyph [32]
uint8 _tempGlyph2 [32]

Detailed Description

A base class to render monochrome SJIS fonts.

Definition at line 147 of file sjis.h.


Member Enumeration Documentation

Enumerator:
kFeatDefault 
kFeatOutline 
kFeatShadow 
kFeatFMTownsShadow 
kFeatFlipped 
kFeatFatPrint 

Definition at line 187 of file sjis.h.


Constructor & Destructor Documentation

Graphics::FontSJISBase::FontSJISBase (  ) 

Member Function Documentation

template<typename Color >
void Graphics::FontSJISBase::blitCharacter ( const uint8 glyph,
const int  w,
const int  h,
uint8 dst,
int  pitch,
Color  c 
) const [private]
void Graphics::FontSJISBase::createOutline ( uint8 outline,
const uint8 glyph,
const int  w,
const int  h 
) const [private]
virtual void Graphics::FontSJISBase::drawChar ( void *  dst,
uint16  ch,
int  pitch,
int  bpp,
uint32  c1,
uint32  c2,
int  maxW,
int  maxH 
) const [virtual]

Draws a SJIS char on the given raw buffer.

Parameters:
dst pointer to the destination
ch character to draw (in little endian)
pitch pitch of the destination buffer (size in *bytes*)
bpp bytes per pixel of the destination buffer
c1 forground color
c2 outline color
maxW max draw width (to ensure that character drawing takes place within surface boundaries), -1 = no check
maxH max draw height (to ensure that character drawing takes place within surface boundaries), -1 = no check

Implements Graphics::FontSJIS.

const uint8* Graphics::FontSJISBase::flipCharacter ( const uint8 glyph,
const int  w 
) const [private]
virtual const uint8* Graphics::FontSJISBase::getCharData ( uint16  c  )  const [protected, pure virtual]
virtual uint Graphics::FontSJISBase::getCharWidth ( uint16  ch  )  const [virtual]

Returns the width of a specific character.

Implements Graphics::FontSJIS.

virtual uint Graphics::FontSJISBase::getFontHeight (  )  const [virtual]

Returns the height of the font.

Implements Graphics::FontSJIS.

virtual uint Graphics::FontSJISBase::getMaxFontWidth (  )  const [virtual]

Returns the max.

width of the font.

Implements Graphics::FontSJIS.

virtual bool Graphics::FontSJISBase::hasFeature ( int  feat  )  const [protected, pure virtual]
bool Graphics::FontSJISBase::isASCII ( uint16  ch  )  const [protected]
const uint8* Graphics::FontSJISBase::makeFatCharacter ( const uint8 glyph,
const int  w 
) const [private]
virtual void Graphics::FontSJISBase::setDrawingMode ( DrawingMode  mode  )  [virtual]

Reimplemented from Graphics::FontSJIS.

virtual void Graphics::FontSJISBase::toggleFatPrint ( bool  enable  )  [virtual]

Enable fat character drawing if supported by the Font (used in EOB II FM-Towns).

Reimplemented from Graphics::FontSJIS.

virtual void Graphics::FontSJISBase::toggleFlippedMode ( bool  enable  )  [virtual]

Enable flipped character drawing if supported by the Font (e.g.

in the MI1 circus scene after Guybrush gets shot out of the cannon).

Reimplemented from Graphics::FontSJIS.


Member Data Documentation

Definition at line 181 of file sjis.h.

Definition at line 178 of file sjis.h.

Definition at line 179 of file sjis.h.

Definition at line 179 of file sjis.h.

Definition at line 180 of file sjis.h.

Definition at line 180 of file sjis.h.

uint8 Graphics::FontSJISBase::_tempGlyph[32] [mutable, private]

Definition at line 173 of file sjis.h.

Definition at line 176 of file sjis.h.


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


Generated on Sat Dec 7 2019 05:02:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge