OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
FontTRLE Class Reference

Tomb Raider Level Editor Font loader. More...

#include <FontTRLE.h>

Collaboration diagram for FontTRLE:
[legend]

Static Public Member Functions

static void shutdown ()
 
static int initialize (std::string font)
 
static unsigned int widthText (float scale, std::string s)
 
static unsigned int heightText (float scale, unsigned int maxWidth, std::string s)
 
static void drawText (unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
 
static void drawTextWrapped (unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
 

Static Private Member Functions

static void setDefaultOffsets ()
 
static void loadLPS (std::string f)
 
static void writeChar (unsigned int index, unsigned int xDraw, unsigned int yDraw, float scale, std::vector< glm::vec2 > &vertices, std::vector< glm::vec2 > &uvs)
 

Static Private Attributes

static bool mFontInit = false
 
static unsigned int mFontTexture = 0
 
static int offsets [106][5]
 
static int defaultOffsets [106][5]
 
static ShaderBuffer vertexBuffer
 
static ShaderBuffer uvBuffer
 

Detailed Description

Tomb Raider Level Editor Font loader.

Definition at line 18 of file FontTRLE.h.

Member Function Documentation

void FontTRLE::shutdown ( )
static

Definition at line 25 of file FontTRLE.cpp.

int FontTRLE::initialize ( std::string  font)
static

Definition at line 28 of file FontTRLE.cpp.

unsigned int FontTRLE::widthText ( float  scale,
std::string  s 
)
static

Definition at line 128 of file FontTRLE.cpp.

unsigned int FontTRLE::heightText ( float  scale,
unsigned int  maxWidth,
std::string  s 
)
static

Definition at line 175 of file FontTRLE.cpp.

void FontTRLE::drawText ( unsigned int  x,
unsigned int  y,
float  scale,
glm::vec4  color,
std::string  s 
)
static

Definition at line 149 of file FontTRLE.cpp.

void FontTRLE::drawTextWrapped ( unsigned int  x,
unsigned int  y,
float  scale,
glm::vec4  color,
unsigned int  maxWidth,
std::string  s 
)
static

Definition at line 208 of file FontTRLE.cpp.

static void FontTRLE::setDefaultOffsets ( )
staticprivate
void FontTRLE::loadLPS ( std::string  f)
staticprivate

Definition at line 62 of file FontTRLE.cpp.

void FontTRLE::writeChar ( unsigned int  index,
unsigned int  xDraw,
unsigned int  yDraw,
float  scale,
std::vector< glm::vec2 > &  vertices,
std::vector< glm::vec2 > &  uvs 
)
staticprivate

Definition at line 91 of file FontTRLE.cpp.

Member Data Documentation

bool FontTRLE::mFontInit = false
staticprivate

Definition at line 40 of file FontTRLE.h.

unsigned int FontTRLE::mFontTexture = 0
staticprivate

Definition at line 41 of file FontTRLE.h.

int FontTRLE::offsets
staticprivate

Definition at line 44 of file FontTRLE.h.

int FontTRLE::defaultOffsets
staticprivate

Definition at line 45 of file FontTRLE.h.

ShaderBuffer FontTRLE::vertexBuffer
staticprivate

Definition at line 47 of file FontTRLE.h.

ShaderBuffer FontTRLE::uvBuffer
staticprivate

Definition at line 48 of file FontTRLE.h.


The documentation for this class was generated from the following files: