Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
FontLibrary Class Referenceabstract

#include <GameFont.h>

Inherits SubsystemInterface.

Inherited by W3DFontLibrary.

Public Member Functions

 FontLibrary (void)
 
virtual ~FontLibrary (void)
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
GameFontgetFont (AsciiString name, Int pointSize, Bool bold)
 get a font pointer
 
GameFontfirstFont (void)
 return first font
 
GameFontnextFont (GameFont *font)
 get next font in library
 
Int getCount (void)
 return how many fonts are loaded in this lib
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Member Functions

void deleteAllFonts (void)
 delete all fonts in this library
 
void linkFont (GameFont *font)
 add to font list
 
void unlinkFont (GameFont *font)
 remove font from list
 
virtual Bool loadFontData (GameFont *font)=0
 load the font data pointer based on everything else we already have set
 
virtual void releaseFontData (GameFont *font)
 release the font data pointer
 

Protected Attributes

GameFontm_fontList
 list of fonts we have loaded
 
Int m_count
 number of unique fonts loaded in this lib
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Interface to access fonts for the system

Definition at line 59 of file GameFont.h.

Constructor & Destructor Documentation

◆ FontLibrary()

FontLibrary::FontLibrary ( void )

Definition at line 138 of file GameFont.cpp.

◆ ~FontLibrary()

FontLibrary::~FontLibrary ( void )
virtual

Definition at line 148 of file GameFont.cpp.

Member Function Documentation

◆ deleteAllFonts()

void FontLibrary::deleteAllFonts ( void )
protected

delete all fonts in this library

Delete all font data, DO NOT throw an exception ... the destructor uses this

Definition at line 108 of file GameFont.cpp.

◆ firstFont()

GameFont * FontLibrary::firstFont ( void )
inline

return first font

Definition at line 99 of file GameFont.h.

◆ getCount()

Int FontLibrary::getCount ( void )
inline

return how many fonts are loaded in this lib

Definition at line 98 of file GameFont.h.

◆ getFont()

GameFont * FontLibrary::getFont ( AsciiString name,
Int pointSize,
Bool bold )

get a font pointer

Get a font from our list, if we don't have that font loaded we will attempt to load it

Definition at line 179 of file GameFont.cpp.

◆ init()

void FontLibrary::init ( void )
virtual

Initialize what we need to in the font library

Implements SubsystemInterface.

Definition at line 159 of file GameFont.cpp.

◆ linkFont()

void FontLibrary::linkFont ( GameFont * font)
protected

add to font list

Link a font to the font list

Definition at line 44 of file GameFont.cpp.

◆ loadFontData()

virtual Bool FontLibrary::loadFontData ( GameFont * font)
protectedpure virtual

load the font data pointer based on everything else we already have set

Implemented in W3DFontLibrary.

◆ nextFont()

GameFont * FontLibrary::nextFont ( GameFont * font)
inline

get next font in library

Definition at line 100 of file GameFont.h.

◆ releaseFontData()

virtual void FontLibrary::releaseFontData ( GameFont * font)
inlineprotectedvirtual

release the font data pointer

Reimplemented in W3DFontLibrary.

Definition at line 90 of file GameFont.h.

◆ reset()

void FontLibrary::reset ( void )
virtual

Reset the fonts for this font library

Implements SubsystemInterface.

Definition at line 167 of file GameFont.cpp.

◆ unlinkFont()

void FontLibrary::unlinkFont ( GameFont * font)
protected

remove font from list

Unlink a font from the font list

Definition at line 63 of file GameFont.cpp.

◆ update()

virtual void FontLibrary::update ( void )
inlinevirtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 72 of file GameFont.h.

Member Data Documentation

◆ m_count

Int FontLibrary::m_count
protected

number of unique fonts loaded in this lib

Definition at line 93 of file GameFont.h.

◆ m_fontList

GameFont* FontLibrary::m_fontList
protected

list of fonts we have loaded

Definition at line 92 of file GameFont.h.


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