aboutsummaryrefslogtreecommitdiff
path: root/graphics/fontman.cpp
diff options
context:
space:
mode:
authorChris Apers2005-10-08 21:11:45 +0000
committerChris Apers2005-10-08 21:11:45 +0000
commit3f2f5e099738f409501126168b3342a6c1284b34 (patch)
tree930276a10140e18577c8c3a58475dce78db82a81 /graphics/fontman.cpp
parent5b514241f34a0f25f98a280801df5d2f1f7d9dbf (diff)
downloadscummvm-rg350-3f2f5e099738f409501126168b3342a6c1284b34.tar.gz
scummvm-rg350-3f2f5e099738f409501126168b3342a6c1284b34.tar.bz2
scummvm-rg350-3f2f5e099738f409501126168b3342a6c1284b34.zip
PalmOS : very bad hack to fix global constructor problem with ARM
svn-id: r18970
Diffstat (limited to 'graphics/fontman.cpp')
-rw-r--r--graphics/fontman.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index e0ca9e5997..11c7dd1879 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -25,20 +25,44 @@ DECLARE_SINGLETON(Graphics::FontManager);
namespace Graphics {
+#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG))
const ScummFont g_scummfont;
extern const NewFont g_sysfont;
extern const NewFont g_sysfont_big;
extern const NewFont g_consolefont;
+FontManager::FontManager() {
+}
+
+#else
+const ScummFont *g_scummfont;
+extern const NewFont *g_sysfont;
+extern const NewFont *g_sysfont_big;
+extern const NewFont *g_consolefont;
+
+static bool g_initialized = false;
+void initfonts() {
+ if (!g_initialized) {
+ // FIXME : this need to be freed
+ g_initialized = true;
+ g_scummfont = new ScummFont;
+ INIT_FONT(g_sysfont)
+ INIT_FONT(g_sysfont_big)
+ INIT_FONT(g_consolefont)
+ }
+}
FontManager::FontManager() {
+ initfonts();
}
+#endif
//const Font *FontManager::getFontByName(const Common::String &name) const {
//}
const Font *FontManager::getFontByUsage(FontUsage usage) const {
switch (usage) {
+#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG))
case kOSDFont:
return &g_scummfont;
case kConsoleFont:
@@ -47,7 +71,18 @@ const Font *FontManager::getFontByUsage(FontUsage usage) const {
return &g_sysfont;
case kBigGUIFont:
return &g_sysfont_big;
+#else
+ case kOSDFont:
+ return g_scummfont;
+ case kConsoleFont:
+ return g_consolefont;
+ case kGUIFont:
+ return g_sysfont;
+ case kBigGUIFont:
+ return g_sysfont_big;
+#endif
}
+
return 0;
}