fix
[supertux.git] / src / badguy / badguy.h
index e770feb..b6a1d06 100644 (file)
@@ -1,12 +1,31 @@
+//  $Id$
+// 
+//  SuperTux
+//  Copyright (C) 2005 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 distributed in the hope that it will be useful,
+//  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.
 #ifndef __BADGUY_H__
 #define __BADGUY_H__
 
 // moved them here to make it less typing when implementing new badguys
 #include <math.h>
 #include "timer.h"
-#include "special/moving_object.h"
-#include "special/sprite.h"
-#include "math/physic.h"
+#include "moving_object.h"
+#include "sprite/sprite.h"
+#include "physic.h"
 #include "object/player.h"
 #include "serializable.h"
 #include "resources.h"
@@ -17,9 +36,7 @@
 #include "lisp/lisp.h"
 #include "lisp/writer.h"
 #include "video/drawing_context.h"
-#include "special/sprite_manager.h"
-
-using namespace SuperTux;
+#include "sprite/sprite_manager.h"
 
 class BadGuy : public MovingObject, public Serializable
 {
@@ -32,9 +49,9 @@ public:
    */
   virtual void draw(DrawingContext& context);
   /** Called each frame. The default implementation checks badguy state and
-   * calls active_action and inactive_action
+   * calls active_update and inactive_update
    */
-  virtual void action(float elapsed_time);
+  virtual void update(float elapsed_time);
   /** Called when a collision with another object occured. The default
    * implemetnation calls collision_player, collision_solid, collision_badguy
    * and collision_squished
@@ -55,6 +72,10 @@ public:
   {
     start_position = vec;
   }
+  
+  /** Count this badguy to the statistics? This value should not be changed
+   * during runtime. */
+  bool countMe;
 
 protected:
   enum State {
@@ -81,9 +102,9 @@ protected:
   virtual bool collision_squished(Player& player);
 
   /** called each frame when the badguy is activated. */
-  virtual void active_action(float elapsed_time);
+  virtual void active_update(float elapsed_time);
   /** called each frame when the badguy is not activated. */
-  virtual void inactive_action(float elapsed_time);
+  virtual void inactive_update(float elapsed_time);
 
   /**
    * called when the badguy has been activated. (As a side effect the dir
@@ -120,14 +141,11 @@ protected:
   Vector start_position;
 
   Direction dir;
-
-  int hitpoints;
-  int bullet_hitpoints;
 private:
   void try_activate();
   
   State state;
-  Timer2 state_timer;
+  Timer state_timer;
 };
 
 #endif