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>
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. | |
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.
| 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.
| texw | Texture width. |
| texh | Texture height. |
| charsize | Cell size. |
| void halt::DefaultCharacterMap::Map | ( | int | value, |
| TerminalVertex * | base | ||
| ) | const [virtual] |
Maps a cell value to UV coordinates.
| value | Cell value to map. |
| base | Pointer to the vertices that need to be modified. It is safe to modify four vertices starting from this pointer. |
Implements halt::CharacterMap.
1.7.6.1