Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-04 02:12:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-04 02:12:57 +0400
commit6972e19fd55470700618174bbba5893d53b1deaa (patch)
tree51f3fcbd3fa978e9053c9a0763f15232e08ff8ed /source/gameengine/Ketsji
parent84df85164d4d869d0830ea23467bcd0e1f127d48 (diff)
code cleanup:
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) with (BKE_vfont_is_builtin(vfont)). - reduce some double promotions.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_FontObject.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp
index 308154d8ebc..931eac7a974 100644
--- a/source/gameengine/Ketsji/KX_FontObject.cpp
+++ b/source/gameengine/Ketsji/KX_FontObject.cpp
@@ -117,25 +117,25 @@ void KX_FontObject::ProcessReplica()
KX_GetActiveScene()->AddFont(this);
}
-int GetFontId (VFont *font)
+int GetFontId (VFont *vfont)
{
PackedFile *packedfile=NULL;
int fontid = -1;
- if (font->packedfile) {
- packedfile= font->packedfile;
- fontid= BLF_load_mem(font->name, (unsigned char*)packedfile->data, packedfile->size);
+ if (vfont->packedfile) {
+ packedfile= vfont->packedfile;
+ fontid= BLF_load_mem(vfont->name, (unsigned char*)packedfile->data, packedfile->size);
if (fontid == -1) {
- printf("ERROR: packed font \"%s\" could not be loaded.\n", font->name);
+ printf("ERROR: packed font \"%s\" could not be loaded.\n", vfont->name);
fontid = BLF_load("default");
}
return fontid;
}
- /* once we have packed working we can load the FO_BUILTIN_NAME font */
- const char *filepath = font->name;
- if (strcmp(FO_BUILTIN_NAME, filepath) == 0) {
+ /* once we have packed working we can load the builtin font */
+ const char *filepath = vfont->name;
+ if (BKE_vfont_is_builtin(vfont)) {
fontid = BLF_load("default");
/* XXX the following code is supposed to work (after you add get_builtin_packedfile to BKE_font.h )