]> Dogcows Code - chaz/yoink/blob - src/TilemapFont.cc
sockets documentation and cleanup
[chaz/yoink] / src / TilemapFont.cc
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #include <iostream>
13
14 #include "TilemapFont.hh"
15
16
17 TilemapFont::TilemapFont() :
18 Mf::Texture("Font") {}
19
20
21 void TilemapFont::getTileCoords(char symbol, Mf::Scalar coords[8],
22 Mf::Texture::Orientation what)
23 {
24 Mf::Texture::TileIndex index = 0;
25
26 if (symbol >= ' ' && symbol <= '_')
27 {
28 index = symbol - 32;
29 }
30 else if (symbol >= 'a' && symbol <= '~')
31 {
32 index = symbol - 64;
33 }
34 else
35 {
36 index = 0;
37 }
38
39 Mf::Texture::getTileCoords(index, coords, what);
40 }
41
This page took 0.032349 seconds and 4 git commands to generate.