Halt
Hardware accelerated terminal
 All Classes Functions Variables
Public Member Functions
halt::DefaultCharacterMap Class Reference

Default character map. Only supports up to 256 characters (values are limited to the range of a single byte). Cell values are translated to UV coordinates based on their upper and lower 4 bits. The least significant four bits represent the number of cells into the texture from the left side that UV coordinates will be used from. Likewise, the most significant four bits represent the number of cells into the texture from the top side. More...

#include <CharacterMap.h>

Inheritance diagram for halt::DefaultCharacterMap:
halt::CharacterMap

List of all members.

Public Member Functions

 DefaultCharacterMap (int texw, int texh, CharacterSize charsize)
 Creates a DefaultCharacterMap given a texture's width, height, and the size of cells in the terminal.
void Map (int value, TerminalVertex *base) const
 Maps a cell value to UV coordinates.

Detailed Description

Default character map. Only supports up to 256 characters (values are limited to the range of a single byte). Cell values are translated to UV coordinates based on their upper and lower 4 bits. The least significant four bits represent the number of cells into the texture from the left side that UV coordinates will be used from. Likewise, the most significant four bits represent the number of cells into the texture from the top side.


Constructor & Destructor Documentation

halt::DefaultCharacterMap::DefaultCharacterMap ( int  texw,
int  texh,
CharacterSize  charsize 
)

Creates a DefaultCharacterMap given a texture's width, height, and the size of cells in the terminal.

Parameters:
texwTexture width.
texhTexture height.
charsizeCell size.

Member Function Documentation

void halt::DefaultCharacterMap::Map ( int  value,
TerminalVertex *  base 
) const [virtual]

Maps a cell value to UV coordinates.

Parameters:
valueCell value to map.
basePointer to the vertices that need to be modified. It is safe to modify four vertices starting from this pointer.
See also:
TerminalVertex

Implements halt::CharacterMap.


The documentation for this class was generated from the following files:
 All Classes Functions Variables