summaryrefslogtreecommitdiff
path: root/lib/glfont.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glfont.cc')
-rw-r--r--lib/glfont.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/glfont.cc b/lib/glfont.cc
index 0956b36..383601c 100644
--- a/lib/glfont.cc
+++ b/lib/glfont.cc
@@ -98,10 +98,8 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255) {
nbT++;
}
-#ifdef DEBUG
printm(M_INFO, "Creating font texture: %i entries, flags = 0x%02x, maxX = %i, maxY = %i\n", nbentries, flags, maxX, maxY);
printm(M_INFO, "Which makes %i texture(s), with %i char by texture, %i on X, and %i on Y\n", nbT, nbcT, nbcU, nbcV);
-#endif
fonttex = (texture **) malloc(nbT * sizeof(texture *));
@@ -137,16 +135,16 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255) {
}
}
}
- if (((curU += maxX) + maxX) >= 256) {
+ if (((curU += maxX) + maxX) > 256) {
curU = 0;
- if (((curV += maxY) + maxY) >= 256) {
+ if (((curV += maxY) + maxY) > 256) {
curV = 0;
if ((curT + 1) != nbT)
curtex = (Uint8 *) fonttex[++curT]->GetSurface()->pixels;
}
}
}
-
+
corresp = (Uint16 *) malloc(nbentries * 2 * sizeof(Uint16));
ffont->read(corresp, 2 * sizeof(Uint16) * nbentries);