76 glTranslatef(cC.
spaceL, 0.0f, 0.0f);
79 for (
int i = 0; i < 4; i++) {
80 glTexCoord2f(cC.
tX[i], cC.
tY[i]);
81 glVertex2f (cC.
vX[i], cC.
vY[i]);
106 for (
int i = 0; i < 4; ++i) {
107 v_uv[i*2] = cC.
tX[i];
108 v_uv[i*2 +1] = cC.
tY[i];
109 v_pos[i*3] = x + cC.
vX[i];
110 v_pos[i*3 +1] = y + cC.
vY[i];
111 v_pos[i*3 +2] = 0.0f;
112 v_rgba[i*4] = rgba[0];
113 v_rgba[i*4 +1] = rgba[1];
114 v_rgba[i*4 +2] = rgba[2];
115 v_rgba[i*4 +3] = rgba[3];
150 bool hasInvalid =
false;
152 if (abc->size() != 524280)
155 _base = abc->readByte();
160 for (
int i = 1; i < 128; i++) {
167 if (!hasInvalid && (c.
dataX == 0) && (c.
dataY == 0)) {
174 for (
int i = 128; i < 65535; i++) {
203 if (((offset % 1024) != 0) || (plane > 3))
206 c.
dataX = plane * 32;
207 c.
dataY = (offset / 1024) * 32;
214 const float vW = c.
width;
215 const float vH = 32.0f;
216 const float tW = vW / w;
217 const float tH = vH / h;
219 const float tX = c.
dataX / w;
220 const float tY = c.
dataY / h;
222 c.
tX[0] = tX ; c.
tY[0] = tY + tH;
223 c.
tX[1] = tX + tW; c.
tY[1] = tY + tH;
224 c.
tX[2] = tX + tW; c.
tY[2] = tY ;
225 c.
tX[3] = tX ; c.
tY[3] = tY ;
227 c.
vX[0] = 0.0f ; c.
vY[0] = 0.0f ;
228 c.
vX[1] = 0.0f + vW; c.
vY[1] = 0.0f ;
229 c.
vX[2] = 0.0f + vW; c.
vY[2] = 0.0f + vH;
230 c.
vX[3] = 0.0f ; c.
vY[3] = 0.0f + vH;
237 std::map<uint32, Char>::const_iterator ch =
_extended.find(c);
#define ResMan
Shortcut for accessing the sound manager.
void render(float *pos, float *uv, float *rgba)
Dynamic data prior to render call.
virtual void render(uint32 c, float &x, float &y, float *rgba) const
uint32 readUint32LE()
Read an unsigned 32-bit word stored in little endian (LSB first) order from the stream and return it...
Texture & getTexture() const
A class holding an UTF-8 string.
#define TextureMan
Shortcut for accessing the texture manager.
#define SurfaceMan
Shortcut for accessing the shader manager.
void * getVariableData(uint32 index) const
The Aurora texture manager.
ShaderSurface * getSurface()
std::map< uint32, Char > _extended
void calcCharVertices(Char &c)
Exception that provides a stack of explanations.
A simple scoped smart pointer template.
An ABC/SBM font, as used by Jade Empire.
ABCFont(const Common::UString &name)
void bindProgram(Shader::ShaderProgram *program)
Shader::ShaderRenderable * _renderable
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
Graphics::Aurora::TextureHandle handle
void readCharDesc(Char &c, Common::SeekableReadStream &abc)
void load(const Common::UString &name)
The global shader surface manager.
ShaderProgram * getProgram()
void bindProgram(Shader::ShaderProgram *program)
const Char & findChar(uint32 c) const
Basic reading stream interfaces.
Shader::ShaderMaterial * _material
void renderBind()
Follows the steps of renderImmediate, but broken into different functions.
#define MeshMan
Shortcut for accessing the shader manager.
Shader sampler is used to bind a texture to a texture unit.
virtual void renderUnbind() const
static bool isASCII(uint32 c)
Is the character an ASCII character?
A texture as used in the Aurora engines.
#define ShaderMan
Shortcut for accessing the shader manager.
Font, character descriptions.
float getHeight() const
Return the height of a character.
virtual void renderBind(const glm::mat4 &transform) const
Bind the font for rendering.
void draw(uint32 c) const
Draw this character.
Interface for a seekable & readable data stream.
byte readByte()
Read an unsigned byte from the stream and return it.
The global resource manager for Aurora resources.
float getWidth(uint32 c) const
Return the width of a character.
static uint32 fromUTF16(uint16 c)