Removed trailing whitespace from all *.?pp files
[supertux.git] / src / object / path_walker.hpp
index cc15320..2574b07 100644 (file)
@@ -1,12 +1,10 @@
-//  $Id$
-//
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
-//  This program is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU General Public License
-//  as published by the Free Software Foundation; either version 2
-//  of the License, or (at your option) any later version.
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
 //
 //  This program is distributed in the hope that it will be useful,
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  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.
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef HEADER_SUPERTUX_OBJECT_PATH_WALKER_HPP
+#define HEADER_SUPERTUX_OBJECT_PATH_WALKER_HPP
 
-#ifndef __PATH_WALKER_HPP__
-#define __PATH_WALKER_HPP__
+#include <string.h>
 
-#include "path.hpp"
+#include "object/path.hpp"
 
 /**
  * A walker that travels along a path
@@ -32,11 +31,13 @@ public:
   virtual ~PathWalker();
 
   /**
-   * advances the path walker on the path and returns the position delta
-   * to the last position
+   * advances the path walker on the path and returns its new position
    */
   virtual Vector advance(float elapsed_time);
 
+  /** current position of path walker */
+  Vector get_pos();
+
   /** advance until at given node, then stop */
   void goto_node(int node_no);
 
@@ -50,7 +51,7 @@ public:
   bool is_moving() {
     return running;
   }
-  
+
   const Path* path;
 
 private:
@@ -78,6 +79,12 @@ private:
   float node_mult;
 
   float walking_speed;
+
+private:
+  PathWalker(const PathWalker&);
+  PathWalker& operator=(const PathWalker&);
 };
 
 #endif
+
+/* EOF */