pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src fonts.cxx,1.1,1.2 fonts.hxx,1.1,1.2 p


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src fonts.cxx,1.1,1.2 fonts.hxx,1.1,1.2 pingus_main.cxx,1.31,1.32 xml_helper.cxx,1.24,1.25 xml_helper.hxx,1.17,1.18
Date: 2 Nov 2002 21:12:18 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv10839

Modified Files:
        fonts.cxx fonts.hxx pingus_main.cxx xml_helper.cxx 
        xml_helper.hxx 
Log Message:
some resource init/deinit cleanup

Index: fonts.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fonts.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fonts.cxx   5 Sep 2002 11:26:35 -0000       1.1
+++ fonts.cxx   2 Nov 2002 21:12:16 -0000       1.2
@@ -20,25 +20,28 @@
 #include "pingus_resource.hxx"
 #include "fonts.hxx"
 
-namespace Fonts
-{
-  FontHandle pingus_small;
-  FontHandle pingus_large;
-  FontHandle smallfont;
-  FontHandle xterm;
-  FontHandle lcd;
+namespace Fonts {
 
-  void
-  init_fonts ()
-  {
-    pingus_small = PingusResource::load_font("Fonts/pingus_small", "fonts");
-    pingus_large = PingusResource::load_font("Fonts/pingus","fonts");
+FontHandle pingus_small;
+FontHandle pingus_large;
+FontHandle smallfont;
+FontHandle xterm;
+FontHandle lcd;
 
-    xterm        = PingusResource::load_font("Fonts/xterm","fonts");
-    smallfont    = PingusResource::load_font("Fonts/smallfont","fonts");
+void
+init ()
+{
+  pingus_small = PingusResource::load_font("Fonts/pingus_small", "fonts");
+  pingus_large = PingusResource::load_font("Fonts/pingus","fonts");
 
-    lcd          = PingusResource::load_font("Fonts/numbers", "fonts");
-  }
+  xterm        = PingusResource::load_font("Fonts/xterm","fonts");
+  smallfont    = PingusResource::load_font("Fonts/smallfont","fonts");
+
+  lcd          = PingusResource::load_font("Fonts/numbers", "fonts");
 }
+
+void deinit () {}
+
+} // namespace Fonts
 
 /* EOF */

Index: fonts.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fonts.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fonts.hxx   5 Sep 2002 11:26:35 -0000       1.1
+++ fonts.hxx   2 Nov 2002 21:12:16 -0000       1.2
@@ -22,17 +22,21 @@
 
 #include "graphic_context.hxx"
 
-namespace Fonts
-{
-  extern FontHandle pingus_small;
-  extern FontHandle pingus_large;
-  extern FontHandle smallfont;
-  extern FontHandle xterm;
-  extern FontHandle lcd;
+namespace Fonts {
 
-  /** Load all fonts */
-  void init_fonts ();
-}
+extern FontHandle pingus_small;
+extern FontHandle pingus_large;
+extern FontHandle smallfont;
+extern FontHandle xterm;
+extern FontHandle lcd;
+
+/** Load all fonts */
+void init ();
+
+/** Unload fonts */
+void deinit ();
+
+} // namespace Fonts
 
 #endif
 

Index: pingus_main.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- pingus_main.cxx     2 Nov 2002 20:53:58 -0000       1.31
+++ pingus_main.cxx     2 Nov 2002 21:12:16 -0000       1.32
@@ -883,17 +883,17 @@
                << std::endl;
     }
 
-  Fonts::init_fonts ();
   PingusResource::init();
+  Fonts::init();
   fps_counter.init();
   console.init();
   XMLhelper::init();
 
-  pout.add (std::cerr);
+  pout.add (std::cout);
   pout.add (console);
-  pwarn.add (std::cerr);
+  pwarn.add (std::cout);
   pout.add (console);
-  perr.add (std::cerr);
+  perr.add (std::cout);
   perr.add (console);
 
   if (sound_enabled || music_enabled) 
@@ -915,7 +915,9 @@
 void
 PingusMain::deinit_pingus()
 {
-  
+  XMLhelper::deinit();
+  Fonts::deinit();
+  PingusResource::deinit();
 }  
 
 /* EOF */

Index: xml_helper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_helper.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- xml_helper.cxx      2 Nov 2002 20:46:10 -0000       1.24
+++ xml_helper.cxx      2 Nov 2002 21:12:16 -0000       1.25
@@ -420,6 +420,11 @@
   xmlLineNumbersDefault(1);
 }
 
+void
+XMLhelper::deinit()
+{
+}
+
 int
 XMLhelper::get_line(xmlNodePtr cur)
 {

Index: xml_helper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_helper.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- xml_helper.hxx      2 Nov 2002 20:46:10 -0000       1.17
+++ xml_helper.hxx      2 Nov 2002 21:12:16 -0000       1.18
@@ -123,6 +123,7 @@
   static int get_line(xmlNodePtr cur);
 
   static void init();
+  static void deinit();
   
 private:
   XMLhelper ();





reply via email to

[Prev in Thread] Current Thread [Next in Thread]