diff options
-rw-r--r-- | graphics/font.h | 5 | ||||
-rw-r--r-- | graphics/fontman.cpp | 6 |
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 |