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 dot.hxx,1.6,1.7 dot_factory.


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.hxx,1.6,1.7 dot_factory.cxx,1.3,1.4 dot_factory.hxx,1.1,1.2 drawable.hxx,1.7,1.8 drawable_factory.hxx,1.1,1.2 graph.hxx,1.22,1.23 level_dot.cxx,1.21,1.22 level_dot.hxx,1.9,1.10 manager.cxx,1.36,1.37 manager.hxx,1.20,1.21 path.cxx,1.6,1.7 path.hxx,1.3,1.4 path_drawable.cxx,1.7,1.8 path_drawable.hxx,1.4,1.5 path_graph.cxx,1.20,1.21 path_graph.hxx,1.9,1.10 pathfinder.hxx,1.11,1.12 pingus.cxx,1.32,1.33 pingus.hxx,1.25,1.26 sprite_drawable.cxx,1.3,1.4 sprite_drawable.hxx,1.2,1.3 surface_drawable.cxx,1.5,1.6 surface_drawable.hxx,1.4,1.5 worldmap.cxx,1.45,1.46 worldmap.hxx,1.28,1.29
Date: 19 Apr 2003 10:23:22 -0000

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

Modified Files:
        dot.hxx dot_factory.cxx dot_factory.hxx drawable.hxx 
        drawable_factory.hxx graph.hxx level_dot.cxx level_dot.hxx 
        manager.cxx manager.hxx path.cxx path.hxx path_drawable.cxx 
        path_drawable.hxx path_graph.cxx path_graph.hxx pathfinder.hxx 
        pingus.cxx pingus.hxx sprite_drawable.cxx sprite_drawable.hxx 
        surface_drawable.cxx surface_drawable.hxx worldmap.cxx 
        worldmap.hxx 
Log Message:
removed trailing whitespace


Index: dot.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/dot.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dot.hxx     30 Mar 2003 22:09:33 -0000      1.6
+++ dot.hxx     19 Apr 2003 10:23:19 -0000      1.7
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -39,7 +39,7 @@
 
   /** Draw stuff that should be displayed if the mouse is over the dot */
   virtual void draw_hover(GraphicContext& gc) =0;
-  
+
   Vector get_pos() { return pos; }
   float  get_z_pos() const { return pos.z; }
 

Index: dot_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/dot_factory.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dot_factory.cxx     13 Oct 2002 01:09:18 -0000      1.3
+++ dot_factory.cxx     19 Apr 2003 10:23:19 -0000      1.4
@@ -29,11 +29,11 @@
 {
   if (XMLhelper::equal_str(cur->name, "leveldot"))
     {
-      
+
     }
   else if (XMLhelper::equal_str(cur->name, "tubedot"))
     {
-      
+
     }
   else
     {

Index: dot_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/dot_factory.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dot_factory.hxx     12 Oct 2002 23:34:43 -0000      1.1
+++ dot_factory.hxx     19 Apr 2003 10:23:19 -0000      1.2
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Index: drawable.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/drawable.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- drawable.hxx        10 Apr 2003 11:51:32 -0000      1.7
+++ drawable.hxx        19 Apr 2003 10:23:19 -0000      1.8
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -34,7 +34,7 @@
 protected:
   /** The symbolic id of the drawable */
   std::string name;
-  
+
   /** True if object should be visible, false otherwise */
   bool visible;
 
@@ -48,9 +48,9 @@
     : name(arg_name),
       visible(true)
   {
-  }    
+  }
 
-  Drawable(xmlDocPtr doc, xmlNodePtr cur) 
+  Drawable(xmlDocPtr doc, xmlNodePtr cur)
     : visible(true)
   {
     if (!XMLhelper::get_prop (cur, "name", name))
@@ -69,7 +69,7 @@
   virtual void update(float delta) =0;
 
   virtual float get_z_pos() const =0;
-  
+
 private:
   Drawable (const Drawable&);
   Drawable& operator= (const Drawable&);

Index: drawable_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/drawable_factory.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- drawable_factory.hxx        12 Oct 2002 23:37:23 -0000      1.1
+++ drawable_factory.hxx        19 Apr 2003 10:23:19 -0000      1.2
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Index: graph.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/graph.hxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- graph.hxx   18 Apr 2003 20:32:34 -0000      1.22
+++ graph.hxx   19 Apr 2003 10:23:19 -0000      1.23
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -34,14 +34,14 @@
 extern const EdgeId NoEdge;
 
 template<class NodeType>
-class Node 
+class Node
 {
 public:
-  Node (const NodeType& d) 
+  Node (const NodeType& d)
     : data (d)
   {}
 
-  Node& operator= (const NodeType& d) 
+  Node& operator= (const NodeType& d)
   {
     data = d;
     return *this;
@@ -74,9 +74,9 @@
 private:
   std::vector<Node<NodeType> > nodes;
   std::vector<Edge<EdgeType> > edges;
-  
+
 public:
-  Graph () 
+  Graph ()
   {
   }
 
@@ -91,16 +91,16 @@
     return *this;
   }
 
-  ~Graph () 
+  ~Graph ()
   {
   }
 
   NodeId add_node (NodeType d)
-  { 
+  {
     nodes.push_back (Node<NodeType>(d));
     return NodeId (nodes.size ()-1);
   }
-  
+
   EdgeId add_edge (const EdgeType& data, const NodeId& a, const NodeId& b, 
float cost)
   {
     Edge<EdgeType> new_edge (data, a, b, cost);
@@ -155,24 +155,24 @@
     assert(false);
        return *((Edge<EdgeType>*) 0);
   }
-  
+
   /* FIXME: This might give problems under MSVC, so it could be better to not 
use it */
   template<class Func>
-  void for_each_node (Func func) 
+  void for_each_node (Func func)
   {
     std::for_each (nodes.begin (), nodes.end (), func);
   }
 
   template<class Func>
-  void for_each_edge (Func func) 
+  void for_each_edge (Func func)
   {
-    std::for_each (edges.begin (), edges.end (), func);    
+    std::for_each (edges.begin (), edges.end (), func);
   }
 
   int nodes_size () {
     return nodes.size ();
   }
-  
+
   int max_node_handler_value () {
     return nodes.size ();
   }

Index: level_dot.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/level_dot.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- level_dot.cxx       15 Apr 2003 19:42:03 -0000      1.21
+++ level_dot.cxx       19 Apr 2003 10:23:19 -0000      1.22
@@ -67,10 +67,10 @@
       if (XMLhelper::equal_str(cur->name, "levelname"))
         {
           levelname = XMLhelper::parse_string(doc, cur);
-          //std::cout << "Levelname: " << levelname << std::endl;         
+          //std::cout << "Levelname: " << levelname << std::endl;
           plf = PLFResMgr::load_plf(levelname);
         }
-      
+
       cur = cur->next;
       cur = XMLhelper::skip_blank(cur);
     }
@@ -84,14 +84,14 @@
 
   float x = mpos.x - pos.x;
   float y = mpos.y - pos.y;
-  
+
   bool highlight = false;
 
   if (sqrt(x*x + y*y) < 30.0f)
     highlight = true;
-  
+
   Savegame* savegame = SavegameManager::instance()->get(levelname);
-  if (savegame 
+  if (savegame
       && (savegame->status == Savegame::FINISHED
           || savegame->status == Savegame::ACCESSIBLE))
     {
@@ -133,7 +133,7 @@
   if (savegame && savegame->status == Savegame::FINISHED)
     return true;
   else
-    return false; 
+    return false;
 }
 
 bool

Index: level_dot.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/level_dot.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- level_dot.hxx       10 Apr 2003 11:51:32 -0000      1.9
+++ level_dot.hxx       19 Apr 2003 10:23:19 -0000      1.10
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -47,7 +47,7 @@
 
   void update(float delta);
   PLFHandle get_plf () const { return plf; }
-  void on_click(); 
+  void on_click();
 
   bool finished();
   bool accessible();

Index: manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/manager.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- manager.cxx 10 Apr 2003 15:40:18 -0000      1.36
+++ manager.cxx 19 Apr 2003 10:23:19 -0000      1.37
@@ -36,7 +36,7 @@
 
 WorldMapManager* WorldMapManager::instance_ = 0;
 
-class WorldMapManagerCloseButton 
+class WorldMapManagerCloseButton
   : public GUI::SurfaceButton
 {
 public:
@@ -46,7 +46,7 @@
   void on_pointer_enter();
 };
 
-class WorldMapManagerStoryButton 
+class WorldMapManagerStoryButton
   : public GUI::SurfaceButton
 {
 public:
@@ -57,7 +57,7 @@
 };
 
 
-class WorldMapManagerCreditsButton 
+class WorldMapManagerCreditsButton
   : public GUI::SurfaceButton
 {
 public:
@@ -194,9 +194,9 @@
   else
     {
       SurfaceButton::draw(gc);
-      gc.print_left(Fonts::chalk_small, 
+      gc.print_left(Fonts::chalk_small,
                     CL_Display::get_width() - 100,
-                    CL_Display::get_height() - 20, 
+                    CL_Display::get_height() - 20,
                     _("Enter?"));
     }
 }
@@ -213,7 +213,7 @@
 {
   is_init = false;
   exit_worldmap = false;
- 
+
   // FIXME: a bit ugly because of the proteced member, but should work
   // FIXME: well enough. GUIScreen could also use multi-inheritage,
   // FIXME: but that could lead to member function name conflicts
@@ -237,7 +237,7 @@
 {
   if (worldmap)
     delete worldmap;
-    
+
   worldmap = new WorldMap (filename);
 }
 
@@ -251,7 +251,7 @@
     {
       load(path_manager.complete("worldmaps/tutorial.xml"));
     }
-  
+
   if (worldmap)
     worldmap->on_startup ();
 }
@@ -300,7 +300,7 @@
   UNUSED_ARG(delta);
 }
 
-void 
+void
 WorldMapManager::WorldMapComponent::on_primary_button_press (int x, int y)
 {
   //std::cout << "Buton press" << std::endl;
@@ -309,13 +309,13 @@
 }
 
 
-void 
+void
 WorldMapManager::WorldMapComponent::on_pointer_move (int x, int y)
 {
   WorldMapManager::instance ()->worldmap->on_pointer_move (x, y);
 }
 
-void 
+void
 WorldMapManager::WorldMapComponent::on_secondary_button_press (int x, int y)
 {
   //std::cout << "Buton press" << std::endl;
@@ -323,7 +323,7 @@
   WorldMapManager::instance ()->worldmap->on_secondary_button_press (x, y);
 }
 
-void 
+void
 WorldMapManager::change_map (const std::string& filename, NodeId node)
 {
   // Create the new worldmap and make it the current one

Index: manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/manager.hxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- manager.hxx 31 Mar 2003 21:52:03 -0000      1.20
+++ manager.hxx 19 Apr 2003 10:23:19 -0000      1.21
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -46,16 +46,16 @@
   {
   public:
     WorldMapComponent () { }
-      
+
     void on_primary_button_press (int x, int y);
     void on_secondary_button_press (int x, int y);
     void on_pointer_move(int x, int y);
-    
+
     void draw (GraphicContext& gc);
     void update (float delta);
-      
+
     bool is_at (int, int) { return true; }
-      
+
   private:
     WorldMapComponent (const WorldMapComponent&);
     WorldMapComponent& operator= (const WorldMapComponent&);
@@ -63,21 +63,21 @@
   };
 
   WorldMapComponent* worldmap_component;
-    
+
   friend class WorldMapComponent;
 private:
   static WorldMapManager* instance_;
 
   bool is_init;
   bool exit_worldmap;
-  
+
   WorldMap* worldmap;
   WorldMap* new_worldmap;
 
   WorldMapManager ();
 public:
   ~WorldMapManager ();
-  
+
   void load (const std::string& filename);
 
   /** Check if WorldMap manager still needs to run and exit if if
@@ -97,7 +97,7 @@
 
   WorldMap* get_worldmap() { return worldmap; }
 
-  /** Change the current map to the given map 
+  /** Change the current map to the given map
 
   @param filename the filename of the new map, filename must be
   @param filename relative to the worldmap directory
@@ -106,7 +106,7 @@
 
   /** Singleton access function */
   static WorldMapManager* instance ();
-    
+
 private:
   /** Startup Hook of the Screen */
   void on_startup ();

Index: path.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- path.cxx    26 Nov 2002 21:30:37 -0000      1.6
+++ path.cxx    19 Apr 2003 10:23:19 -0000      1.7
@@ -29,7 +29,7 @@
 {
 }
 
-std::vector<Vector>::size_type 
+std::vector<Vector>::size_type
 Path::size()
 {
   return vec.size();
@@ -49,7 +49,7 @@
       return path_length;
     }
 }
-  
+
 float
 Path::calc_length()
 {
@@ -84,7 +84,7 @@
       float length = Vector::distance2d(*current, *next);
 
       // The pingu is between current and next
-      if (comp_length + length > vec_position) 
+      if (comp_length + length > vec_position)
         {
           float perc = (vec_position - comp_length) // length to walk from 
current node
             / length;

Index: path.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- path.hxx    19 Oct 2002 17:43:07 -0000      1.3
+++ path.hxx    19 Apr 2003 10:23:19 -0000      1.4
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -33,7 +33,7 @@
 private:
   typedef std::vector<Vector> Vec;
   Vec vec;
-  
+
   bool  path_length_valid;
   float path_length;
 
@@ -49,7 +49,7 @@
 
   /** @return the length of the path in pixels */
   float length();
-  
+
   /** walk a distance of vec_position on the path and return the position,
       positions between two Vectors are interpolated, if length is
       larger then path *back() will be returned */
@@ -63,21 +63,21 @@
   reverse_iterator rbegin() { return vec.rbegin(); }
   reverse_iterator rend() { return vec.rend(); }
 
-  void push_back(const Vector& v) { 
-    path_length_valid = false; 
+  void push_back(const Vector& v) {
+    path_length_valid = false;
     vec.push_back(v);
   }
 
   void insert(Path& p) {
-    path_length_valid = false; 
-    //vec.insert(vec.end(), p.vec.begin(), p.vec.end()); 
+    path_length_valid = false;
+    //vec.insert(vec.end(), p.vec.begin(), p.vec.end());
     vec.reserve(vec.size() + p.vec.size ());
     std::copy(p.vec.begin(), p.vec.end(), std::back_inserter(vec));
   }
 
-  void reverse_insert(Path& p) { 
-    path_length_valid = false; 
-    //vec.insert(vec.end(), p.vec.rbegin(), p.vec.rend()); 
+  void reverse_insert(Path& p) {
+    path_length_valid = false;
+    //vec.insert(vec.end(), p.vec.rbegin(), p.vec.rend());
     vec.reserve(vec.size() + p.vec.size ());
     std::copy(p.vec.rbegin(), p.vec.rend(), std::back_inserter(vec));
   }

Index: path_drawable.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path_drawable.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- path_drawable.cxx   10 Apr 2003 11:51:32 -0000      1.7
+++ path_drawable.cxx   19 Apr 2003 10:23:19 -0000      1.8
@@ -41,7 +41,7 @@
     }
 }
 
-void 
+void
 PathDrawable::update (float delta)
 {
   UNUSED_ARG(delta);

Index: path_drawable.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path_drawable.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- path_drawable.hxx   10 Apr 2003 11:51:32 -0000      1.4
+++ path_drawable.hxx   19 Apr 2003 10:23:19 -0000      1.5
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Index: path_graph.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path_graph.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- path_graph.cxx      1 Apr 2003 18:24:25 -0000       1.20
+++ path_graph.cxx      19 Apr 2003 10:23:19 -0000      1.21
@@ -39,7 +39,7 @@
   // cur is at <graph>...
   cur = cur->children;
   cur = XMLhelper::skip_blank(cur);
-  
+
   while (cur)
     {
       if (XMLhelper::equal_str(cur->name, "nodes"))
@@ -73,7 +73,7 @@
   cur = XMLhelper::skip_blank(cur);
 
   //std::cout << "PathGraph::parse_nodes(xmlDocPtr doc, xmlNodePtr cur)" << 
std::endl;
-  
+
   while (cur)
     {
       //std::cout << "parsing nodes" << std::endl;
@@ -100,7 +100,7 @@
 
       cur = cur->next;
       cur = XMLhelper::skip_blank(cur);
-    }  
+    }
 }
 
 void
@@ -148,7 +148,7 @@
                 {
                   std::cout << "12929929: " << child_cur->name  << std::endl;
                 }
-              
+
               child_cur = child_cur->next;
               child_cur = XMLhelper::skip_blank(child_cur);
             }
@@ -164,19 +164,19 @@
           // FIXME: Memory leak
           if (pingus_debug_flags & PINGUS_DEBUG_WORLDMAP)
             worldmap->add_drawable(new PathDrawable(full_path));
-          
-          // FIXME: No error checking, 
+
+          // FIXME: No error checking,
           EdgeId id1 = graph.add_edge(path, // FIXME: Memory leak!
-                                      lookup_node(destination), 
lookup_node(source), 
+                                      lookup_node(destination), 
lookup_node(source),
                                       cost /* costs */);
 
           Path* path2 = new Path();
           path2->reverse_insert(*path);
           //EdgeId id2 =
           graph.add_edge(path2, // FIXME: Memory leak!
-                         lookup_node(source), lookup_node(destination), 
+                         lookup_node(source), lookup_node(destination),
                          cost /* costs */);
-          
+
           //std::cout << "Cost: " << cost << std::endl;
 
           // FIXME: edge lookup is flawed, since we have different edges in 
both directions
@@ -190,7 +190,7 @@
 
       cur = cur->next;
       cur = XMLhelper::skip_blank(cur);
-    }    
+    }
 }
 
 PathfinderResult
@@ -263,13 +263,13 @@
         }
     }
   std::cout << "PathGraph: Couldn't find id: " << id << std::endl;
-  return "error_node";  
+  return "error_node";
 }
 
 Dot*
 PathGraph::get_dot(NodeId id)
 {
-  return graph.resolve_node(id).data; 
+  return graph.resolve_node(id).data;
 }
 
 Dot*
@@ -281,7 +281,7 @@
       float y = y_pos - (*i)->get_pos().y;
 
       if (sqrt(x*x + y*y) < 30.0f)
-        return *i;        
+        return *i;
     }
   return 0;
 }

Index: path_graph.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/path_graph.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- path_graph.hxx      1 Apr 2003 18:24:25 -0000       1.9
+++ path_graph.hxx      19 Apr 2003 10:23:19 -0000      1.10
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Index: pathfinder.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/pathfinder.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pathfinder.hxx      16 Oct 2002 09:14:45 -0000      1.11
+++ pathfinder.hxx      19 Apr 2003 10:23:19 -0000      1.12
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -55,10 +55,10 @@
   };
 
 private:
-  struct CostComp 
+  struct CostComp
   {
     Pathfinder<T, C>& pathfinder;
-    
+
     CostComp(Pathfinder<T, C>& p) : pathfinder(p) {}
 
     bool operator()(NodeId a, NodeId b)
@@ -74,7 +74,7 @@
   NodeId start;
   std::priority_queue<NodeId, std::vector<NodeId>, CostComp> open_nodes;
   std::vector<NodeStat>   stat_graph;
-  
+
 public:
   /** Find pathes to all other nodes, by starting from the node \a s */
   Pathfinder (Graph<T, C>& g, NodeId s)
@@ -99,8 +99,8 @@
            NodeId child_node = graph.resolve_edge(*e).destination;
            NodeStat& stat = stat_graph[child_node];
            float new_cost = stat_graph[current].cost + 
graph.resolve_edge(*e).cost;
-           
-           if  (stat.status == NodeStat::OPEN 
+
+           if  (stat.status == NodeStat::OPEN
                 && stat.cost <= new_cost)
              {
                // do nothing, already now a better path
@@ -120,15 +120,15 @@
 
   /** The nodes to walk to reach end is returned in reverse order! so
       you have to handle the vector like a stack with .back() == .top() */
-  std::vector<NodeId> get_path (NodeId end) 
+  std::vector<NodeId> get_path (NodeId end)
   {
     std::vector<NodeId> path;
     NodeId handle = end;
-    
+
     do
       {
        path.push_back(handle);
-       //std::cout << "Handle: " << handle 
+       //std::cout << "Handle: " << handle
         //<< " Parent: " << stat_graph[handle].parent << std::endl;
 
        if (handle == start)
@@ -143,7 +143,7 @@
        else
          {
            handle = stat_graph[handle].parent;
-         }     
+         }
       }
     while (1);
   }

Index: pingus.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/pingus.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- pingus.cxx  13 Apr 2003 22:00:55 -0000      1.32
+++ pingus.cxx  19 Apr 2003 10:23:19 -0000      1.33
@@ -42,7 +42,7 @@
   pos.y = 200;
 
   sprite.set_align (-sprite.get_width()/2,  2 - sprite.get_height());
-  sprite_standing.set_align (-sprite_standing.get_width()/2,  
+  sprite_standing.set_align (-sprite_standing.get_width()/2,
                              -sprite_standing.get_height());
 }
 
@@ -88,7 +88,7 @@
   //std::cout << "Updating Walk: " << edge_path_position << "/" << 
edge_path_length << std::endl;
   // Update the edge_path_position
   edge_path_position += velocity * delta;
-  
+
   if (edge_path_position > edge_path.length()) // target reached
     {
       if (node_path.empty ()) // final target reached
@@ -157,7 +157,7 @@
           // Reverse the pingu
           std::swap(target_node, source_node);
           edge_path.reverse();
-          edge_path_position = edge_path.length() - edge_path_position;        
 
+          edge_path_position = edge_path.length() - edge_path_position;
           node_path.clear();
           return true;
         }
@@ -165,7 +165,7 @@
         {
           const PathfinderResult& node_path1 = path->get_path (source_node, 
target);
           const PathfinderResult& node_path2 = path->get_path (target_node, 
target);
-       
+
           // Check that a path exist
           if (node_path1.path.empty())
             {
@@ -247,7 +247,7 @@
   edge_path.clear();
 
   Path* partial_path = path->graph.resolve_edge(source_node, target_node).data;
-          
+
   edge_path.push_back(path->graph.resolve_node(source_node).data->get_pos());
   // Why do we need to reverse this?!
   edge_path.reverse_insert(*partial_path);

Index: pingus.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/pingus.hxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- pingus.hxx  10 Apr 2003 11:51:32 -0000      1.25
+++ pingus.hxx  19 Apr 2003 10:23:19 -0000      1.26
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -40,12 +40,12 @@
   /** The node on which the pingu currently stands, NoNode if the pingu is
       currently on the move to another node */
   NodeId current_node;
-  
+
   /** The node from which the pingu as started its walk to the
       target_node, value is undefined when the pingu is currently
       standing on a node */
   NodeId source_node;
- 
+
   /** The node to which the pingu is currently walking, value is
       undefined when the pingu is currently standing on a node. This
       is not the final target node (aka node_path.back()), but instead
@@ -64,7 +64,7 @@
   /** The path which represents an edge between two nodes, it includes
       both source and destinations position, so it is complete */
   Path edge_path;
-  
+
   /** The position in the edge_path, 0 means the pingu is on the
       source_node, edge_path_length means that the pingu has reached
       the target node. Position between edge_path nodes is
@@ -88,9 +88,9 @@
 
   /** @return true if the node is reachable, false otherwise */
   bool walk_to_node (NodeId target);
-  
+
   bool is_walking();
-  
+
   /** @return the node on which the pingu is currently standing, 0 is
       returned if the pingu is currently between two nodes */
   NodeId get_node () {
@@ -98,14 +98,14 @@
   }
 
   /** Set the pingu to the position of a given node */
-  void set_position (NodeId node); 
+  void set_position (NodeId node);
 
   /** return the current position in world coordinates */
   Vector get_pos() const { return pos; }
 
   /** Used for z-ordering for drawing */
   float get_z_pos() const;
-  
+
 private:
   /** Calculate the direction in which the pingu is heading, return
       value is in degrees => [0,360[, 0=north, 180=south, 270=east, 90=west */
@@ -119,7 +119,7 @@
   void update_edge_path();
 
   float calc_edge_path_length();
-  
+
   /** */
   Vector interpolate(const Vector& a, const Vector& b, float perc);
 

Index: sprite_drawable.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/sprite_drawable.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sprite_drawable.cxx 19 Feb 2003 09:50:36 -0000      1.3
+++ sprite_drawable.cxx 19 Apr 2003 10:23:19 -0000      1.4
@@ -25,7 +25,7 @@
 SpriteDrawable::SpriteDrawable(xmlDocPtr doc, xmlNodePtr cur)
   : Drawable(doc, cur)
 {
-  
+
 }
 
 SpriteDrawable::~SpriteDrawable()

Index: sprite_drawable.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/sprite_drawable.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sprite_drawable.hxx 10 Apr 2003 11:51:32 -0000      1.2
+++ sprite_drawable.hxx 19 Apr 2003 10:23:19 -0000      1.3
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -39,7 +39,7 @@
 
   void draw(GraphicContext& gc);
 
-  void update(float delta) 
+  void update(float delta)
   {
     sprite.update(delta);
   }

Index: surface_drawable.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/surface_drawable.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- surface_drawable.cxx        10 Apr 2003 11:51:32 -0000      1.5
+++ surface_drawable.cxx        19 Apr 2003 10:23:19 -0000      1.6
@@ -60,7 +60,7 @@
           Vector pingus_pos = 
WorldMapManager::instance()->get_worldmap()->get_pingus()->get_pos();
           // Pingu is not over the surface
           if (!(pingus_pos.x > pos.x && pingus_pos.x < pos.x + 
surface.get_width()
-                && 
+                &&
                 pingus_pos.y > pos.y && pingus_pos.y < pos.y + 
surface.get_height()))
             {
               gc.draw(surface, pos);

Index: surface_drawable.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/surface_drawable.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- surface_drawable.hxx        10 Apr 2003 11:51:32 -0000      1.4
+++ surface_drawable.hxx        19 Apr 2003 10:23:19 -0000      1.5
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2002 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Index: worldmap.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/worldmap.cxx,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- worldmap.cxx        13 Apr 2003 22:00:55 -0000      1.45
+++ worldmap.cxx        19 Apr 2003 10:23:19 -0000      1.46
@@ -60,8 +60,8 @@
   }
 };
 
-WorldMap::WorldMap(const std::string& arg_filename) 
-  : display_gc (0, 0, CL_Display::get_width()-1, CL_Display::get_height()-1, 
+WorldMap::WorldMap(const std::string& arg_filename)
+  : display_gc (0, 0, CL_Display::get_width()-1, CL_Display::get_height()-1,
                 0, 0),
     filename(arg_filename),
     width(1161), height(600), // FIXME: ugly..
@@ -70,11 +70,11 @@
 {
 
   xmlDocPtr doc = xmlParseFile(filename.c_str());
-  
-  if (!doc) 
+
+  if (!doc)
     {
       PingusError::raise (_("WorldMap: File not found: ") + filename);
-    }    
+    }
 
   xmlNodePtr cur = doc->ROOT;
   cur = XMLhelper::skip_blank(cur);
@@ -114,14 +114,14 @@
   //delete path_graph;
 }
 
-void 
+void
 WorldMap::parse_file(xmlDocPtr doc, xmlNodePtr cur)
 {
   if (cur && XMLhelper::equal_str(cur->name, "pingus-worldmap"))
     {
       cur = cur->children;
       cur = XMLhelper::skip_blank(cur);
-         
+
       while (cur)
        {
          if (XMLhelper::equal_str(cur->name, "graph"))
@@ -175,10 +175,10 @@
         {
           std::cout << "WorldMap::parse_objects: Parse Error" << std::endl;
         }
-      
+
       cur = cur->next;
       cur = XMLhelper::skip_blank(cur);
-    }      
+    }
 }
 
 void
@@ -201,14 +201,14 @@
 {
   Vector pingu_pos = pingus->get_pos();
 
-  pingu_pos.x = Math::mid(float(gc.get_width()/2), 
-                          pingu_pos.x, 
+  pingu_pos.x = Math::mid(float(gc.get_width()/2),
+                          pingu_pos.x,
                           float(width - gc.get_width()/2));
 
-  pingu_pos.y = Math::mid(float(gc.get_height()/2), 
-                          pingu_pos.y, 
+  pingu_pos.y = Math::mid(float(gc.get_height()/2),
+                          pingu_pos.y,
                           float(height - gc.get_height()/2));
-  
+
   display_gc.set_offset(-pingu_pos.x, -pingu_pos.y);
 
   std::stable_sort(drawables.begin(), drawables.end(), z_pos_sorter());
@@ -218,38 +218,38 @@
       (*i)->draw (display_gc);
     }
 
-  gc.draw(levelname_bg, 
-          gc.get_width()/2 - levelname_bg.get_width()/2, 
+  gc.draw(levelname_bg,
+          gc.get_width()/2 - levelname_bg.get_width()/2,
           gc.get_height() - levelname_bg.get_height());
 
   if (pingus->get_node() != NoNode)
     {
       LevelDot* leveldot = 
dynamic_cast<LevelDot*>(path_graph->get_dot(pingus->get_node()));
-      
+
       if (leveldot)
         {
-          gc.print_center(Fonts::chalk_small, 
-                          display_gc.get_width ()/2, 
+          gc.print_center(Fonts::chalk_small,
+                          display_gc.get_width ()/2,
                           display_gc.get_height() - 20,
                           
System::translate(leveldot->get_plf()->get_levelname()));
         }
       else
         {
-          gc.print_center(Fonts::chalk_small, 
-                          display_gc.get_width ()/2, 
+          gc.print_center(Fonts::chalk_small,
+                          display_gc.get_width ()/2,
                           display_gc.get_height() - 20,
                           "---");
         }
     }
   else
     {
-          gc.print_center(Fonts::chalk_small, 
-                          display_gc.get_width ()/2, 
+          gc.print_center(Fonts::chalk_small,
+                          display_gc.get_width ()/2,
                           display_gc.get_height() - 20,
                           _("...walking..."));
     }
-  
-  
+
+
   Vector mpos = display_gc.screen_to_world(Vector(mouse_x, mouse_y));
   Dot* dot = path_graph->get_dot(mpos.x, mpos.y);
   if (dot)
@@ -324,7 +324,7 @@
     {
       if (maintainer_mode)
         std::cout << "WorldMap: Clicked on: " << dot->get_name() << std::endl;
-        
+
       if (path_graph->lookup_node(dot->get_name()) == pingus->get_node())
         {
           if (maintainer_mode)
@@ -395,8 +395,8 @@
   {
     path_graph = g;
   }
-  
-  void operator()(Node<Dot*>& node) 
+
+  void operator()(Node<Dot*>& node)
   {
     if (node.data->finished())
       {
@@ -420,7 +420,7 @@
 
   bool credits_unlocked = false;
   StatManager::instance()->get_bool("credits-unlocked", credits_unlocked);
-  
+
   if (!credits_unlocked)
     {
       Dot* dot = path_graph->get_dot(path_graph->lookup_node("leveldot_19"));

Index: worldmap.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/worldmap.hxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- worldmap.hxx        11 Apr 2003 13:12:54 -0000      1.28
+++ worldmap.hxx        19 Apr 2003 10:23:19 -0000      1.29
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  Pingus - A free Lemmings clone
 //  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -65,7 +65,7 @@
 
   /** The graph that represents the path on the map */
   PathGraph* path_graph;
-  
+
   /** A collection of drawable things, allocation and deallocation
       takes place elsewhere these are only references to other
       objects */
@@ -88,13 +88,13 @@
 
   void draw (GraphicContext& gc);
   void update (float delta);
-  
+
   /** Enters the level on which the Pingu is currently standing */
   void enter_level();
 
   /** The the pingu to the given Node */
   void set_pingus(NodeId id);
-  
+
   /** FIXME: Memory leak?! */
   void add_drawable(Drawable* drawable);
   void remove_drawable(Drawable* drawable);
@@ -115,19 +115,19 @@
 
   /** Parses a WorldMap XML file */
   void parse_file(xmlDocPtr doc, xmlNodePtr cur);
-  
-  /** Parse the object section of the Worldmap XML file, it contains 
+
+  /** Parse the object section of the Worldmap XML file, it contains
       Sprites, Backgrounds and other things */
   void parse_objects(xmlDocPtr doc, xmlNodePtr cur);
 
   /** Parse the graph section of the WorldMap XML file, it contains
       the path where the Pingu can walk on. */
   void parse_graph(xmlDocPtr doc, xmlNodePtr cur);
-  
+
   /** Parse the propertie section of a WorldMap XML file, it contains
       meta data such as the author or the name of the Worldmap */
   void parse_properties(xmlDocPtr doc, xmlNodePtr cur);
-  
+
   /** Unlock nodes according to the finished ones */
   void update_locked_nodes();
 };





reply via email to

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