[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.12,1.13 credits.hxx,1.9
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.12,1.13 credits.hxx,1.9,1.10 pingu_action_factory.cxx,1.9,1.10 pingu_action_factory.hxx,1.8,1.9 pingus_main.cxx,1.35,1.36 pingus_menu_manager.cxx,1.16,1.17 pingus_menu_manager.hxx,1.15,1.16 screen_manager.cxx,1.25,1.26 screen_manager.hxx,1.14,1.15 |
Date: |
5 Nov 2002 03:02:51 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv26098
Modified Files:
credits.cxx credits.hxx pingu_action_factory.cxx
pingu_action_factory.hxx pingus_main.cxx
pingus_menu_manager.cxx pingus_menu_manager.hxx
screen_manager.cxx screen_manager.hxx
Log Message:
added some init/deinit functions
Index: credits.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/credits.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- credits.cxx 3 Oct 2002 12:33:08 -0000 1.12
+++ credits.cxx 5 Nov 2002 03:02:48 -0000 1.13
@@ -32,67 +32,57 @@
Credits* Credits::instance_ = 0;
-Credits::Credits() : is_init(false)
-{
-}
-
-void
-Credits::init ()
+Credits::Credits()
{
- if (!is_init)
- {
- is_init = true;
-
- fast_scrolling = false;
- surface = PingusResource::load_surface("Game/pingubw", "game");
- font = PingusResource::load_font("Fonts/pingus","fonts");
- font_small = PingusResource::load_font("Fonts/pingus_small","fonts");
+ fast_scrolling = false;
+ surface = PingusResource::load_surface("Game/pingubw", "game");
+ font = PingusResource::load_font("Fonts/pingus","fonts");
+ font_small = PingusResource::load_font("Fonts/pingus_small","fonts");
- // The credits vector holds the strings to display. The first
- // character of each string is a special character, which indicates
- // the size of the font or other special stuff. "-" means large
- // font, "_" is a small font and "n" means a newline.
+ // The credits vector holds the strings to display. The first
+ // character of each string is a special character, which indicates
+ // the size of the font or other special stuff. "-" means large
+ // font, "_" is a small font and "n" means a newline.
- credits.push_back(_("_If I forgot somebody in this"));
- credits.push_back(_("_list, just drop me a line and"));
- credits.push_back(_("_I'll fix this."));
- credits.push_back(_("_Last Updated: 2000/06/27"));
- credits.push_back(_("n"));
+ credits.push_back(_("_If I forgot somebody in this"));
+ credits.push_back(_("_list, just drop me a line and"));
+ credits.push_back(_("_I'll fix this."));
+ credits.push_back(_("_Last Updated: 2000/06/27"));
+ credits.push_back(_("n"));
- credits.push_back(_("-Programming"));
- credits.push_back("_Ingo Ruhnke");
- credits.push_back("_Michael K\"aser");
- credits.push_back("_Peter Todd");
- credits.push_back("_David Philippi");
- credits.push_back("n");
+ credits.push_back(_("-Programming"));
+ credits.push_back("_Ingo Ruhnke");
+ credits.push_back("_Michael K\"aser");
+ credits.push_back("_Peter Todd");
+ credits.push_back("_David Philippi");
+ credits.push_back("n");
- credits.push_back(_("-Gfx"));
- credits.push_back("_Stefan Stiasny");
- credits.push_back("_Alan Tennent");
- credits.push_back("_Craig Timpany");
- credits.push_back("_Joel Fauche");
- credits.push_back("_Michael Mestre");
- credits.push_back("n");
+ credits.push_back(_("-Gfx"));
+ credits.push_back("_Stefan Stiasny");
+ credits.push_back("_Alan Tennent");
+ credits.push_back("_Craig Timpany");
+ credits.push_back("_Joel Fauche");
+ credits.push_back("_Michael Mestre");
+ credits.push_back("n");
- credits.push_back(_("-Music"));
- credits.push_back("_H. Matthew Smith");
- credits.push_back("_Joseph Toscano");
- credits.push_back("n");
+ credits.push_back(_("-Music"));
+ credits.push_back("_H. Matthew Smith");
+ credits.push_back("_Joseph Toscano");
+ credits.push_back("n");
- credits.push_back(_("-Special"));
- credits.push_back(_("-Thanks to"));
- credits.push_back("_Jules Bean");
- credits.push_back("_Kenneth Gangstø");
- credits.push_back("_Johnny Taporg");
- credits.push_back("_Werner Steiner");
- credits.push_back("_Kenneth Gangstø");
- credits.push_back("_Tuomas (Tigert) Kuosmanen");
- credits.push_back("_Keir Fraser");
+ credits.push_back(_("-Special"));
+ credits.push_back(_("-Thanks to"));
+ credits.push_back("_Jules Bean");
+ credits.push_back("_Kenneth Gangstø");
+ credits.push_back("_Johnny Taporg");
+ credits.push_back("_Werner Steiner");
+ credits.push_back("_Kenneth Gangstø");
+ credits.push_back("_Tuomas (Tigert) Kuosmanen");
+ credits.push_back("_Keir Fraser");
- credits.push_back("n");
+ credits.push_back("n");
- credits.push_back("-### END ###");
- }
+ credits.push_back("-### END ###");
}
Credits::~Credits ()
@@ -158,10 +148,7 @@
void
Credits::on_startup ()
{
- init ();
-
offset = CL_Display::get_height() + 50;
-
PingusSound::play_music("music/pingus-2.it");
}
@@ -172,6 +159,18 @@
return instance_;
else
return instance_ = new Credits ();
+}
+
+void
+Credits::init()
+{
+ instance_ = 0;
+}
+
+void
+Credits::deinit()
+{
+ delete instance_;
}
void
Index: credits.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/credits.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- credits.hxx 3 Oct 2002 12:33:08 -0000 1.9
+++ credits.hxx 5 Nov 2002 03:02:48 -0000 1.10
@@ -55,7 +55,9 @@
Credits ();
virtual ~Credits ();
- void init ();
+ static void init();
+ static void deinit();
+
void update (float);
void draw_background (GraphicContext& gc);
Index: pingu_action_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action_factory.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pingu_action_factory.cxx 13 Oct 2002 16:39:59 -0000 1.9
+++ pingu_action_factory.cxx 5 Nov 2002 03:02:48 -0000 1.10
@@ -52,6 +52,16 @@
{
}
+PinguActionFactory::~PinguActionFactory ()
+{
+ for (std::map<Actions::ActionName, PinguActionAbstractFactory*>::iterator i
= factories.begin();
+ i != factories.end();
+ ++i)
+ {
+ delete i->second;
+ }
+}
+
PinguActionFactory* PinguActionFactory::instance_ = 0;
PinguActionFactory*
@@ -63,6 +73,18 @@
instance_->register_core_actions ();
}
return instance_;
+}
+
+void
+PinguActionFactory::init()
+{
+ instance_ = 0;
+}
+
+void
+PinguActionFactory::deinit()
+{
+ delete instance_;
}
void
Index: pingu_action_factory.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action_factory.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pingu_action_factory.hxx 13 Oct 2002 16:39:59 -0000 1.8
+++ pingu_action_factory.hxx 5 Nov 2002 03:02:48 -0000 1.9
@@ -37,11 +37,16 @@
static PinguActionFactory* instance_;
PinguActionFactory ();
+ ~PinguActionFactory ();
void register_core_actions ();
public:
static PinguActionFactory* instance ();
- void register_factory (Actions::ActionName id, PinguActionAbstractFactory*);
+ static void init();
+ static void deinit();
+
+ /** \a f will get deleted in destructor! */
+ void register_factory (Actions::ActionName id, PinguActionAbstractFactory*
f);
/** Delete all actions which this class has allocated. This needs to
be called seperatly from the constructor, due to the used
Index: pingus_main.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- pingus_main.cxx 3 Nov 2002 23:31:35 -0000 1.35
+++ pingus_main.cxx 5 Nov 2002 03:02:48 -0000 1.36
@@ -84,6 +84,8 @@
#include "input_debug_screen.hxx"
#include "pingus_menu_manager.hxx"
#include "pingus_resource.hxx"
+#include "pingu_action_factory.hxx"
+#include "credits.hxx"
#include "sound.hxx"
using EditorNS::Editor;
@@ -875,13 +877,17 @@
perr.add (std::cout);
perr.add (console);
+ ScreenManager::init();
PingusSound::init();
-
PingusResource::init();
Fonts::init();
+ XMLhelper::init();
+ PinguActionFactory::init();
+ Editor::init();
+ Credits::init();
+
fps_counter.init();
console.init();
- XMLhelper::init();
// FIXME: See action_data.hxx, a bit ugly
init_default_actions();
@@ -890,10 +896,14 @@
void
PingusMain::deinit_pingus()
{
+ Credits::deinit();
+ Editor::deinit();
+ PinguActionFactory::deinit();
XMLhelper::deinit();
Fonts::deinit();
PingusResource::deinit();
PingusSound::deinit();
+ ScreenManager::deinit();
}
/* EOF */
Index: pingus_menu_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu_manager.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pingus_menu_manager.cxx 3 Nov 2002 23:31:35 -0000 1.16
+++ pingus_menu_manager.cxx 5 Nov 2002 03:02:48 -0000 1.17
@@ -154,4 +154,16 @@
return instance_ = new PingusMenuManager ();
}
+void
+PingusMenuManager::init()
+{
+ instance_ = 0;
+}
+
+void
+PingusMenuManager::deinit()
+{
+ delete instance_;
+}
+
/* EOF */
Index: pingus_menu_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu_manager.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pingus_menu_manager.hxx 3 Nov 2002 23:31:35 -0000 1.15
+++ pingus_menu_manager.hxx 5 Nov 2002 03:02:48 -0000 1.16
@@ -86,6 +86,8 @@
void push_menu (PingusSubMenu * menu);
static PingusMenuManager* instance ();
+ static void init();
+ static void deinit();
protected:
PingusMenuManager ();
Index: screen_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screen_manager.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- screen_manager.cxx 2 Nov 2002 22:10:52 -0000 1.25
+++ screen_manager.cxx 5 Nov 2002 03:02:48 -0000 1.26
@@ -233,4 +233,16 @@
#endif
}
+void
+ScreenManager::init()
+{
+ instance_ = 0;
+}
+
+void
+ScreenManager::deinit()
+{
+ delete instance_;
+}
+
/* EOF */
Index: screen_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screen_manager.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- screen_manager.hxx 2 Oct 2002 12:54:18 -0000 1.14
+++ screen_manager.hxx 5 Nov 2002 03:02:48 -0000 1.15
@@ -84,7 +84,8 @@
public:
static ScreenManager* instance ();
-
+ static void init();
+ static void deinit();
private:
ScreenManager (const ScreenManager&);
ScreenManager& operator= (const ScreenManager&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.12,1.13 credits.hxx,1.9,1.10 pingu_action_factory.cxx,1.9,1.10 pingu_action_factory.hxx,1.8,1.9 pingus_main.cxx,1.35,1.36 pingus_menu_manager.cxx,1.16,1.17 pingus_menu_manager.hxx,1.15,1.16 screen_manager.cxx,1.25,1.26 screen_manager.hxx,1.14,1.15,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.38,1.39 editor.hxx,1.20,1.21
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src cheat.cxx,NONE,1.1 cheat.hxx,NONE,1.1 Makefile.am,1.121,1.122 action_button.cxx,1.20,1.21 action_button.hxx,1.14,1.15 action_holder.cxx,1.8,1.9 action_holder.hxx,1.9,1.10 button_panel.cxx,1.21,1.22 button_panel.hxx,1.14,1.15 client.cxx,1.34,1.35 config.cxx,1.6,1.7 config.hxx,1.6,1.7 globals.cxx,1.4,1.5 globals.hxx,1.10,1.11 goal_manager.cxx,1.3,1.4 option_menu.cxx,1.9,1.10 pingus_main.cxx,1.36,1.37 pingus_menu.cxx,1.9,1.10 plf.cxx,1.11,1.12 surface_button.cxx,1.17,1.18 surface_button.hxx,1.11,1.12
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.38,1.39 editor.hxx,1.20,1.21
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src cheat.cxx,NONE,1.1 cheat.hxx,NONE,1.1 Makefile.am,1.121,1.122 action_button.cxx,1.20,1.21 action_button.hxx,1.14,1.15 action_holder.cxx,1.8,1.9 action_holder.hxx,1.9,1.10 button_panel.cxx,1.21,1.22 button_panel.hxx,1.14,1.15 client.cxx,1.34,1.35 config.cxx,1.6,1.7 config.hxx,1.6,1.7 globals.cxx,1.4,1.5 globals.hxx,1.10,1.11 goal_manager.cxx,1.3,1.4 option_menu.cxx,1.9,1.10 pingus_main.cxx,1.36,1.37 pingus_menu.cxx,1.9,1.10 plf.cxx,1.11,1.12 surface_button.cxx,1.17,1.18 surface_button.hxx,1.11,1.12
- Index(es):