pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.25,1.26 path_g


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.25,1.26 path_graph.cxx,1.18,1.19 pingus.cxx,1.27,1.28worldmap.cxx,1.33,1.34
Date: 25 Mar 2003 00:37:46 -0000

Update of /var/lib/cvs/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv28294/worldmap

Modified Files:
        manager.cxx path_graph.cxx pingus.cxx worldmap.cxx 
Log Message:
- removed lots of not so usefull std::cout's

Index: manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/manager.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- manager.cxx 21 Mar 2003 22:08:06 -0000      1.25
+++ manager.cxx 25 Mar 2003 00:37:44 -0000      1.26
@@ -109,7 +109,7 @@
 void
 WorldMapManager::on_escape_press ()
 {
-  std::cout << "WorldMapManager::on_escape_press ()..." << std::endl;
+  //std::cout << "WorldMapManager::on_escape_press ()..." << std::endl;
   exit_worldmap = true;
 }
 

Index: path_graph.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path_graph.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- path_graph.cxx      18 Feb 2003 11:28:41 -0000      1.18
+++ path_graph.cxx      25 Mar 2003 00:37:44 -0000      1.19
@@ -34,7 +34,7 @@
 PathGraph::PathGraph(WorldMap* arg_worldmap, xmlDocPtr doc, xmlNodePtr cur)
   : worldmap(arg_worldmap)
 {
-  std::cout << "PathGraph::PathGraph(WorldMap* arg_worldmap, xmlDocPtr doc, 
xmlNodePtr cur)" << std::endl;
+  //std::cout << "PathGraph::PathGraph(WorldMap* arg_worldmap, xmlDocPtr doc, 
xmlNodePtr cur)" << std::endl;
 
   // cur is at <graph>...
   cur = cur->children;
@@ -72,7 +72,7 @@
   cur = cur->children;
   cur = XMLhelper::skip_blank(cur);
 
-  std::cout << "PathGraph::parse_nodes(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
+  //std::cout << "PathGraph::parse_nodes(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
   
   while (cur)
     {
@@ -109,7 +109,7 @@
   cur = cur->children;
   cur = XMLhelper::skip_blank(cur);
 
-  std::cout << "PathGraph::parse_edges(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
+  //std::cout << "PathGraph::parse_edges(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
 
   while (cur)
     {

Index: pingus.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/pingus.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- pingus.cxx  21 Mar 2003 22:08:06 -0000      1.27
+++ pingus.cxx  25 Mar 2003 00:37:44 -0000      1.28
@@ -128,7 +128,6 @@
         }
       else
         {
-          std::cout << "XXXXXXX Path cost: " << res.cost << std::endl;
           node_path = res.path;
 
           // Simulate that we just reached current_node, then update the 
edge_path

Index: worldmap.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/worldmap.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- worldmap.cxx        21 Mar 2003 22:08:06 -0000      1.33
+++ worldmap.cxx        25 Mar 2003 00:37:44 -0000      1.34
@@ -73,7 +73,7 @@
   parse_file(doc, cur);
 
   pingus = new Pingus(path_graph);
-  std::cout << "PingusPtr: " << pingus << std::endl;
+  //std::cout << "PingusPtr: " << pingus << std::endl;
   // FIXME: This should not be hardcoded, but instead be noted in the
   // savegame or worldmap
   pingus->set_position(0);
@@ -174,13 +174,13 @@
 {
   Vector pingu_pos = pingus->get_pos();
 
-  pingu_pos.x = Math::mid(float(display_gc.get_width()/2), 
+  pingu_pos.x = Math::mid(float(gc.get_width()/2), 
                           pingu_pos.x, 
-                          float(width - display_gc.get_width()/2));
+                          float(width - gc.get_width()/2));
 
-  pingu_pos.y = Math::mid(float(display_gc.get_height()/2), 
+  pingu_pos.y = Math::mid(float(gc.get_height()/2), 
                           pingu_pos.y, 
-                          float(height - display_gc.get_height()/2));
+                          float(height - gc.get_height()/2));
   
   display_gc.set_offset(-pingu_pos.x, -pingu_pos.y);
 
@@ -196,8 +196,10 @@
       LevelDot* leveldot = 
dynamic_cast<LevelDot*>(path_graph->get_dot(pingus->get_node()));
       
       if (leveldot)
-        gc.print_center(Fonts::pingus_small, gc.get_width ()/2, 
gc.get_height() - 40,
-                        
System::translate(leveldot->get_plf()->get_levelname()));
+        gc.print_center(Fonts::pingus_small, 
+                                display_gc.get_width ()/2, 
+                                display_gc.get_height() - 40,
+                                
System::translate(leveldot->get_plf()->get_levelname()));
     }
   
   
@@ -209,12 +211,14 @@
 
       if (leveldot)
         {
-          gc.print_center(Fonts::pingus_small, mouse_x, mouse_y - 30,
+          gc.print_center(Fonts::pingus_small,
+                          mouse_x, mouse_y - 30,
                           
System::translate(leveldot->get_plf()->get_levelname()));
 
           if (maintainer_mode)
             {
-              gc.print_center(Fonts::pingus_small, mouse_x, mouse_y - 56,
+              gc.print_center(Fonts::pingus_small,
+                              mouse_x, mouse_y - 56,
                               leveldot->get_plf()->get_filename());
             }
         }
@@ -279,17 +283,20 @@
   Dot* dot = path_graph->get_dot(click_pos.x, click_pos.y);
   if (dot)
     {
-      std::cout << "WorldMap: Clicked on: " << dot->get_name() << std::endl;
+      if (maintainer_mode)
+        std::cout << "WorldMap: Clicked on: " << dot->get_name() << std::endl;
       if (path_graph->lookup_node(dot->get_name()) == pingus->get_node())
         {
-          std::cout << "WorldMap: Pingu is on node, issue on_click()" << 
std::endl;
+          if (maintainer_mode)
+            std::cout << "WorldMap: Pingu is on node, issue on_click()" << 
std::endl;
           dot->on_click();
         }
       else
         {
           if (!pingus->walk_to_node(path_graph->lookup_node(dot->get_name())))
             {
-              std::cout << "WorldMap: NO PATH TO NODE FOUND!" << std::endl;
+              if (maintainer_mode)
+                std::cout << "WorldMap: NO PATH TO NODE FOUND!" << std::endl;
             }
         }
     }
@@ -312,9 +319,14 @@
 {
   Dot* dot = path_graph->get_dot(get_pingus()->get_node());
   if (dot)
-    dot->on_click();
+    {
+      dot->on_click();
+    }
   else
-    std::cout << "WorldMap: Pingus not on level" << std::endl;
+    {
+      if (maintainer_mode)
+        std::cout << "WorldMap: Pingus not on level" << std::endl;
+    }
 }
 
 } // namespace WorldMapNS





reply via email to

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