diff options
-rw-r--r-- | lib/glfont.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/glfont.cc b/lib/glfont.cc index 02b9a45..e4556ff 100644 --- a/lib/glfont.cc +++ b/lib/glfont.cc @@ -80,12 +80,12 @@ nbT = number of textures mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255) { int i; - ffont->read(&nbentries, 2); - ffont->read(&flags, 1); - ffont->read(&maxX, 1); - ffont->read(&maxY, 1); - ffont->read(&base, 1); - ffont->read(&inter, 1); + nbentries = ffont->readU16(); + flags = ffont->readU8(); + maxX = ffont->readU8(); + maxY = ffont->readU8(); + base = ffont->readU8(); + inter = ffont->readU8(); nbcU = 256 / maxX; nbcV = 256 / maxY; @@ -114,11 +114,11 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255) { Uint8 * curtex = (Uint8 *) fonttex[0]->GetSurface()->pixels; Uint32 curU = 0, curV = 0, curT = 0; for (int i = 0; i < nbentries; i++) { - ffont->read(&sizes[i], 1); + sizes[i] = ffont->readU8(); for (int v = 0; v < maxY; v++) { for (int u = 0; u < maxX; u++) { Uint8 f; - ffont->read(&f, 1); + f = ffont->readU8(); if (flags & 1) { Uint8 r, g, b, a; r = f & 3; |