Article Index
Introduction
Game Engine
Game Logic
Bitmap Font
Sprites
The CCavern Method
Level Files
Sound And Input
Class Summary
Modding

Bitmap Font

The CBitmapFont class is responsible for bitmap font handling. Dr Dobbs contains two bitmap fonts (FontCol1.bmp and FontAxx1.bmp).

They are loaded inside the CGameEngine class, and available as
public members of the CGameEngine object: _fntBig and _fntSmall.  The Font bitmap must be defined in the following way:

2008_02_25_font.jpg

To ensure font bitmap transparency, you must make sure that
background color is solid black [RGB=0,0,0].

To draw text simply call:

void CBitmapFont::OutTextXY( int x, int y, LPCSTR szText );




DDJ