/*] Copyright (c) 2009-2010, Charles McGarvey [************************** **] All rights reserved. * * vi:ts=4 sw=4 tw=75 * * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * **************************************************************************/ #include #include "TilemapFont.hh" TilemapFont::TilemapFont() : Mf::Texture("Font") {} void TilemapFont::getTileCoords(char symbol, Mf::Scalar coords[8], Mf::Texture::Orientation what) { Mf::Texture::TileIndex index = 0; if (symbol >= ' ' && symbol <= '_') { index = symbol - 32; } else if (symbol >= 'a' && symbol <= '~') { index = symbol - 64; } else { index = 0; } Mf::Texture::getTileCoords(index, coords, what); }