Update of /cvsroot/super-tux/supertux/lib/app
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv708/lib/app
Modified Files:
globals.cpp globals.h setup.cpp setup.h
Log Message:
Made the SuperTux library again a bit more selfstanding.
Moved global fonts to src/ and they are handled as static variables inside Menu:: and Button:: .
Index: setup.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- setup.cpp 25 Jul 2004 19:03:34 -0000 1.5
+++ setup.cpp 26 Jul 2004 15:48:37 -0000 1.6
@@ -346,20 +346,6 @@
SDL_EnableUNICODE(1);
- /* Load global images: */
- gold_text = new Font(datadir + "/images/fonts/gold.png", Font::TEXT, 16,18);
- blue_text = new Font(datadir + "/images/fonts/blue.png", Font::TEXT, 16,18,3);
- white_text = new Font(datadir + "/images/fonts/white.png",
- Font::TEXT, 16,18);
- gray_text = new Font(datadir + "/images/fonts/gray.png",
- Font::TEXT, 16,18);
- white_small_text = new Font(datadir + "/images/fonts/white-small.png",
- Font::TEXT, 8,9, 1);
- white_big_text = new Font(datadir + "/images/fonts/white-big.png",
- Font::TEXT, 20,22, 3);
- yellow_nums = new Font(datadir + "/images/fonts/numbers.png",
- Font::NUM, 32,32);
-
/* Load GUI/menu images: */
checkbox = new Surface(datadir + "/images/status/checkbox.png", true);
checkbox_checked = new Surface(datadir + "/images/status/checkbox-checked.png", true);
@@ -376,15 +362,6 @@
void Setup::general_free(void)
{
- /* Free global images: */
- delete gold_text;
- delete white_text;
- delete blue_text;
- delete gray_text;
- delete white_small_text;
- delete white_big_text;
- delete yellow_nums;
-
/* Free GUI/menu images: */
delete checkbox;
delete checkbox_checked;
Index: globals.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/globals.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- globals.cpp 24 Jul 2004 11:50:09 -0000 1.4
+++ globals.cpp 26 Jul 2004 15:48:37 -0000 1.5
@@ -43,14 +43,6 @@
JoystickKeymap joystick_keymap;
SDL_Surface * screen;
-Font* gold_text;
-Font* blue_text;
-Font* gray_text;
-Font* yellow_nums;
-Font* white_text;
-Font* white_small_text;
-Font* white_big_text;
-
MouseCursor * mouse_cursor;
bool use_gl;
Index: setup.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/setup.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- setup.h 25 Jul 2004 19:03:34 -0000 1.5
+++ setup.h 26 Jul 2004 15:48:37 -0000 1.6
@@ -45,12 +45,14 @@
static void directories(void);
static void general(void);
static void general_free();
- static void video_sdl(unsigned int screen_w, unsigned int screen_h);
- static void video_gl(unsigned int screen_w, unsigned int screen_h);
static void video(unsigned int screen_w, unsigned int screen_h);
static void audio(void);
static void joystick(void);
static void parseargs(int argc, char * argv[]);
+
+ private:
+ static void video_sdl(unsigned int screen_w, unsigned int screen_h);
+ static void video_gl(unsigned int screen_w, unsigned int screen_h);
};
/// Termination handling
Index: globals.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/globals.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- globals.h 24 Jul 2004 11:50:09 -0000 1.4
+++ globals.h 26 Jul 2004 15:48:37 -0000 1.5
@@ -55,13 +55,6 @@
extern JoystickKeymap joystick_keymap;
extern SDL_Surface* screen;
- extern Font* gold_text;
- extern Font* white_text;
- extern Font* blue_text;
- extern Font* gray_text;
- extern Font* white_small_text;
- extern Font* white_big_text;
- extern Font* yellow_nums;
extern MouseCursor * mouse_cursor;
|