From 45e08ccde95c84932557701235558e72cdc95f1b Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 28 Oct 2006 16:50:46 +0000 Subject: Fixing caps in class names. --- lib/font.cc | 100 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'lib/font.cc') diff --git a/lib/font.cc b/lib/font.cc index fab51e4..fbd871d 100644 --- a/lib/font.cc +++ b/lib/font.cc @@ -17,13 +17,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: font.cc,v 1.18 2006-02-02 17:29:05 pixel Exp $ */ +/* $Id: font.cc,v 1.19 2006-10-28 16:50:46 pixel Exp $ */ #include #include #include #include "base.h" -#include "font.h" +#include "Font.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -35,7 +35,7 @@ Uint8 prescale2[4] = { 0, 85, 170, 255 }, prescale3[8] = { 0, 36, 72, 109, 145, /* -font file format +Font file format ================ off|siz|description @@ -93,9 +93,9 @@ match only one byte in the string. Otherwise, it should match two bytes. Variables comments ================== -nbcU = number of chars on X by texture -nbcV = number of chars on Y by texture -nbcT = number of char by texture +nbcU = number of chars on X by Texture +nbcV = number of chars on Y by Texture +nbcT = number of char by Texture nbT = number of textures */ @@ -119,7 +119,7 @@ mogltk::ColorP colorcached[16] = { DOS_HIGH_WHITE }; -mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), wspace(0) { +mogltk::Font::Font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), wspace(0) { int i, j; nbentries = ffont->readU16(); @@ -140,17 +140,17 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), w nbT++; } - 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); + 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); - fonttex = (texture **) malloc(nbT * sizeof(texture *)); + fonttex = (Texture **) malloc(nbT * sizeof(Texture *)); for (i = 0; i < 16; i++) { - fontcache[i] = (texture **) malloc(nbT * sizeof(texture *)); + fontcache[i] = (Texture **) malloc(nbT * sizeof(Texture *)); } for (i = 0; i < nbT; i++) { fonttex[i] = alloctexture(); - fonttex[i]->name = "Main font texture number " + String(i); + fonttex[i]->name = "Main Font Texture number " + String(i); for (j = 0; j < 15; j++) { fontcache[j][i] = 0; } @@ -202,7 +202,7 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), w } } -mogltk::font::~font() { +mogltk::Font::~Font() { int i, j; for (i = 0; i < nbT; i++) for (j = 0; j < 16; j++) @@ -216,7 +216,7 @@ mogltk::font::~font() { free(sizes); } -void mogltk::font::drawentry(Uint16 entry, int x, int y, ColorP c) { +void mogltk::Font::drawentry(Uint16 entry, int x, int y, ColorP c) { bool locked = false; int trueentry, cx, cy, px, py; SDL_Rect src, dst; @@ -254,7 +254,7 @@ void mogltk::font::drawentry(Uint16 entry, int x, int y, ColorP c) { SDL_UnlockSurface(mogltk::engine::base_o->getsurface()); } -void mogltk::font::drawtotex(texture * t, Uint16 entry, int x, int y, ColorP c) { +void mogltk::Font::drawtotex(Texture * t, Uint16 entry, int x, int y, ColorP c) { bool locked = false; int trueentry, cx, cy, px, py; SDL_Rect src, dst; @@ -292,22 +292,22 @@ void mogltk::font::drawtotex(texture * t, Uint16 entry, int x, int y, ColorP c) SDL_UnlockSurface(t->GetSurface()); } -void mogltk::font::putcursor(int x, int y) { +void mogltk::Font::putcursor(int x, int y) { cx = ox = x; cy = y; } -void mogltk::font::putentry(Uint16 entry, ColorP c) { +void mogltk::Font::putentry(Uint16 entry, ColorP c) { drawentry(entry, cx, cy, c); cx += sizes[entry] + wspace; } -void mogltk::font::putentryontex(texture * t, Uint16 entry, ColorP c) { +void mogltk::Font::putentryontex(Texture * t, Uint16 entry, ColorP c) { drawtotex(t, entry, cx, cy, c); cx += sizes[entry] + wspace; } -void mogltk::font::drawchar(unsigned char ch, ColorP c) { +void mogltk::Font::drawchar(unsigned char ch, ColorP c) { Uint16 * p; int i; @@ -319,7 +319,7 @@ void mogltk::font::drawchar(unsigned char ch, ColorP c) { } } -void mogltk::font::drawcharontex(texture * t, unsigned char ch, ColorP c) { +void mogltk::Font::drawcharontex(Texture * t, unsigned char ch, ColorP c) { Uint16 * p; int i; @@ -331,7 +331,7 @@ void mogltk::font::drawcharontex(texture * t, unsigned char ch, ColorP c) { } } -int mogltk::font::findchar(unsigned char ch) const { +int mogltk::Font::findchar(unsigned char ch) const { Uint16 * p; int i; @@ -344,12 +344,12 @@ int mogltk::font::findchar(unsigned char ch) const { return -1; } -void mogltk::font::newline(void) { +void mogltk::Font::newline(void) { cx = ox; cy += inter; } -int mogltk::font::printf(const ugly_string & m, va_list ap) { +int mogltk::Font::printf(const ugly_string & m, va_list ap) { char * p; static char buffer[STRBUFSIZ + 1]; int r; @@ -371,7 +371,7 @@ int mogltk::font::printf(const ugly_string & m, va_list ap) { return r; } -int mogltk::font::printf(const ugly_string & m, ...) { +int mogltk::Font::printf(const ugly_string & m, ...) { va_list ap; int r; @@ -382,7 +382,7 @@ int mogltk::font::printf(const ugly_string & m, ...) { return r; } -int mogltk::font::printf(const char * p, ...) { +int mogltk::Font::printf(const char * p, ...) { ugly_string m; va_list ap; int r; @@ -396,7 +396,7 @@ int mogltk::font::printf(const char * p, ...) { return r; } -mogltk::rect mogltk::font::size(const ugly_string & m, va_list ap) { +mogltk::rect mogltk::Font::size(const ugly_string & m, va_list ap) { char * p; static char buffer[STRBUFSIZ + 1]; rect r; @@ -438,7 +438,7 @@ mogltk::rect mogltk::font::size(const ugly_string & m, va_list ap) { return r; } -mogltk::rect mogltk::font::size(const ugly_string & m, ...) { +mogltk::rect mogltk::Font::size(const ugly_string & m, ...) { va_list ap; rect r; @@ -449,7 +449,7 @@ mogltk::rect mogltk::font::size(const ugly_string & m, ...) { return r; } -mogltk::rect mogltk::font::size(const char * p, ...) { +mogltk::rect mogltk::Font::size(const char * p, ...) { ugly_string m; va_list ap; rect r; @@ -463,7 +463,7 @@ mogltk::rect mogltk::font::size(const char * p, ...) { return r; } -mogltk::rect mogltk::font::printtotex(texture * t, const ugly_string & m, va_list ap) { +mogltk::rect mogltk::Font::printtotex(Texture * t, const ugly_string & m, va_list ap) { char * p; static char buffer[STRBUFSIZ + 1]; rect r; @@ -513,7 +513,7 @@ mogltk::rect mogltk::font::printtotex(texture * t, const ugly_string & m, va_lis return r; } -mogltk::rect mogltk::font::printtotex(texture * t, const ugly_string & m, ...) { +mogltk::rect mogltk::Font::printtotex(Texture * t, const ugly_string & m, ...) { va_list ap; rect r; @@ -524,7 +524,7 @@ mogltk::rect mogltk::font::printtotex(texture * t, const ugly_string & m, ...) { return r; } -mogltk::rect mogltk::font::printtotex(texture * t, const char * p, ...) { +mogltk::rect mogltk::Font::printtotex(Texture * t, const char * p, ...) { ugly_string m; va_list ap; rect r; @@ -554,12 +554,12 @@ inline static unsigned int nextpower(unsigned int n) { } } -mogltk::texture * mogltk::font::printtex(rect * _r, const ugly_string & m, va_list ap) { +mogltk::Texture * mogltk::Font::printtex(rect * _r, const ugly_string & m, va_list ap) { rect r; char * p; static char buffer[STRBUFSIZ + 1]; int mw, w, pw, ph; - texture * t; + Texture * t; int ocx, ocy, oox; ocx = cx; @@ -605,8 +605,8 @@ mogltk::texture * mogltk::font::printtex(rect * _r, const ugly_string & m, va_li pw = nextpower(r.w); ph = nextpower(r.h); - t = new texture(pw, ph); - t->name = String("Text-on-texture: '") + m.p + "'"; + t = new Texture(pw, ph); + t->name = String("Text-on-Texture: '") + m.p + "'"; for (p = buffer; *p; p++) { if (*p == '\n') { @@ -622,9 +622,9 @@ mogltk::texture * mogltk::font::printtex(rect * _r, const ugly_string & m, va_li return t; } -mogltk::texture * mogltk::font::printtex(rect * r, const ugly_string & m, ...) { +mogltk::Texture * mogltk::Font::printtex(rect * r, const ugly_string & m, ...) { va_list ap; - texture * t; + Texture * t; va_start(ap, m); t = printtex(r, m, ap); @@ -633,10 +633,10 @@ mogltk::texture * mogltk::font::printtex(rect * r, const ugly_string & m, ...) { return t; } -mogltk::texture * mogltk::font::printtex(rect * r, const char * p, ...) { +mogltk::Texture * mogltk::Font::printtex(rect * r, const char * p, ...) { ugly_string m; va_list ap; - texture * t; + Texture * t; m.p = p; @@ -647,19 +647,19 @@ mogltk::texture * mogltk::font::printtex(rect * r, const char * p, ...) { return t; } -void mogltk::font::setcolor(ColorP c) { +void mogltk::Font::setcolor(ColorP c) { textcolor = c; } -void mogltk::font::setshadow(int s) { +void mogltk::Font::setshadow(int s) { shadow = s; } -void mogltk::font::setwspace(int w) { +void mogltk::Font::setwspace(int w) { wspace = w; } -int mogltk::font::singletextsize(const String & s) const { +int mogltk::Font::singletextsize(const String & s) const { unsigned int i; int r = 0; @@ -670,18 +670,18 @@ int mogltk::font::singletextsize(const String & s) const { return r; } -mogltk::font * mogltk::SystemFont; -mogltk::font * mogltk::FixedFont; +mogltk::Font * mogltk::SystemFont; +mogltk::Font * mogltk::FixedFont; -mogltk::texture * mogltk::font::alloctexture() { - return new texture(256, 256); +mogltk::Texture * mogltk::Font::alloctexture() { + return new Texture(256, 256); } -void mogltk::font::Bind(int f) { +void mogltk::Font::Bind(int f) { fonttex[f]->Bind(); } -void mogltk::font::checknbind(int index, ColorP c) { +void mogltk::Font::checknbind(int index, ColorP c) { int i, x, y; ColorP oldmax = ColorP::Max, t; ColorP::Max = c.c; @@ -693,7 +693,7 @@ void mogltk::font::checknbind(int index, ColorP c) { if (!fontcache[i][index]) { fontcache[i][index] = alloctexture(); - fontcache[i][index]->name = "Color font texture number " + String(index); + fontcache[i][index]->name = "Color Font Texture number " + String(index); for (y = 0; y < 256; y++) { for (x = 0; x < 256; x++) { t.fromSDL(fontcache[15][index]->GetPixels()[(y << 8) + x], f); -- cgit v1.2.3