aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-12-10 21:40:38 +0000
committerJohannes Schickel2009-12-10 21:40:38 +0000
commit6b44a09a528ae219e6b3bf4d316a72ca067a7c9c (patch)
treeff4441fc87e5926f902596f230baff5c0bc3586c
parent9e04ca3633d898972f87c06c50195593ded4bf0a (diff)
downloadscummvm-rg350-6b44a09a528ae219e6b3bf4d316a72ca067a7c9c.tar.gz
scummvm-rg350-6b44a09a528ae219e6b3bf4d316a72ca067a7c9c.tar.bz2
scummvm-rg350-6b44a09a528ae219e6b3bf4d316a72ca067a7c9c.zip
Hopefully fixing linking on MSVC:
svn-id: r46329
-rw-r--r--graphics/font.h5
-rw-r--r--graphics/fontman.cpp6
2 files changed, 7 insertions, 4 deletions
diff --git a/graphics/font.h b/graphics/font.h
index 5044e96af3..e1c052c9e1 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -146,8 +146,11 @@ public:
n = new NewFont(desc); \
}
+#define FORWARD_DECLARE_FONT(n) \
+ extern const NewFont *n; \
+ extern void create_##n();
+
#define INIT_FONT(n) \
- extern void create_##n(); \
create_##n();
} // End of namespace Graphics
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index 99c64ca976..0fc493c402 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -30,9 +30,9 @@ DECLARE_SINGLETON(Graphics::FontManager);
namespace Graphics {
const ScummFont *g_scummfont = 0;
-extern const NewFont *g_sysfont;
-extern const NewFont *g_sysfont_big;
-extern const NewFont *g_consolefont;
+FORWARD_DECLARE_FONT(g_sysfont)
+FORWARD_DECLARE_FONT(g_sysfont_big)
+FORWARD_DECLARE_FONT(g_consolefont)
FontManager::FontManager() {
// This assert should *never* trigger, because