#include <cassert>#include <cstring>#include <fstream>#include <config.h>#include <celutil/debug.h>#include <celutil/bytes.h>#include <celutil/utf8.h>#include <celengine/gl.h>#include "texturefont.h"Include dependency graph for texturefont.cpp:

Go to the source code of this file.
Functions | |
| TextureFont * | LoadTextureFont (const string &filename) |
| static int16 | readInt16 (istream &in, bool swap) |
| static int8 | readInt8 (istream &in) |
| static uint16 | readUint16 (istream &in, bool swap) |
| static uint32 | readUint32 (istream &in, bool swap) |
| static uint8 | readUint8 (istream &in) |
|
|
Definition at line 437 of file texturefont.cpp. References DPRINTF, and TextureFont::load(). Referenced by CelestiaCore::initRenderer(). 00438 {
00439 ifstream in(filename.c_str(), ios::in | ios::binary);
00440 if (!in.good())
00441 {
00442 DPRINTF(0, "Could not open font file %s\n", filename.c_str());
00443 return NULL;
00444 }
00445
00446 return TextureFont::load(in);
00447 }
|
|
||||||||||||
|
Definition at line 261 of file texturefont.cpp. 00262 {
00263 int16 x;
00264 in.read(reinterpret_cast<char*>(&x), sizeof x);
00265 return swap ? static_cast<int16>(bswap_16(static_cast<uint16>(x))) : x;
00266 }
|
|
|
Definition at line 268 of file texturefont.cpp. Referenced by TextureFont::load().
|
|
||||||||||||
|
Definition at line 239 of file texturefont.cpp. Referenced by TextureFont::load(). 00240 {
00241 uint16 x;
00242 in.read(reinterpret_cast<char*>(&x), sizeof x);
00243 return swap ? bswap_16(x) : x;
00244 }
|
|
||||||||||||
|
Definition at line 232 of file texturefont.cpp. 00233 {
00234 uint32 x;
00235 in.read(reinterpret_cast<char*>(&x), sizeof x);
00236 return swap ? bswap_32(x) : x;
00237 }
|
|
|
Definition at line 246 of file texturefont.cpp. Referenced by TextureFont::load(). 00247 {
00248 uint8 x;
00249 in.read(reinterpret_cast<char*>(&x), sizeof x);
00250 return x;
00251 }
|
1.4.1