projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Silence compiler warning
[supertux.git]
/
src
/
video
/
font.cpp
diff --git
a/src/video/font.cpp
b/src/video/font.cpp
index
bc51c7e
..
aeb2e20
100644
(file)
--- a/
src/video/font.cpp
+++ b/
src/video/font.cpp
@@
-74,9
+74,9
@@
Font::Font(GlyphWidth glyph_width_,
// scan for prefix-filename in addons search path
char **rc = PHYSFS_enumerateFiles(fontdir.c_str());
for (char **i = rc; *i != NULL; i++) {
// scan for prefix-filename in addons search path
char **rc = PHYSFS_enumerateFiles(fontdir.c_str());
for (char **i = rc; *i != NULL; i++) {
- std::string filename(*i);
- if( filename.rfind(fontname) != std::string::npos ) {
- loadFontFile(fontdir + filename);
+ std::string filename
_
(*i);
+ if( filename
_
.rfind(fontname) != std::string::npos ) {
+ loadFontFile(fontdir + filename
_
);
}
}
PHYSFS_freeList(rc);
}
}
PHYSFS_freeList(rc);
@@
-164,7
+164,7
@@
Font::loadFontSurface(
const std::string &glyphimage,
const std::string &shadowimage,
const std::vector<std::string> &chars,
const std::string &glyphimage,
const std::string &shadowimage,
const std::vector<std::string> &chars,
- GlyphWidth glyph_width,
+ GlyphWidth glyph_width
_
,
int char_width
)
{
int char_width
)
{
@@
-180,7
+180,7
@@
Font::loadFontSurface(
SDL_Surface *surface = NULL;
SDL_Surface *surface = NULL;
- if( glyph_width == VARIABLE ) {
+ if( glyph_width
_
== VARIABLE ) {
//this does not work:
// surface = ((SDL::Texture *)glyph_surface.get_texture())->get_texture();
surface = IMG_Load_RW(get_physfs_SDLRWops("images/engine/fonts/"+glyphimage), 1);
//this does not work:
// surface = ((SDL::Texture *)glyph_surface.get_texture())->get_texture();
surface = IMG_Load_RW(get_physfs_SDLRWops("images/engine/fonts/"+glyphimage), 1);
@@
-202,7
+202,7
@@
Font::loadFontSurface(
Glyph glyph;
glyph.surface_idx = surface_idx;
Glyph glyph;
glyph.surface_idx = surface_idx;
- if( glyph_width
== FIXED
)
+ if( glyph_width
_ == FIXED || isdigit(*chr)
)
{
glyph.rect = Rectf(x, y, x + char_width, y + char_height);
glyph.offset = Vector(0, 0);
{
glyph.rect = Rectf(x, y, x + char_width, y + char_height);
glyph.offset = Vector(0, 0);