[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.23,1.24 blitter_impl.hx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.23,1.24 blitter_impl.hxx,1.5,1.6 client.cxx,1.42,1.43 demo_recorder.cxx,1.13,1.14 exit_menu.cxx,1.12,1.13 game_session.cxx,1.34,1.35 goal_manager.cxx,1.5,1.6 menu_button.cxx,1.2,1.3 pingu_action_factory.cxx,1.13,1.14 pingu_holder.cxx,1.18,1.19 pingus_menu_manager.cxx,1.21,1.22 result_screen.cxx,1.3,1.4 spot_map.cxx,1.24,1.25 start_screen.cxx,1.1,1.2 story_screen.cxx,1.3,1.4 timer.cxx,1.3,1.4 world.cxx,1.42,1.43 xml_helper.cxx,1.26,1.27xml_helper.hxx,1.18,1.19 |
Date: |
25 Mar 2003 00:37:46 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv28294
Modified Files:
blitter.cxx blitter_impl.hxx client.cxx demo_recorder.cxx
exit_menu.cxx game_session.cxx goal_manager.cxx
menu_button.cxx pingu_action_factory.cxx pingu_holder.cxx
pingus_menu_manager.cxx result_screen.cxx spot_map.cxx
start_screen.cxx story_screen.cxx timer.cxx world.cxx
xml_helper.cxx xml_helper.hxx
Log Message:
- removed lots of not so usefull std::cout's
Index: blitter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- blitter.cxx 18 Feb 2003 18:41:58 -0000 1.23
+++ blitter.cxx 25 Mar 2003 00:37:44 -0000 1.24
@@ -583,7 +583,7 @@
if (prov->is_indexed())
{
- std::cout << "Using indexed blitter" << std::endl;
+ //std::cout << "Using indexed blitter" << std::endl;
int pwidth = prov->get_width();
int pheight = prov->get_height();
Index: blitter_impl.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter_impl.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- blitter_impl.hxx 28 Dec 2002 16:57:38 -0000 1.5
+++ blitter_impl.hxx 25 Mar 2003 00:37:44 -0000 1.6
@@ -187,7 +187,7 @@
if (prov->is_indexed())
{
- std::cout << "Using indexed blitter" << std::endl;
+ //std::cout << "Using indexed blitter" << std::endl;
IndexedCanvas* canvas = new IndexedCanvas(TransF::get_width (pwidth,
pheight),
TransF::get_height(pwidth,
pheight));
Index: client.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/client.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- client.cxx 19 Feb 2003 11:33:00 -0000 1.42
+++ client.cxx 25 Mar 2003 00:37:44 -0000 1.43
@@ -349,8 +349,6 @@
void
Client::on_startup ()
{
- std::cout << "Client::on_startup ()" << std::endl;
-
/** Hide the system cursor and show the software one */
Display::show_cursor();
// FIXME: using this twice will crash with an X Error
@@ -360,7 +358,9 @@
is_finished = false;
skip_frame = 0;
- std::cout << "Starting Music: " << server->get_plf()->get_music() <<
std::endl;
+ if (maintainer_mode)
+ std::cout << "Starting Music: " << server->get_plf()->get_music() <<
std::endl;
+
if (server->get_plf()->get_music() == "none")
{
PingusSound::stop_music();
@@ -378,7 +378,6 @@
void
Client::on_shutdown ()
{
- std::cout << "Client::on_shutdown ()" << std::endl;
Display::hide_cursor();
}
Index: demo_recorder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_recorder.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- demo_recorder.cxx 18 Feb 2003 18:41:58 -0000 1.13
+++ demo_recorder.cxx 25 Mar 2003 00:37:44 -0000 1.14
@@ -80,7 +80,7 @@
if (record_demo)
{
event.write_xml(out);
- event.write_xml(std::cout);
+ //event.write_xml(std::cout);
}
}
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- exit_menu.cxx 12 Oct 2002 00:49:09 -0000 1.12
+++ exit_menu.cxx 25 Mar 2003 00:37:44 -0000 1.13
@@ -42,7 +42,6 @@
void on_primary_button_press (int, int)
{
- std::cout << "YES" << std::endl;
manager->exit ();
}
};
@@ -66,7 +65,6 @@
void on_primary_button_press (int, int)
{
- std::cout << "NO" << std::endl;
manager->pop_menu ();
}
};
Index: game_session.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_session.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- game_session.cxx 21 Mar 2003 22:08:06 -0000 1.34
+++ game_session.cxx 25 Mar 2003 00:37:44 -0000 1.35
@@ -55,11 +55,12 @@
PingusGameSession::~PingusGameSession ()
{
- std::cout << "XXXXXXXX"
- << " Redraws: " << number_of_redraws
- << " Updates: " << number_of_updates
- << " FrameSkip: " << number_of_updates - number_of_redraws
- << std::endl;
+ if (maintainer_mode)
+ std::cout << "XXXXXXXX"
+ << " Redraws: " << number_of_redraws
+ << " Updates: " << number_of_updates
+ << " FrameSkip: " << number_of_updates - number_of_redraws
+ << std::endl;
delete client;
delete server;
Index: goal_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/goal_manager.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- goal_manager.cxx 15 Jan 2003 21:16:41 -0000 1.5
+++ goal_manager.cxx 25 Mar 2003 00:37:44 -0000 1.6
@@ -21,6 +21,7 @@
#include "server.hxx"
#include "world.hxx"
#include "plf.hxx"
+#include "globals.hxx"
#include "pingu_holder.hxx"
#include "goal_manager.hxx"
@@ -40,7 +41,8 @@
{
// we are finished, now wait a few second so that everybody can
// see the particles, etc.
- std::cout << "XXXX goal reached: " << goal << std::endl;
+ if (maintainer_mode)
+ std::cout << "XXXX goal reached: " << goal << std::endl;
exit_time = server->get_time() + 125;
return false;
}
Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- menu_button.cxx 24 Mar 2003 11:18:53 -0000 1.2
+++ menu_button.cxx 25 Mar 2003 00:37:44 -0000 1.3
@@ -267,8 +267,8 @@
void
QuitButton::on_click()
{
- std::cout << "QuitButton: do exit" << std::endl;
- PingusSound::play_sound ("goodidea");
+ //std::cout << "QuitButton: do exit" << std::endl;
+ //PingusSound::play_sound ("goodidea");
menu->get_manager ()->show_exit_menu ();
}
Index: pingu_action_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_action_factory.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pingu_action_factory.cxx 19 Feb 2003 11:33:00 -0000 1.13
+++ pingu_action_factory.cxx 25 Mar 2003 00:37:44 -0000 1.14
@@ -140,15 +140,15 @@
void
PinguActionFactory::delete_actions ()
{
- std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions: "
- << all_actions.size() << std::endl;
+ //std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
"
+ //<< all_actions.size() << std::endl;
for (std::vector<PinguAction*>::iterator i = all_actions.begin ();
i != all_actions.end (); ++i)
{
delete *i;
}
all_actions.clear ();
- std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
done" << std::endl;
+ //std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
done" << std::endl;
}
void
Index: pingu_holder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_holder.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- pingu_holder.cxx 13 Oct 2002 20:25:00 -0000 1.18
+++ pingu_holder.cxx 25 Mar 2003 00:37:44 -0000 1.19
@@ -31,7 +31,6 @@
PinguHolder::~PinguHolder()
{
// Deleting all Pingu objects
- std::cout << "PinguHolder: Deleting pingus" << std::endl;
for(std::vector<Pingu*>::iterator i = all_pingus.begin();
i != all_pingus.end(); ++i)
delete *i;
Index: pingus_menu_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu_manager.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- pingus_menu_manager.cxx 24 Mar 2003 11:18:53 -0000 1.21
+++ pingus_menu_manager.cxx 25 Mar 2003 00:37:44 -0000 1.22
@@ -142,7 +142,7 @@
void
PingusMenuManager::exit ()
{
- std::cout << "poping PingusMenuManager" << std::endl;
+ //std::cout << "poping PingusMenuManager" << std::endl;
ScreenManager::instance ()->pop_screen ();
}
Index: result_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result_screen.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- result_screen.cxx 21 Mar 2003 22:08:06 -0000 1.3
+++ result_screen.cxx 25 Mar 2003 00:37:44 -0000 1.4
@@ -51,7 +51,6 @@
}
void on_click() {
- std::cout << "Got CLICK!!!" << std::endl;
ScreenManager::instance()->pop_screen();
}
};
@@ -73,7 +72,6 @@
void on_click()
{
- std::cout << "Got CLICK on Retry!!!" << std::endl;
ScreenManager::instance()->replace_screen(new PingusGameSession
(parent->result.plf, false),
true);
}
Index: spot_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/spot_map.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- spot_map.cxx 19 Feb 2003 09:50:36 -0000 1.24
+++ spot_map.cxx 25 Mar 2003 00:37:44 -0000 1.25
@@ -108,7 +108,6 @@
// Checking that the map has the correct size, only multiples of
// tile_size are allowed, anything else wouldn't fit very well on
// the colmap
-
if ((width % tile_size) != 0)
{
width += (tile_size - (width % tile_size));
Index: start_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/start_screen.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- start_screen.cxx 21 Mar 2003 22:40:12 -0000 1.1
+++ start_screen.cxx 25 Mar 2003 00:37:44 -0000 1.2
@@ -58,7 +58,6 @@
void on_click()
{
- std::cout << "Got CLICK!!!" << std::endl;
PingusGameSession* game_session = new PingusGameSession(plf, true);
ScreenManager::instance()->replace_screen(game_session, true);
}
Index: story_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- story_screen.cxx 23 Mar 2003 01:01:16 -0000 1.3
+++ story_screen.cxx 25 Mar 2003 00:37:44 -0000 1.4
@@ -72,19 +72,21 @@
class StoryScreenContinueButton : public GUI::SurfaceButton
{
private:
+ StoryScreenComponent* story_comp;
public:
- StoryScreenContinueButton()
+ StoryScreenContinueButton(StoryScreenComponent* arg_story_comp)
: GUI::SurfaceButton(600, 550,
ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE),
- ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE))
+ ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE)),
+ story_comp(arg_story_comp)
{
}
void on_click()
{
- std::cout << "Continue: Got CLICK!!!" << std::endl;
- ScreenManager::instance()->replace_screen (PingusMenuManager::instance (),
false);
+ story_comp->next_text();
+ //ScreenManager::instance()->replace_screen (PingusMenuManager::instance
(), false);
}
};
@@ -93,7 +95,7 @@
{
story_comp = new StoryScreenComponent();
gui_manager->add (story_comp);
- gui_manager->add (new StoryScreenContinueButton());
+ gui_manager->add (new StoryScreenContinueButton(story_comp));
}
StoryScreen::~StoryScreen()
Index: timer.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/timer.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- timer.cxx 7 Oct 2002 23:11:09 -0000 1.3
+++ timer.cxx 25 Mar 2003 00:37:44 -0000 1.4
@@ -18,7 +18,8 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <ClanLib/Core/System/system.h>
-#include <iostream>
+#include "debug.hxx"
+#include "globals.hxx"
#include "timer.hxx"
Timer::Timer(const char* desc)
@@ -31,8 +32,9 @@
Timer::stop()
{
unsigned int time = CL_System::get_time() - start_time;
- std::cout << "Timer: '" << description << "' took "
- << time << "msec" << std::endl;
+ pout(PINGUS_DEBUG_LOADING)
+ << "Timer: '" << description << "' took "
+ << time << "msec" << std::endl;
}
/* EOF */
Index: world.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/world.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- world.cxx 21 Mar 2003 22:08:06 -0000 1.42
+++ world.cxx 25 Mar 2003 00:37:44 -0000 1.43
@@ -41,35 +41,24 @@
return a->get_z_pos () < b->get_z_pos ();
}
-#ifdef WIN32
-//FIXME: ingo: This is a workaround around the std::list::sort()
-//FIXME: problem under MSVC6. This is copy&paste from an usenet
-//FIXME: article, so it might work or not, never tested it.
-// typedef WorldObj* CWorldObjPtr;
-// template<>
-// bool std::greater<CWorldObjPtr>::operator()(WorldObj* a, WorldObj* b) const
-// {
-// return WorldObj_less (a, b);
-// }
-#endif
-
World::World(PLF* plf)
: gfx_map(new PingusSpotMap(plf)),
game_time(new GameTime (game_speed)),
do_armageddon(false),
- pingu_particle_holder(new Particles::PinguParticleHolder()),
- rain_particle_holder(new Particles::RainParticleHolder()),
- smoke_particle_holder(new Particles::SmokeParticleHolder()),
- snow_particle_holder(new Particles::SnowParticleHolder()),
pingus(new PinguHolder(plf)),
colmap(gfx_map->get_colmap()),
view(0)
{
+ WorldObj::set_world(this);
+
start_x_pos = plf->get_startx();
start_y_pos = plf->get_starty();
- // Not perfect, but works
- WorldObj::set_world(this);
+ // These get deleted via the world_obj vector in the destructor
+ pingu_particle_holder = new Particles::PinguParticleHolder();
+ rain_particle_holder = new Particles::RainParticleHolder();
+ smoke_particle_holder = new Particles::SmokeParticleHolder();
+ snow_particle_holder = new Particles::SnowParticleHolder();
world_obj.push_back(gfx_map);
@@ -79,9 +68,6 @@
world_obj.push_back(snow_particle_holder);
init_worldobjs(plf);
-
- // FIXME: Ugly
- rain_particle_holder->set_world_width(get_width());
}
void
@@ -140,6 +126,8 @@
void
World::draw (GraphicContext& gc)
{
+ WorldObj::set_world(this);
+
for(WorldObjIter obj = world_obj.begin(); obj != world_obj.end(); ++obj)
{
(*obj)->draw (gc);
@@ -149,6 +137,8 @@
void
World::draw_smallmap(SmallMap* smallmap)
{
+ WorldObj::set_world(this);
+
for(WorldObjIter obj = world_obj.begin(); obj != world_obj.end(); ++obj)
{
(*obj)->draw_smallmap (smallmap);
@@ -158,6 +148,8 @@
void
World::update()
{
+ WorldObj::set_world(this);
+
game_time->update ();
if (do_armageddon)
Index: xml_helper.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_helper.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- xml_helper.cxx 29 Dec 2002 23:29:00 -0000 1.26
+++ xml_helper.cxx 25 Mar 2003 00:37:44 -0000 1.27
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
+#include "globals.hxx"
#include "vector.hxx"
#include "color.hxx"
#include "res_descriptor.hxx"
@@ -29,6 +30,26 @@
int xmlIsBlankNode(xmlNodePtr node) { return 0; }
#endif
+std::ostream& operator<<(std::ostream& s, xmlNode& node)
+{
+#ifdef LIBXML_2
+ xmlChar* path = xmlGetNodePath(&node);
+ s << path;
+ xmlFree(path);
+ return s;
+#else
+ xmlNodePtr cur = &node;
+
+ while (cur != NULL)
+ {
+ s << cur->name << "/";
+ cur = cur->parent;
+ }
+
+ return s;
+#endif
+}
+
xmlNodePtr
XMLhelper::skip_blank (xmlNodePtr cur)
{
@@ -197,7 +218,7 @@
int number = 999;
if (!node_list_get_string(doc, cur, 1, number)) {
- std::cout << "Error: XMLhelper: parse_int: Field empty" << std::endl;
+ std::cout << "Error: XMLhelper: parse_int: Field empty: " << *cur <<
std::endl;
}
return number;
}
@@ -209,7 +230,7 @@
float number = 3.1415927f;
if (!node_list_get_string(doc, cur, 1, number)) {
- std::cout << "XMLhelper: parse_int: Field empty" << std::endl;
+ std::cout << "XMLhelper: parse_int: Field empty: " << *cur << std::endl;
}
return number;
}
@@ -364,9 +385,9 @@
{
std::string ret_str;
- if (!node_list_get_string(doc,cur->children, 1, ret_str))
+ if (!node_list_get_string(doc,cur->children, 1, ret_str) && maintainer_mode)
{
- std::cout << "XMLhelper::parse_string: Field empty" << std::endl;
+ std::cout << "XMLhelper::parse_string: Field empty: " << *cur <<
std::endl;
}
return ret_str;
Index: xml_helper.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_helper.hxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- xml_helper.hxx 2 Nov 2002 21:12:16 -0000 1.18
+++ xml_helper.hxx 25 Mar 2003 00:37:44 -0000 1.19
@@ -131,6 +131,8 @@
XMLhelper& operator= (const XMLhelper&);
};
+std::ostream& operator<<(std::ostream& s, xmlNode& node);
+
#endif
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.23,1.24 blitter_impl.hxx,1.5,1.6 client.cxx,1.42,1.43 demo_recorder.cxx,1.13,1.14 exit_menu.cxx,1.12,1.13 game_session.cxx,1.34,1.35 goal_manager.cxx,1.5,1.6 menu_button.cxx,1.2,1.3 pingu_action_factory.cxx,1.13,1.14 pingu_holder.cxx,1.18,1.19 pingus_menu_manager.cxx,1.21,1.22 result_screen.cxx,1.3,1.4 spot_map.cxx,1.24,1.25 start_screen.cxx,1.1,1.2 story_screen.cxx,1.3,1.4 timer.cxx,1.3,1.4 world.cxx,1.42,1.43 xml_helper.cxx,1.26,1.27xml_helper.hxx,1.18,1.19,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src layer_manager.cxx,1.3,1.4 layer_manager.hxx,1.6,1.7 menu_background.cxx,1.5,1.6 menu_background.hxx,1.6,1.7 menu_button.cxx,1.1,1.2 pingus_menu_manager.cxx,1.20,1.21
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.11,1.12
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src layer_manager.cxx,1.3,1.4 layer_manager.hxx,1.6,1.7 menu_background.cxx,1.5,1.6 menu_background.hxx,1.6,1.7 menu_button.cxx,1.1,1.2 pingus_menu_manager.cxx,1.20,1.21
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.11,1.12
- Index(es):