From c9437871835f2472e40a9051704b4e20f48ed067 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 13 Mar 2003 01:54:04 +0000 Subject: Font Bug --- lib/engine.cc | 2 +- lib/glfont.cc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3