summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2003-02-10 18:33:58 +0000
committerpixel <pixel>2003-02-10 18:33:58 +0000
commit28f5202ab892c2031f2ffb7fd6ad22171b01d139 (patch)
treeac7a8dc8ffddfbb9d057dc0d3d539cab5d30f08e
parenta1c65a2591cdbcb4ca1f469bc12f7a39c01bdb1b (diff)
Endianness
-rw-r--r--lib/glfont.cc16
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;