Diffstat (limited to 'noncore/games/sfcave-sdl/font.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/font.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/noncore/games/sfcave-sdl/font.cpp b/noncore/games/sfcave-sdl/font.cpp index 2976d48..1988252 100644 --- a/noncore/games/sfcave-sdl/font.cpp +++ b/noncore/games/sfcave-sdl/font.cpp | |||
@@ -10,3 +10,3 @@ BFont *FontHandler :: helpFont; | |||
10 | 10 | ||
11 | void FontHandler :: init() | 11 | bool FontHandler :: init() |
12 | { | 12 | { |
@@ -19,2 +19,11 @@ void FontHandler :: init() | |||
19 | colouredFont = 0; | 19 | colouredFont = 0; |
20 | |||
21 | // Check if we are installed correctly (we need fonts to function) | ||
22 | if ( menuSelFont == 0 || menuUnSelFont == 0 || whiteFont == 0 || helpFont == 0 ) | ||
23 | { | ||
24 | printf( "One or more fonts are not installed correctly\n" ); | ||
25 | return false; | ||
26 | } | ||
27 | |||
28 | return true; | ||
20 | } | 29 | } |
@@ -23,7 +32,10 @@ void FontHandler :: cleanUp() | |||
23 | { | 32 | { |
33 | if ( menuSelFont ) | ||
24 | delete menuSelFont; | 34 | delete menuSelFont; |
35 | if ( menuUnSelFont ) | ||
25 | delete menuUnSelFont; | 36 | delete menuUnSelFont; |
37 | if ( whiteFont ) | ||
26 | delete whiteFont; | 38 | delete whiteFont; |
39 | if ( helpFont ) | ||
27 | delete helpFont; | 40 | delete helpFont; |
28 | |||
29 | if ( colouredFont ) | 41 | if ( colouredFont ) |