summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-13 01:54:04 +0000
committerpixel <pixel>2003-03-13 01:54:04 +0000
commitc9437871835f2472e40a9051704b4e20f48ed067 (patch)
tree51ad8e86d22918d103ab93ccd1deb7ed812b7f15 /lib
parent97ec70da939ace8fa7a076fa31f0d1548e489ba1 (diff)
Font Bug
Diffstat (limited to 'lib')
-rw-r--r--lib/engine.cc2
-rw-r--r--lib/glfont.cc8
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/engine.cc b/lib/engine.cc
index 53be179..ac813f9 100644
--- a/lib/engine.cc
+++ b/lib/engine.cc
@@ -162,7 +162,7 @@ void mogltk::engine::pollevents() {
printm(M_INFO, "Mouse slept over the screen - (%i, %i)\n", event.motion.x, event.motion.y);
if (locked) {
if (!((event.motion.x == mx) && (event.motion.y == my))) {
- SDL_WrapMouse(mx, my);
+ SDL_WarpMouse(mx, my);
}
}
if (cursorvisible)
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);