pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/actions Makefile.am,1.12,1.13 angel.c


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions Makefile.am,1.12,1.13 angel.cxx,1.6,1.7 angel.hxx,1.6,1.7 basher.cxx,1.10,1.11 basher.hxx,1.6,1.7 blocker.cxx,1.4,1.5 blocker.hxx,1.6,1.7 boarder.cxx,1.4,1.5 boarder.hxx,1.6,1.7 bomber.cxx,1.8,1.9 bomber.hxx,1.8,1.9 bridger.cxx,1.10,1.11 bridger.hxx,1.8,1.9 climber.cxx,1.6,1.7 climber.hxx,1.5,1.6 digger.cxx,1.8,1.9 digger.hxx,1.5,1.6 drown.cxx,1.3,1.4 drown.hxx,1.5,1.6 exiter.cxx,1.3,1.4 exiter.hxx,1.5,1.6 faller.cxx,1.15,1.16 faller.hxx,1.10,1.11 floater.cxx,1.10,1.11 floater.hxx,1.7,1.8 jumper.cxx,1.6,1.7 jumper.hxx,1.5,1.6 laser_kill.cxx,1.2,1.3 laser_kill.hxx,1.5,1.6 miner.cxx,1.6,1.7 miner.hxx,1.5,1.6 rocket_launcher.cxx,1.4,1.5 rocket_launcher.hxx,1.5,1.6 slider.cxx,1.4,1.5 slider.hxx,1.5,1.6 smashed.cxx,1.2,1.3 smashed.hxx,1.5,1.6 splashed.cxx,1.3,1.4 splashed.hxx,1.5,1.6 superman.cxx,1.2,1.3 superman.hxx,1.6,1.7 teleported.cxx,1.4,1.5 teleported.hxx,1.5,1.6 waiter.cxx,1.3,1.4 waiter.hxx,1.5,1.6 walker.cxx,1.16,1.17 walker.hxx,1.5,1.6
Date: 25 Aug 2002 09:08:52 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv10564/actions

Modified Files:
        Makefile.am angel.cxx angel.hxx basher.cxx basher.hxx 
        blocker.cxx blocker.hxx boarder.cxx boarder.hxx bomber.cxx 
        bomber.hxx bridger.cxx bridger.hxx climber.cxx climber.hxx 
        digger.cxx digger.hxx drown.cxx drown.hxx exiter.cxx 
        exiter.hxx faller.cxx faller.hxx floater.cxx floater.hxx 
        jumper.cxx jumper.hxx laser_kill.cxx laser_kill.hxx miner.cxx 
        miner.hxx rocket_launcher.cxx rocket_launcher.hxx slider.cxx 
        slider.hxx smashed.cxx smashed.hxx splashed.cxx splashed.hxx 
        superman.cxx superman.hxx teleported.cxx teleported.hxx 
        waiter.cxx waiter.hxx walker.cxx walker.hxx 
Log Message:
- moved actions into own namespace
- some little cleanup


Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Makefile.am 28 Jun 2002 17:07:13 -0000      1.12
+++ Makefile.am 25 Aug 2002 09:08:49 -0000      1.13
@@ -50,7 +50,6 @@
 noinst_LIBRARIES = libpingu_actions.a
 
 libpingu_actions_a_SOURCES =       \
-        waiter.cxx   waiter.hxx \
          angel.cxx    angel.hxx \
          basher.cxx   basher.hxx     \
          blocker.cxx  blocker.hxx    \
@@ -72,6 +71,7 @@
          splashed.cxx splashed.hxx \
          superman.cxx superman.hxx \
          teleported.cxx teleported.hxx \
+        waiter.cxx   waiter.hxx \
          walker.cxx   walker.hxx
 
 # EOF #

Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- angel.cxx   17 Aug 2002 17:21:25 -0000      1.6
+++ angel.cxx   25 Aug 2002 09:08:49 -0000      1.7
@@ -23,39 +23,42 @@
 #include "../string_converter.hxx"
 #include "angel.hxx"
 
-Angel::Angel () : counter(0.0), x_pos(0)
-{
-}
+namespace Actions {
 
-void
-Angel::init()
-{
-  x_pos = pingu->pos.x;
-  counter = 0.0;
-  sprite = Sprite (PingusResource::load_surface 
-                  ("Pingus/angel" + to_string(pingu->get_owner ()),
-                   "pingus"));
-  sprite.set_align_center_bottom (); 
-}
+  Angel::Angel () : counter(0.0), x_pos(0)
+  {
+  }
 
-void  
-Angel::update(float delta)
-{
-  sprite.update (delta);
-  counter += delta;
-  pingu->pos.x = x_pos + 20 * sin (counter * 3.0);
-  pingu->pos.y -= 50.0f * delta;
+  void
+  Angel::init()
+  {
+    x_pos = pingu->pos.x;
+    counter = 0.0;
+    sprite = Sprite (PingusResource::load_surface 
+                    ("Pingus/angel" + to_string(pingu->get_owner ()),
+                     "pingus"));
+    sprite.set_align_center_bottom (); 
+  }
 
-  // Out of screen, let the pingu die
-  if (pingu->pos.y < -32)
-    pingu->set_status (PS_DEAD);
-}
+  void  
+  Angel::update(float delta)
+  {
+    sprite.update (delta);
+    counter += delta;
+    pingu->pos.x = x_pos + 20 * sin (counter * 3.0);
+    pingu->pos.y -= 50.0f * delta;
 
-void   
-Angel::draw_offset(int x_of, int y_of, float /*s*/)
-{
-  sprite.put_screen (pingu->get_x () + x_of,
-                    pingu->get_y () + y_of);
-}
+    // Out of screen, let the pingu die
+    if (pingu->pos.y < -32)
+      pingu->set_status (PS_DEAD);
+  }
 
+  void   
+  Angel::draw_offset(int x_of, int y_of, float /*s*/)
+  {
+    sprite.put_screen (pingu->get_x () + x_of,
+                      pingu->get_y () + y_of);
+  }
+
+}
 /* EOF */

Index: angel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- angel.hxx   23 Aug 2002 15:49:53 -0000      1.6
+++ angel.hxx   25 Aug 2002 09:08:49 -0000      1.7
@@ -20,36 +20,32 @@
 #ifndef HEADER_PINGUS_ACTIONS_ANGEL_HXX
 #define HEADER_PINGUS_ACTIONS_ANGEL_HXX
 
-//
-// Necessary for Windows environment
-//
-// Does it work really on Linux?
-//
-#ifdef WIN32
-#include <math.h>
-#endif
-
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Angel : public PinguAction
-{
-private:
-  double counter;
-  double x_pos;
-  Sprite sprite;
-public:
-  Angel ();
-  void  init();
-  std::string get_name() const { return "Angel"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Angel; }
-  void  update(float delta);
-  void  draw_offset(int, int, float s);
 
-private:
-  Angel (const Angel&);
-  Angel operator= (const Angel&);
-};
+namespace Actions {
+
+  class Angel : public PinguAction
+  {
+  private:
+    double counter;
+    double x_pos;
+    Sprite sprite;
+  public:
+    Angel ();
+    void  init();
+    std::string get_name() const { return "Angel"; }
+    ActionName get_type() const { return Actions::Angel; }
+    void  update(float delta);
+    void  draw_offset(int, int, float s);
+
+  private:
+    Angel (const Angel&);
+    Angel operator= (const Angel&);
+  };
+
+}
 
 #endif
 

Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- basher.cxx  23 Aug 2002 15:49:53 -0000      1.10
+++ basher.cxx  25 Aug 2002 09:08:49 -0000      1.11
@@ -27,111 +27,114 @@
 
 using namespace std;
 
-// Initialise class static.
-const int Basher::bash_height = 4;
-
-Basher::Basher() : basher_c(0), first_bash(true)
-{
-}
+namespace Actions {
 
-void
-Basher::init(void)
-{
-  first_bash = true;
-  bash_radius = PingusResource::load_surface ("Other/bash_radius", "pingus");
-  bash_radius_gfx = PingusResource::load_surface ("Other/bash_radius_gfx", 
"pingus");
-  sprite = Sprite (PingusResource::load_surface ("Pingus/basher0", "pingus"));
-  sprite.set_align_center_bottom ();
+  Basher::Basher() : basher_c(0), first_bash(true)
+  {
+  }
 
-  // Start a bash even so the action will stops instantly after the
-  // first bash
-  bash ();
-}
+  void
+  Basher::init(void)
+  {
+    first_bash = true;
+    bash_radius = PingusResource::load_surface ("Other/bash_radius", "pingus");
+    bash_radius_gfx = PingusResource::load_surface ("Other/bash_radius_gfx", 
"pingus");
+    sprite = Sprite (PingusResource::load_surface ("Pingus/basher0", 
"pingus"));
+    sprite.set_align_center_bottom ();
 
-void
-Basher::draw_offset(int x, int y, float /*s*/)
-{
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
+    // Start a bash even so the action will stops instantly after the
+    // first bash
+    bash ();
+  }
 
-  sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
-}
+  void
+  Basher::draw_offset(int x, int y, float s)
+  {
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
 
-void
-Basher::update(float delta)
-{
-  sprite.update (delta);
+    sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
+    
+    UNUSED_ARG(s);
+  }
 
-  ++basher_c;
-  if (basher_c % 3 == 0)
-    {
-      walk_forward();
+  void
+  Basher::update(float delta)
+  {
+    sprite.update (delta);
 
-      if (have_something_to_dig())
-       {
-         // We only bash every second step, cause the Pingus would
-         // get trapped otherwise in the bashing area.
-         if (basher_c % 2 == 0)
-           bash();
-       }
-      else if (sprite.get_progress () > 0.6f)
-       {
-         pingu->set_action(Pingus::Actions::Walker);
-       }
-    }
-}
+    ++basher_c;
+    if (basher_c % 3 == 0)
+      {
+        walk_forward();
 
-void
-Basher::bash()
-{
-  pingu->get_world()->get_colmap()->remove(bash_radius,
-                                          pingu->get_x () - 
(bash_radius.get_width()/2),
-                                          pingu->get_y () - 31);
-  pingu->get_world()->get_gfx_map()->remove(bash_radius_gfx,
-                                           pingu->get_x () - 
(bash_radius_gfx.get_width()/2),
-                                           pingu->get_y () - 31);
-}
+        if (have_something_to_dig())
+         {
+           // We only bash every second step, cause the Pingus would
+           // get trapped otherwise in the bashing area.
+           if (basher_c % 2 == 0)
+             bash();
+         }
+        else if (sprite.get_progress () > 0.6f)
+         {
+           pingu->set_action(Actions::Walker);
+         }
+      }
+  }
 
-void
-Basher::walk_forward()
-{
-  if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING) {
-    // We are in the air... lets fall...
-    pingu->set_action(Pingus::Actions::Faller);
-  } else {
-    // On ground, walk forward...
-    pingu->pos.x += pingu->direction;
+  void
+  Basher::bash()
+  {
+    pingu->get_world()->get_colmap()->remove(bash_radius,
+                                            pingu->get_x () - 
(bash_radius.get_width()/2),
+                                            pingu->get_y () - 31);
+    pingu->get_world()->get_gfx_map()->remove(bash_radius_gfx,
+                                             pingu->get_x () - 
(bash_radius_gfx.get_width()/2),
+                                             pingu->get_y () - 31);
   }
-}
 
-bool
-Basher::have_something_to_dig()
-{
-  if (first_bash)
-    {
-      first_bash = false;
-      return true;
+  void
+  Basher::walk_forward()
+  {
+    if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING) {
+      // We are in the air... lets fall...
+      pingu->set_action(Actions::Faller);
+    } else {
+      // On ground, walk forward...
+      pingu->pos.x += pingu->direction;
     }
+  }
 
-  for(int i = 0; i < 16; ++i)
-    {
-      // Check that there is a high enough wall (i.e. not 1 pixel) to bash.
-      // Probably best to check from where Pingu can't automatically walk up
-      // up to head collision height.
-      for (int j = bash_height + 1; j <= 26; ++j)
-        {
-          if (rel_getpixel(i,j) == GroundpieceData::GP_GROUND)
-           {
-             pout(PINGUS_DEBUG_ACTIONS) << "Basher: Found something to dig..." 
<< std::endl;
-             return true;
-           }
-       }
-    }
+  bool
+  Basher::have_something_to_dig()
+  {
+    if (first_bash)
+      {
+        first_bash = false;
+        return true;
+      }
+
+    for(int i = 0; i < 16; ++i)
+      {
+        // Check that there is a high enough wall (i.e. not 1 pixel) to bash.
+        // Probably best to check from where Pingu can't automatically walk up
+        // up to head collision height.
+        for (int j = bash_height + 1; j <= 26; ++j)
+          {
+            if (rel_getpixel(i,j) == GroundpieceData::GP_GROUND)
+             {
+               pout(PINGUS_DEBUG_ACTIONS) << "Basher: Found something to 
dig..." << std::endl;
+               return true;
+             }
+         }
+      }
+
+    cout << "nothing to dig found" << endl;
+    return false;
+  }
 
-  cout << "nothing to dig found" << endl;
-  return false;
 }
 
 /* EOF */

Index: basher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- basher.hxx  23 Aug 2002 15:49:53 -0000      1.6
+++ basher.hxx  25 Aug 2002 09:08:49 -0000      1.7
@@ -23,35 +23,38 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Basher : public PinguAction
-{
-private:
-  Sprite sprite;
-  CL_Surface bash_radius;
-  CL_Surface bash_radius_gfx;
-  int basher_c;
-  bool first_bash;
-public:
-  Basher();
-  virtual ~Basher() {}
+namespace Actions {
+
+  class Basher : public PinguAction
+  {
+  private:
+    Sprite sprite;
+    CL_Surface bash_radius;
+    CL_Surface bash_radius_gfx;
+    int basher_c;
+    bool first_bash;
+  public:
+    Basher();
+    virtual ~Basher() {}
   
-  void   init(void);
-  std::string get_name () const { return "Basher"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Basher; }
-  void draw_offset(int x, int y, float s);
-  void update(float delta);
-  bool have_something_to_dig();
-  void walk_forward();
-  void bash();
+    void   init (void);
+    std::string get_name () const { return "Basher"; }
+    ActionName get_type() const { return Actions::Basher; }
+    void draw_offset(int x, int y, float s);
+    void update(float delta);
+    bool have_something_to_dig();
+    void walk_forward();
+    void bash();
   
-  /// Defines "wall" height needed so as to determine whether it should be 
bashed.
-  static const int bash_height;
+    /// Defines "wall" height needed so as to determine whether it should be 
bashed.
+    enum { bash_height = 4 };
   
-private:
-  Basher (const Basher&);
-  Basher operator= (const Basher&);
-};
+  private:
+    Basher (const Basher&);
+    Basher operator= (const Basher&);
+  };
+
+}
 
 #endif
 

Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- blocker.cxx 23 Aug 2002 15:49:53 -0000      1.4
+++ blocker.cxx 25 Aug 2002 09:08:49 -0000      1.5
@@ -26,84 +26,88 @@
 #include "../string_converter.hxx"
 #include "blocker.hxx"
 
-Blocker::Blocker()
-{
-}
+namespace Actions {
 
-void
-Blocker::init(void)
-{
-  sprite = Sprite(PingusResource::load_surface ("Pingus/blocker" 
-                                               + to_string (pingu->get_owner 
()),
-                                               "pingus"));
-  sprite.set_align_center_bottom ();
+  Blocker::Blocker()
+  {
+  }
 
-  if (rel_getpixel(0,-1)     ==  GroundpieceData::GP_NOTHING
-      && rel_getpixel(0, -2) ==  GroundpieceData::GP_GROUND)
-    {
-      ++pingu->pos.x;
-    } 
-  else if (rel_getpixel(0,-1) ==  GroundpieceData::GP_NOTHING
-          && rel_getpixel(0, -2) ==  GroundpieceData::GP_NOTHING
-          && rel_getpixel(0,-3) ==  GroundpieceData::GP_GROUND)
-    {
-      ++pingu->pos.y;
-      ++pingu->pos.y;
-    }
-}
+  void
+  Blocker::init(void)
+  {
+    sprite = Sprite(PingusResource::load_surface ("Pingus/blocker" 
+                                                 + to_string (pingu->get_owner 
()),
+                                                 "pingus"));
+    sprite.set_align_center_bottom ();
 
-void
-Blocker::update(float delta)
-{
-  if (!standing_on_ground())
-    {
-      pingu->set_action(Pingus::Actions::Faller);
-    }
+    if (rel_getpixel(0,-1)     ==  GroundpieceData::GP_NOTHING
+        && rel_getpixel(0, -2) ==  GroundpieceData::GP_GROUND)
+      {
+        ++pingu->pos.x;
+      } 
+    else if (rel_getpixel(0,-1) ==  GroundpieceData::GP_NOTHING
+            && rel_getpixel(0, -2) ==  GroundpieceData::GP_NOTHING
+            && rel_getpixel(0,-3) ==  GroundpieceData::GP_GROUND)
+      {
+        ++pingu->pos.y;
+        ++pingu->pos.y;
+      }
+  }
+
+  void
+  Blocker::update(float delta)
+  {
+    if (!standing_on_ground())
+      {
+        pingu->set_action(Actions::Faller);
+      }
     
-  UNUSED_ARG(delta);
-}
+    UNUSED_ARG(delta);
+  }
 
-void
-Blocker::draw_offset(int x, int y, float s)
-{
-  sprite.put_screen (pingu->pos + CL_Vector(x, y));
-  UNUSED_ARG(s);
-}
+  void
+  Blocker::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (pingu->pos + CL_Vector(x, y));
+    UNUSED_ARG(s);
+  }
 
-bool
-Blocker::standing_on_ground()
-{
-  return (rel_getpixel(0,-1) !=  GroundpieceData::GP_NOTHING);
-}
+  bool
+  Blocker::standing_on_ground()
+  {
+    return (rel_getpixel(0,-1) !=  GroundpieceData::GP_NOTHING);
+  }
 
-bool
-Blocker::need_catch()
-{
-  return true;
-}
+  bool
+  Blocker::need_catch()
+  {
+    return true;
+  }
 
 
-void
-Blocker::catch_pingu(Pingu* target)
-{
-  if (target->get_x () > pingu->get_x () - 16 
-      && target->get_x () < pingu->get_x () + 16
-      && target->get_y () > pingu->get_y () - 32
-      && target->get_y () < pingu->get_y () + 5
-      ) 
-    {
-      if (target->get_x () > pingu->get_x ()) {
-       target->direction.right();
-      } else {
-       target->direction.left();
+  void
+  Blocker::catch_pingu(Pingu* target)
+  {
+    if (target->get_x () > pingu->get_x () - 16 
+        && target->get_x () < pingu->get_x () + 16
+        && target->get_y () > pingu->get_y () - 32
+        && target->get_y () < pingu->get_y () + 5
+        ) 
+      {
+        if (target->get_x () > pingu->get_x ()) {
+         target->direction.right();
+        } else {
+         target->direction.left();
+        }
       }
-    }
-}
+  }
+
+  int
+  Blocker::y_offset(void)
+  {
+    return -33;
+  }
 
-int
-Blocker::y_offset(void)
-{
-  return -33;
 }
 
 /* EOF */

Index: blocker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- blocker.hxx 23 Aug 2002 15:49:53 -0000      1.6
+++ blocker.hxx 25 Aug 2002 09:08:49 -0000      1.7
@@ -23,33 +23,35 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Blocker : public PinguAction
-{
-private:
-  Sprite sprite;
-public:
-  ///
-  Blocker();
-  ///
-  int   y_offset();
-  ///
-  void  init();
-  std::string get_name () const { return "Blocker"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Blocker; }
+namespace Actions {
+
+  class Blocker : public PinguAction
+  {
+  private:
+    Sprite sprite;
+  
+  public:
+    Blocker ();
+    void  init ();
+
+    int   y_offset ();
+  
+    std::string get_name () const { return "Blocker"; }
+    ActionName get_type() const { return Actions::Blocker; }
  
-  void  update(float delta);
-  void  draw_offset(int, int, float s);
-  bool  standing_on_ground();
-  ///
-  bool  need_catch();
-  ///
-  void  catch_pingu(Pingu* pingu);
+    void  update(float delta);
+    void  draw_offset(int, int, float s);
+    bool  standing_on_ground();
+
+    bool  need_catch();
+    void  catch_pingu(Pingu* pingu);
   
-private:
-  Blocker (const Blocker&);
-  Blocker operator= (const Blocker&);
-};
+  private:
+    Blocker (const Blocker&);
+    Blocker operator= (const Blocker&);
+  };
+
+}
 
 #endif
 

Index: boarder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- boarder.cxx 23 Aug 2002 15:49:53 -0000      1.4
+++ boarder.cxx 25 Aug 2002 09:08:49 -0000      1.5
@@ -22,77 +22,81 @@
 #include "../string_converter.hxx"
 #include "boarder.hxx"
 
-Boarder::Boarder () : x_pos(0), speed(0.0)
-{
-}
+namespace Actions {
 
-void
-Boarder::init()
-{
-  x_pos = pingu->pos.x;
-  speed = 0.0;
-  sprite = Sprite (PingusResource::load_surface 
-                  ("Pingus/boarder" + to_string(pingu->get_owner ()),
-                   "pingus"));
-  sprite.set_align_center_bottom (); 
-}
+  Boarder::Boarder () : x_pos(0), speed(0.0)
+  {
+  }
 
-void  
-Boarder::update(float delta)
-{
-  if (pingu->direction.is_left ())
-    sprite.set_direction(Sprite::LEFT); 
-  else
-    sprite.set_direction(Sprite::RIGHT); 
-  sprite.update (delta);
+  void
+  Boarder::init()
+  {
+    x_pos = pingu->pos.x;
+    speed = 0.0;
+    sprite = Sprite (PingusResource::load_surface 
+                    ("Pingus/boarder" + to_string(pingu->get_owner ()),
+                     "pingus"));
+    sprite.set_align_center_bottom (); 
+  }
 
-  if (on_ground ())
-    {
-      if (speed < 15.0)
-       speed += 15.0 * delta;
-      else {
-       speed = 15.0;
-      }
+  void  
+  Boarder::update(float delta)
+  {
+    if (pingu->direction.is_left ())
+      sprite.set_direction(Sprite::LEFT); 
+    else
+      sprite.set_direction(Sprite::RIGHT); 
+    sprite.update (delta);
+
+    if (on_ground ())
+      {
+        if (speed < 15.0)
+         speed += 15.0 * delta;
+        else {
+         speed = 15.0;
+        }
       
-      // Incremental update so that we don't skip pixels
-      double new_x_pos = pingu->pos.x + pingu->direction * speed;
-      while (int(new_x_pos) != int(pingu->pos.x))
-       {
-         double old_pos = pingu->pos.x;
-         pingu->pos.x += (int(pingu->pos.x) < int(new_x_pos)) ? 1 : -1;
+        // Incremental update so that we don't skip pixels
+        double new_x_pos = pingu->pos.x + pingu->direction * speed;
+        while (int(new_x_pos) != int(pingu->pos.x))
+         {
+           double old_pos = pingu->pos.x;
+           pingu->pos.x += (int(pingu->pos.x) < int(new_x_pos)) ? 1 : -1;
          
-         if (pingu->rel_getpixel (1, 0))
-           {
-             // Hit a wall
-             pingu->pos.x = old_pos;// + (pingu->direction * 10);
-             ////pingu->pos.y = 10;
+           if (pingu->rel_getpixel (1, 0))
+             {
+               // Hit a wall
+               pingu->pos.x = old_pos;// + (pingu->direction * 10);
+               ////pingu->pos.y = 10;
 
-                     pingu->apply_force (CL_Vector(speed * pingu->direction * 
0.5,
-                                           -speed * abs(pingu->direction) * 
0.5));
-              pingu->set_action(Pingus::Actions::Walker);
-              return;
-           }
-       }
-    }
-  else
-    {
-      pingu->apply_force (CL_Vector(speed * pingu->direction, 0));
-      pingu->set_action(Pingus::Actions::Walker);
-    }
-}
+               pingu->apply_force (CL_Vector(speed * pingu->direction * 0.5,
+                                             -speed * abs(pingu->direction) * 
0.5));
+                pingu->set_action(Actions::Walker);
+                return;
+             }
+         }
+      }
+    else
+      {
+        pingu->apply_force (CL_Vector(speed * pingu->direction, 0));
+        pingu->set_action(Actions::Walker);
+      }
+  }
 
-void   
-Boarder::draw_offset(int x_of, int y_of, float s)
-{
-  sprite.put_screen (pingu->get_x () + x_of,
-                    pingu->get_y () + y_of);
-  UNUSED_ARG(s);
-}
+  void   
+  Boarder::draw_offset(int x_of, int y_of, float s)
+  {
+    sprite.put_screen (pingu->get_x () + x_of,
+                      pingu->get_y () + y_of);
+    UNUSED_ARG(s);
+  }
+
+  bool
+  Boarder::on_ground ()
+  {
+    return pingu->rel_getpixel (0, -1) || pingu->rel_getpixel (0, -2);
+  }
 
-bool
-Boarder::on_ground ()
-{
-  return pingu->rel_getpixel (0, -1) || pingu->rel_getpixel (0, -2);
 }
 
 /* EOF */

Index: boarder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- boarder.hxx 23 Aug 2002 15:49:53 -0000      1.6
+++ boarder.hxx 25 Aug 2002 09:08:49 -0000      1.7
@@ -23,31 +23,35 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-/** The Boarder action causes a pingu to use a skateboard to move
-    forward. */
-class Boarder : public PinguAction
-{
-private:
-  //double counter;
-  double x_pos;
-  double speed;
-  Sprite sprite;
-public:
-  Boarder ();
-  void  init();
+namespace Actions {
+
+  /** The Boarder action causes a pingu to use a skateboard to move
+      forward. */
+  class Boarder : public PinguAction
+  {
+  private:
+    //double counter;
+    double x_pos;
+    double speed;
+    Sprite sprite;
+  public:
+    Boarder ();
+    void  init();
   
-  std::string get_name() const { return "Boarder"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Boarder; }
+    std::string get_name () const { return "Boarder"; }
+    ActionName get_type () const { return Actions::Boarder; }
   
-  void  update(float delta);
-  void  draw_offset(int, int, float s);
+    void  update (float delta);
+    void  draw_offset (int, int, float s);
   
-private:
-  bool on_ground ();
+  private:
+    bool on_ground ();
   
-  Boarder (const Boarder&); 
-  Boarder operator= (const Boarder&); 
-};
+    Boarder (const Boarder&); 
+    Boarder operator= (const Boarder&); 
+  };
+
+}
 
 #endif
 

Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- bomber.cxx  22 Aug 2002 10:21:29 -0000      1.8
+++ bomber.cxx  25 Aug 2002 09:08:49 -0000      1.9
@@ -29,106 +29,110 @@
 #include "../particles/particle_holder.hxx"
 #include "bomber.hxx"
 
-bool Bomber::static_surface_loaded = false;
-CL_Surface Bomber::bomber_radius;
-CL_Surface Bomber::bomber_radius_gfx;
-
-Bomber::Bomber() 
-  : particle_thrown(false),
-    sound_played(false), 
-    gfx_exploded(false),
-    colmap_exploded(false)
-{
-}
+namespace Actions {
 
-void
-Bomber::on_successfull_apply (Pingu* pingu)
-{
-  pingu->get_world ()->play_wav("sounds/ohno.wav", pingu->get_pos ());
-}
+  bool Bomber::static_surface_loaded = false;
+  CL_Surface Bomber::bomber_radius;
+  CL_Surface Bomber::bomber_radius_gfx;
 
-void
-Bomber::init()
-{
-  // Only load the surface again if no static_surface is available
-  if (!static_surface_loaded) 
-    {
-      static_surface_loaded = true;
-      bomber_radius = PingusResource::load_surface ("Other/bomber_radius", 
"pingus");
-      bomber_radius_gfx = PingusResource::load_surface 
("Other/bomber_radius_gfx", "pingus");
-    }
+  Bomber::Bomber() 
+    : particle_thrown(false),
+      sound_played(false), 
+      gfx_exploded(false),
+      colmap_exploded(false)
+  {
+  }
 
-  explo_surf = PingusResource::load_surface ("Other/explo" + to_string 
(pingu->get_owner ()), "pingus");
-  sprite = Sprite(PingusResource::load_surface ("Pingus/bomber" + 
to_string(pingu->get_owner ()), "pingus"),
-                 17.0f, Sprite::NONE, Sprite::ONCE);
-  sprite.set_align_center_bottom ();
+  void
+  Bomber::on_successfull_apply (Pingu* pingu)
+  {
+    pingu->get_world ()->play_wav("sounds/ohno.wav", pingu->get_pos ());
+  }
 
-  sound_played = false;
-}
+  void
+  Bomber::init()
+  {
+    // Only load the surface again if no static_surface is available
+    if (!static_surface_loaded) 
+      {
+        static_surface_loaded = true;
+        bomber_radius = PingusResource::load_surface ("Other/bomber_radius", 
"pingus");
+        bomber_radius_gfx = PingusResource::load_surface 
("Other/bomber_radius_gfx", "pingus");
+      }
 
-void
-Bomber::draw_offset(int x, int y, float /*s*/)
-{
-  if (sprite.get_frame () >= 13 && !gfx_exploded) 
-    {
-      explo_surf.put_screen(pingu->get_x () - 32 + x, pingu->get_y () - 48 + 
y);
-      gfx_exploded = true;
-    }
+    explo_surf = PingusResource::load_surface ("Other/explo" + to_string 
(pingu->get_owner ()), "pingus");
+    sprite = Sprite(PingusResource::load_surface ("Pingus/bomber" + 
to_string(pingu->get_owner ()), "pingus"),
+                   17.0f, Sprite::NONE, Sprite::ONCE);
+    sprite.set_align_center_bottom ();
 
-  sprite.put_screen(pingu->get_x () + x, pingu->get_y () + y);
-}
+    sound_played = false;
+  }
 
-void
-Bomber::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Bomber::draw_offset(int x, int y, float /*s*/)
+  {
+    if (sprite.get_frame () >= 13 && !gfx_exploded) 
+      {
+        explo_surf.put_screen(pingu->get_x () - 32 + x, pingu->get_y () - 48 + 
y);
+        gfx_exploded = true;
+      }
 
-  if (sprite.get_frame () > 9 && !sound_played) {
-    pingu->get_world ()->play_wav("sounds/plop.wav", pingu->get_pos ());
-    sound_played = true;
+    sprite.put_screen(pingu->get_x () + x, pingu->get_y () + y);
   }
 
-  // Throwing particles
-  if (sprite.get_frame () > 12 && !particle_thrown) 
-    {
-      particle_thrown = true;
-      pingu->get_world()->get_particle_holder()->add_pingu_explo(pingu->get_x 
(), pingu->get_y () - 5);
+  void
+  Bomber::update(float delta)
+  {
+    sprite.update (delta);
+
+    if (sprite.get_frame () > 9 && !sound_played) {
+      pingu->get_world ()->play_wav("sounds/plop.wav", pingu->get_pos ());
+      sound_played = true;
     }
 
+    // Throwing particles
+    if (sprite.get_frame () > 12 && !particle_thrown) 
+      {
+        particle_thrown = true;
+        
pingu->get_world()->get_particle_holder()->add_pingu_explo(pingu->get_x (), 
pingu->get_y () - 5);
+      }
+
 
-  if (sprite.get_frame () >= 13 && !colmap_exploded)
-    {
-      colmap_exploded = true;
+    if (sprite.get_frame () >= 13 && !colmap_exploded)
+      {
+        colmap_exploded = true;
 
-      pingu->get_world()->get_colmap()->remove(bomber_radius,
-                                              pingu->get_x () - 
(bomber_radius.get_width()/2),
-                                              pingu->get_y () - 16 - 
(bomber_radius.get_width()/2));
-      pingu->get_world()->get_gfx_map()->remove(bomber_radius_gfx, 
-                                               pingu->get_x () - 
(bomber_radius.get_width()/2),
-                                               pingu->get_y () - 16 - 
(bomber_radius.get_width()/2));
+        pingu->get_world()->get_colmap()->remove(bomber_radius,
+                                                pingu->get_x () - 
(bomber_radius.get_width()/2),
+                                                pingu->get_y () - 16 - 
(bomber_radius.get_width()/2));
+        pingu->get_world()->get_gfx_map()->remove(bomber_radius_gfx, 
+                                                 pingu->get_x () - 
(bomber_radius.get_width()/2),
+                                                 pingu->get_y () - 16 - 
(bomber_radius.get_width()/2));
       
-      // Add an explosion to the forces list
-      ForcesHolder::add_force(ExplosionForce(5,30,CL_Vector(pingu->get_x (),
-                                                            pingu->get_y () - 
20)));
-    }
+        // Add an explosion to the forces list
+        ForcesHolder::add_force(ExplosionForce(5,30,CL_Vector(pingu->get_x (),
+                                                              pingu->get_y () 
- 20)));
+      }
 
 
-  // The pingu explode
-  if (sprite.finished ())
-    {
-      pingu->set_status(PS_DEAD);
-    }
-}
+    // The pingu explode
+    if (sprite.finished ())
+      {
+        pingu->set_status(PS_DEAD);
+      }
+  }
 
-void
-Bomber::update_position(float delta)
-{
-  // Apply all forces
-  pingu->velocity = ForcesHolder::apply_forces(pingu->pos, pingu->velocity);
-  // FIXME:
-  pingu->pos += pingu->velocity;
+  void
+  Bomber::update_position(float delta)
+  {
+    // Apply all forces
+    pingu->velocity = ForcesHolder::apply_forces(pingu->pos, pingu->velocity);
+    // FIXME:
+    pingu->pos += pingu->velocity;
   
-  if(delta);
+    if(delta);
+  }
+
 }
 
 /* EOF */

Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- bomber.hxx  23 Aug 2002 15:49:53 -0000      1.8
+++ bomber.hxx  25 Aug 2002 09:08:49 -0000      1.9
@@ -23,40 +23,44 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-/** An action with lets the Pingu explode. After the explosion the the
-    Pingu leaves a hole inside the ground. */
-class Bomber : public PinguAction
-{
-private:
-  bool particle_thrown;
-  bool sound_played;
-  bool gfx_exploded; 
-  bool colmap_exploded; 
+namespace Actions {
 
-  static bool static_surface_loaded;
-  Sprite sprite;
-  static CL_Surface bomber_radius;
-  static CL_Surface bomber_radius_gfx;
+  /** An action with lets the Pingu explode. After the explosion the the
+      Pingu leaves a hole inside the ground. */
+  class Bomber : public PinguAction
+  {
+  private:
+    bool particle_thrown;
+    bool sound_played;
+    bool gfx_exploded; 
+    bool colmap_exploded; 
 
-  CL_Surface explo_surf;
+    static bool static_surface_loaded;
+    Sprite sprite;
+    static CL_Surface bomber_radius;
+    static CL_Surface bomber_radius_gfx;
 
-public:
-  Bomber();
+    CL_Surface explo_surf;
+
+  public:
+    Bomber ();
   
-  void   init(void);
-  std::string get_name () const { return "Bomber"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Bomber; }
-  ActionType get_activation_mode() const { return COUNTDOWN_TRIGGERED; }
-  void   draw_offset(int x, int y, float s);
-  void   update(float delta);
-  void   update_position(float delta);
-  int    activation_time() { return 50; }
-  void on_successfull_apply (Pingu*);
+    void   init (void);
+    std::string get_name () const { return "Bomber"; }
+    ActionName get_type() const { return Actions::Bomber; }
+    ActionType get_activation_mode() const { return COUNTDOWN_TRIGGERED; }
+    void   draw_offset(int x, int y, float s);
+    void   update(float delta);
+    void   update_position(float delta);
+    int    activation_time() { return 50; }
+    void on_successfull_apply (Pingu*);
   
-private:
-  Bomber (const Bomber&);
-  Bomber operator= (const Bomber&);
-};
+  private:
+    Bomber (const Bomber&);
+    Bomber operator= (const Bomber&);
+  };
+
+}
 
 #endif
 

Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- bridger.cxx 23 Aug 2002 15:49:53 -0000      1.10
+++ bridger.cxx 25 Aug 2002 09:08:49 -0000      1.11
@@ -30,196 +30,206 @@
 
 using namespace std;
 
-bool Bridger::static_surfaces_loaded = false;
-CL_Surface Bridger::brick_l;
-CL_Surface Bridger::brick_r;
-CL_Surface Bridger::static_surface;
+namespace Actions {
 
-Bridger::Bridger() : bricks(MAX_BRICKS), block_build(false), mode(B_BUILDING) 
-{
-}
+  bool Bridger::static_surfaces_loaded = false;
+  CL_Surface Bridger::brick_l;
+  CL_Surface Bridger::brick_r;
+  CL_Surface Bridger::static_surface;
 
-void
-Bridger::init(void)
-{
-  if (!static_surfaces_loaded)
-    {
-      static_surface = PingusResource::load_surface ("Pingus/bridger0", 
"pingus");
-      brick_l = PingusResource::load_surface ("Other/brick_left", "pingus");
-      brick_r = PingusResource::load_surface ("Other/brick_right", "pingus");
-      static_surfaces_loaded = true;
-    }
-  build_sprite = Sprite ("Pingus/bridger_build" + to_string(pingu->get_owner 
()),
-                        "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
-  walk_sprite = Sprite ("Pingus/bridger_walk" + to_string(pingu->get_owner ()),
-                       "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
-  build_sprite.set_align_center_bottom ();
-  walk_sprite.set_align_center_bottom ();
+  Bridger::Bridger() : mode(B_BUILDING),
+                       bricks(MAX_BRICKS),
+                      block_build(false),
+                      name("Bridger (" + to_string(bricks) + ")")
 
-  last_pos = pingu->pos;
-}
+  {
+  }
 
-void
-Bridger::draw_offset(int x, int y, float /*s*/)
-{
+  void
+  Bridger::init(void)
+  {
+    if (!static_surfaces_loaded)
+      {
+        static_surface = PingusResource::load_surface ("Pingus/bridger0", 
"pingus");
+        brick_l = PingusResource::load_surface ("Other/brick_left", "pingus");
+        brick_r = PingusResource::load_surface ("Other/brick_right", "pingus");
+        static_surfaces_loaded = true;
+      }
+    build_sprite = Sprite ("Pingus/bridger_build" + to_string(pingu->get_owner 
()),
+                          "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
+    walk_sprite = Sprite ("Pingus/bridger_walk" + to_string(pingu->get_owner 
()),
+                         "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
+    build_sprite.set_align_center_bottom ();
+    walk_sprite.set_align_center_bottom ();
 
-  int x_offset(6), y_offset(4);
+    last_pos = pingu->pos;
+  }
 
-  if (bricks == MAX_BRICKS) {
-    x_offset = -4;
-    y_offset = 0;
+  void
+  Bridger::draw_offset(int x, int y, float s)
+  {
+
+    int x_offset(6), y_offset(4);
+
+    if (bricks == MAX_BRICKS) {
+      x_offset = -4;
+      y_offset = 0;
     
-  } else if (bricks == MAX_BRICKS - 1) {
-    x_offset = 0;
-    y_offset = 1;
-  } else if (bricks == MAX_BRICKS - 2) {
-    x_offset = 3;
-    y_offset = 2;
-  }
+    } else if (bricks == MAX_BRICKS - 1) {
+      x_offset = 0;
+      y_offset = 1;
+    } else if (bricks == MAX_BRICKS - 2) {
+      x_offset = 3;
+      y_offset = 2;
+    }
 
-  switch (mode)
-    {
-    case B_BUILDING:
-      if (pingu->direction.is_left ())
-       build_sprite.set_direction (Sprite::LEFT);
-      else
-       build_sprite.set_direction (Sprite::RIGHT);
+    switch (mode)
+      {
+      case B_BUILDING:
+        if (pingu->direction.is_left ())
+         build_sprite.set_direction (Sprite::LEFT);
+        else
+         build_sprite.set_direction (Sprite::RIGHT);
       
-      build_sprite.put_screen(pingu->get_x () + x - (x_offset * 
pingu->direction),
-                             pingu->get_y () + y + y_offset);
-      break;
+        build_sprite.put_screen(pingu->get_x () + x - (x_offset * 
pingu->direction),
+                               pingu->get_y () + y + y_offset);
+        break;
       
-    case B_WALKING:
-      if (pingu->direction.is_left ())
-       walk_sprite.set_direction (Sprite::LEFT);
-      else
-       walk_sprite.set_direction (Sprite::RIGHT);
+      case B_WALKING:
+        if (pingu->direction.is_left ())
+         walk_sprite.set_direction (Sprite::LEFT);
+        else
+         walk_sprite.set_direction (Sprite::RIGHT);
       
-      walk_sprite.put_screen(pingu->get_x () + x - (x_offset * 
pingu->direction),
-                             pingu->get_y () + y + y_offset);
-      break;
-    }
-}
+        walk_sprite.put_screen(pingu->get_x () + x - (x_offset * 
pingu->direction),
+                               pingu->get_y () + y + y_offset);
+        break;
+      }
+      
+    UNUSED_ARG(s);
+  }
 
-void
-Bridger::update(float delta)
-{
-  switch (mode)
-    {
-    case B_BUILDING:
-      update_build (delta);
-      break;
+  void
+  Bridger::update(float delta)
+  {
+    switch (mode)
+      {
+      case B_BUILDING:
+        update_build (delta);
+        break;
 
-    case B_WALKING:
-      update_walk (delta);
-      break;
-    }
+      case B_WALKING:
+        update_walk (delta);
+        break;
+      }
 
-  last_pos = pingu->pos;
-}
+    last_pos = pingu->pos;
+  }
 
-void
-Bridger::update_walk (float delta)
-{
-  if (walk_sprite.finished ())
-    {
-      if (way_is_free())
-        {
-           mode = B_BUILDING;
-           block_build = false;
-           walk_sprite.reset ();
-           walk_one_step_up();
-        }
-      else // We reached a wall...
-        {
-          pingu->direction.change ();
-          pingu->set_action (Pingus::Actions::Walker);
-          pingu->pos = last_pos;
-          return;
-        }
-    }
-  else
-    {
-      walk_sprite.update (delta);
-    }
-}
+  void
+  Bridger::update_walk (float delta)
+  {
+    if (walk_sprite.finished ())
+      {
+        if (way_is_free())
+          {
+             mode = B_BUILDING;
+             block_build = false;
+             walk_sprite.reset ();
+             walk_one_step_up();
+          }
+        else // We reached a wall...
+          {
+            pingu->direction.change ();
+            pingu->set_action (Actions::Walker);
+            pingu->pos = last_pos;
+            return;
+          }
+      }
+    else
+      {
+        walk_sprite.update (delta);
+      }
+  }
 
-void
-Bridger::update_build (float delta)
-{
-  build_sprite.update (delta);
+  void
+  Bridger::update_build (float delta)
+  {
+    build_sprite.update (delta);
 
-  if (build_sprite.get_frame () >= 7 && !block_build)
-    {
-      block_build = true;
+    if (build_sprite.get_frame () >= 7 && !block_build)
+      {
+        block_build = true;
 
-      if (bricks > 0)
-       {
-          place_a_brick();
-        }
-      else // Out of bricks
-       {
-         pingu->set_action(Pingus::Actions::Waiter);
-       }     
-    }
+        if (bricks > 0)
+         {
+            place_a_brick();
+          }
+        else // Out of bricks
+         {
+           pingu->set_action(Actions::Waiter);
+         }     
+      }
 
-  if (build_sprite.finished ())
-    {
-      mode = B_WALKING;
-      build_sprite.reset ();
-    }
-}
+    if (build_sprite.finished ())
+      {
+        mode = B_WALKING;
+        build_sprite.reset ();
+      }
+  }
 
-bool
-Bridger::way_is_free()
-{
-  return (rel_getpixel(4,2) ==  GroundpieceData::GP_NOTHING)
-    && !head_collision_on_walk(4, 2)
-    && !head_collision_on_walk(8, 4);
-}
+  bool
+  Bridger::way_is_free()
+  {
+    return (rel_getpixel(4,2) ==  GroundpieceData::GP_NOTHING)
+      && !head_collision_on_walk(4, 2)
+      && !head_collision_on_walk(8, 4);
+  }
 
-void
-Bridger::place_a_brick()
-{
-  bricks--; 
+  void
+  Bridger::place_a_brick()
+  {
+    bricks--;
+    name = "Bridger (" + to_string(bricks) + ")";
 
-  if (bricks < 4)
-    PingusSound::play_sound("sounds/ting.wav");
+    if (bricks < 4)
+      PingusSound::play_sound("sounds/ting.wav");
  
-  if (pingu->direction.is_right())
-    {
-      pingu->get_world()->get_colmap()->put(brick_r, 
-                                           pingu->get_x () + 10 - 
brick_r.get_width(),
-                                           pingu->get_y (),
-                                           GroundpieceData::GP_BRIDGE);
-      pingu->get_world()->get_gfx_map()->put(brick_r,
-                                            (int) pingu->get_x () + 10 - 
brick_r.get_width(),
-                                            pingu->get_y ());
-    }
-  else
-    {
-      pingu->get_world()->get_colmap()->put(brick_r, pingu->get_x () - 10,
-                                           pingu->get_y (),
-                                           GroundpieceData::GP_BRIDGE);
-      pingu->get_world()->get_gfx_map()->put(brick_l,
-                                            pingu->get_x () - 10,
-                                            pingu->get_y ());
-    }
-}
+    if (pingu->direction.is_right())
+      {
+        pingu->get_world()->get_colmap()->put(brick_r, 
+                                             pingu->get_x () + 10 - 
brick_r.get_width(),
+                                             pingu->get_y (),
+                                             GroundpieceData::GP_BRIDGE);
+        pingu->get_world()->get_gfx_map()->put(brick_r,
+                                              (int) pingu->get_x () + 10 - 
brick_r.get_width(),
+                                              pingu->get_y ());
+      }
+    else
+      {
+        pingu->get_world()->get_colmap()->put(brick_r, pingu->get_x () - 10,
+                                             pingu->get_y (),
+                                             GroundpieceData::GP_BRIDGE);
+        pingu->get_world()->get_gfx_map()->put(brick_l,
+                                              pingu->get_x () - 10,
+                                              pingu->get_y ());
+      }
+  }
 
-void
-Bridger::walk_one_step_up()
-{
-  pingu->pos.x += 4.0 * pingu->direction;
-  pingu->pos.y -= 2.0;
-  counter = 0;
-}
+  void
+  Bridger::walk_one_step_up()
+  {
+    pingu->pos.x += 4.0 * pingu->direction;
+    pingu->pos.y -= 2.0;
+    counter = 0;
+  }
+
+  std::string
+  Bridger::get_name () const
+  { 
+    return name;
+  }
 
-std::string
-Bridger::get_name () const
-{ 
-  // FIXME: Could need caching
-  return "Bridger (" + to_string(bricks) + ")";
 }
 
 /* EOF */

Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- bridger.hxx 23 Aug 2002 15:49:53 -0000      1.8
+++ bridger.hxx 25 Aug 2002 09:08:49 -0000      1.9
@@ -25,48 +25,56 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-/** 
- */
-class Bridger : public PinguAction
-{
-private:
-  Sprite walk_sprite;
-  Sprite build_sprite;
+namespace Actions {
 
-  GameCounter counter;
+  class Bridger : public PinguAction
+  {
+  private:
+    enum Mode { B_WALKING, B_BUILDING } mode;
+    enum { MAX_BRICKS = 15 };
 
-  static bool static_surfaces_loaded;
-  static CL_Surface static_surface;
-  static CL_Surface brick_l;
-  static CL_Surface brick_r;
+  private:
+    Sprite walk_sprite;
+    Sprite build_sprite;
 
-  int bricks;
-  //int step;
-  //int do_steps;
-  bool block_build;
+    GameCounter counter;
 
-  CL_Vector last_pos;
+    static bool static_surfaces_loaded;
+    static CL_Surface static_surface;
+    static CL_Surface brick_l;
+    static CL_Surface brick_r;
 
-  enum Mode { B_WALKING, B_BUILDING } mode;
-  enum { MAX_BRICKS = 15 };
-public:
-  Bridger();
+    int bricks;
+    //int step;
+    //int do_steps;
+    bool block_build;
 
-  void   init();
-  std::string get_name () const;
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Bridger; }
-  void   update(float delta);
-  void   update_build (float delta);
-  void   update_walk (float delta);
-  void   draw_offset(int, int, float s);
-  bool   way_is_free();
-  void   place_a_brick();
-  void   walk_one_step_up();
+    CL_Vector last_pos;
+
+    std::string name;
+  public:
+    Bridger();
+
+    void   init ();
+    std::string get_name () const;
+    ActionName get_type () const { return Actions::Bridger; }
+    
+    void   update (float delta);
+    void   update_build (float delta);
+    void   update_walk (float delta);
+    
+    void   draw_offset (int, int, float s);
+    
+    bool   way_is_free ();
+    void   place_a_brick ();
+    void   walk_one_step_up ();
   
-private:
-  Bridger (const Bridger&);
-  Bridger operator= (const Bridger&); 
-};
+  private:
+    Bridger (const Bridger&);
+    Bridger operator= (const Bridger&); 
+  };
+
+}
 
 #endif
 

Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- climber.cxx 23 Aug 2002 15:49:53 -0000      1.6
+++ climber.cxx 25 Aug 2002 09:08:49 -0000      1.7
@@ -21,85 +21,89 @@
 #include "../col_map.hxx"
 #include "climber.hxx"
 
-Climber::Climber()
-{
-}
+namespace Actions {
 
-void
-Climber::init(void)
-{
-  sprite = Sprite ("Pingus/climber0", "pingus");
+  Climber::Climber()
+  {
+  }
 
-  // these alignments are necessary to prevent climber walking 
-  // inside the wall.
-  sprite_height = sprite.get_height();
-  sprite_width = sprite.get_width();
-  if (pingu->direction.is_left ()) {
-      sprite.set_align (0, -sprite_height/2);
-      sprite.set_direction (Sprite::LEFT); 
-  } else {
-      sprite.set_align (-sprite_width, -sprite_height/2);
-      sprite.set_direction (Sprite::RIGHT);
+  void
+  Climber::init(void)
+  {
+    sprite = Sprite ("Pingus/climber0", "pingus");
+
+    // these alignments are necessary to prevent climber walking 
+    // inside the wall.
+    sprite_height = sprite.get_height();
+    sprite_width = sprite.get_width();
+    if (pingu->direction.is_left ()) {
+        sprite.set_align (0, -sprite_height/2);
+        sprite.set_direction (Sprite::LEFT); 
+    } else {
+        sprite.set_align (-sprite_width, -sprite_height/2);
+        sprite.set_direction (Sprite::RIGHT);
+    }
   }
-}
 
-void
-Climber::update(float delta)
-{
-  /*
-    std::cout << "Climer update()" << std::endl;
-    std::cout << "Direction: " << pingu->direction << std::endl;
-    printf("%3d %3d %3d\n", rel_getpixel(1,1), rel_getpixel(0,1), 
rel_getpixel(-1,1));
-    printf("%3d %3d %3d\n", rel_getpixel(1,0), rel_getpixel(0,0), 
rel_getpixel(-1,0));
-    printf("%3d %3d %3d\n", rel_getpixel(1,-1), 
rel_getpixel(0,-1),rel_getpixel(-1, -1));
-  */  
+  void
+  Climber::update(float delta)
+  {
+    /*
+      std::cout << "Climer update()" << std::endl;
+      std::cout << "Direction: " << pingu->direction << std::endl;
+      printf("%3d %3d %3d\n", rel_getpixel(1,1), rel_getpixel(0,1), 
rel_getpixel(-1,1));
+      printf("%3d %3d %3d\n", rel_getpixel(1,0), rel_getpixel(0,0), 
rel_getpixel(-1,0));
+      printf("%3d %3d %3d\n", rel_getpixel(1,-1), 
rel_getpixel(0,-1),rel_getpixel(-1, -1));
+    */  
 
-  sprite.update(delta);
+    sprite.update(delta);
 
-  // If above is free
-  if (rel_getpixel(0, 1) ==  GroundpieceData::GP_NOTHING
-      || rel_getpixel (0, 1) ==  GroundpieceData::GP_BRIDGE)
-    {
-      // and there is still ground to walk on
-      if (rel_getpixel(1, 1) !=  GroundpieceData::GP_NOTHING) 
-       {
-         --pingu->pos.y;
-         return;
-       }
-      else if (rel_getpixel(1, 1) ==  GroundpieceData::GP_NOTHING) 
-       {
-         //  std::cout << "Climber failed, no more wall" << std::endl;
+    // If above is free
+    if (rel_getpixel(0, 1) ==  GroundpieceData::GP_NOTHING
+        || rel_getpixel (0, 1) ==  GroundpieceData::GP_BRIDGE)
+      {
+        // and there is still ground to walk on
+        if (rel_getpixel(1, 1) !=  GroundpieceData::GP_NOTHING) 
+         {
+           --pingu->pos.y;
+           return;
+         }
+        else if (rel_getpixel(1, 1) ==  GroundpieceData::GP_NOTHING) 
+         {
+           //  std::cout << "Climber failed, no more wall" << std::endl;
 
-          // If Pingu able to get to new position without head collision
-          if (!head_collision_on_walk(pingu->direction, 1))
-            {
-            // Get ready to walk
-         --pingu->pos.y;
-           pingu->pos.x += pingu->direction;
-            }
-          else
-            {
-            // Get ready to fall
-            pingu->direction.change();
-            }
+            // If Pingu able to get to new position without head collision
+            if (!head_collision_on_walk(pingu->direction, 1))
+              {
+              // Get ready to walk
+           --pingu->pos.y;
+             pingu->pos.x += pingu->direction;
+              }
+            else
+              {
+              // Get ready to fall
+              pingu->direction.change();
+              }
 
-          // Finish climbing.
-         pingu->set_action(Pingus::Actions::Walker);
-       }
-    }
-  else 
-    {
-      //    std::cout << "Climber failed, falling down" << std::endl;
-      pingu->direction.change();
-      pingu->set_action(Pingus::Actions::Walker);
-    }
-}
+            // Finish climbing.
+           pingu->set_action(Actions::Walker);
+         }
+      }
+    else 
+      {
+        //    std::cout << "Climber failed, falling down" << std::endl;
+        pingu->direction.change();
+        pingu->set_action(Actions::Walker);
+      }
+  }
+
+  void
+  Climber::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (pingu->get_pos () + CL_Vector (x, y));
+    UNUSED_ARG(s);
+  }
 
-void
-Climber::draw_offset(int x, int y, float s)
-{
-  sprite.put_screen (pingu->get_pos () + CL_Vector (x, y));
-  UNUSED_ARG(s);
 }
 
 /* EOF */

Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- climber.hxx 23 Aug 2002 15:49:53 -0000      1.5
+++ climber.hxx 25 Aug 2002 09:08:49 -0000      1.6
@@ -23,26 +23,33 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Climber : public PinguAction
-{
-private:
-  Sprite sprite;
-  int sprite_width, sprite_height;
-public:
-  Climber();
-  void   init();
-  std::string get_name () const { return "Climber"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Climber; }
-  ActionType get_activation_mode() const { return WALL_TRIGGERED; }
-  void draw_offset(int x, int y, float s=1.0);
-  void update(float delta);
-  char get_persistent_char () { return 'c'; }
+namespace Actions {
+
+  class Climber : public PinguAction
+  {
+  private:
+    Sprite sprite;
+    int sprite_width, sprite_height;
+  public:
+    Climber ();
+    void   init ();
+    
+    std::string get_name () const { return "Climber"; }
+    ActionName get_type () const { return Actions::Climber; }
+    ActionType get_activation_mode () const { return WALL_TRIGGERED; }
+    
+    void draw_offset (int x, int y, float s=1.0);
+    
+    void update (float delta);
+    
+    char get_persistent_char () { return 'c'; }
   
-private:
-  Climber (const Climber&);
-  Climber operator= (const Climber&);
-};
+  private:
+    Climber (const Climber&);
+    Climber operator= (const Climber&);
+  };
+
+}
 
 #endif
 

Index: digger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- digger.cxx  23 Aug 2002 15:49:53 -0000      1.8
+++ digger.cxx  25 Aug 2002 09:08:49 -0000      1.9
@@ -28,76 +28,80 @@
 #include "../pingu.hxx"
 #include "digger.hxx"
 
-Digger::Digger() : digger_c(0)
-{
-}
+namespace Actions {
 
-void
-Digger::init(void)
-{
-  digger_radius = PingusResource::load_surface ("Other/digger_radius", 
"pingus");
-  digger_radius_gfx = PingusResource::load_surface ("Other/digger_radius_gfx", 
"pingus");
-  sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner 
()),
-                  "pingus");
+  Digger::Digger() : digger_c(0)
+  {
+  }
+
+  void
+  Digger::init(void)
+  {
+    digger_radius = PingusResource::load_surface ("Other/digger_radius", 
"pingus");
+    digger_radius_gfx = PingusResource::load_surface 
("Other/digger_radius_gfx", "pingus");
+    sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner 
()),
+                    "pingus");
 #if 0
-  // FIXME: Just an idea...
-  sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner 
()),
-                  "pingus", PropertyMgr::instance()->get_int 
("actions/digger/sprite-fps", 20));
+    // FIXME: Just an idea...
+    sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner 
()),
+                    "pingus", PropertyMgr::instance()->get_int 
("actions/digger/sprite-fps", 20));
 #endif
-  sprite.set_align_center_bottom ();
-}
+    sprite.set_align_center_bottom ();
+  }
 
-void
-Digger::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Digger::update(float delta)
+  {
+    sprite.update (delta);
   
-  if (++digger_c >= 3)
-    {
-      digger_c = 0;
-      dig();
-    }
+    if (++digger_c >= 3)
+      {
+        digger_c = 0;
+        dig();
+      }
 
-  if (!have_something_to_dig())
-    { 
-      dig ();
-      pingu->set_action(Pingus::Actions::Walker);
-    }
-}
+    if (!have_something_to_dig())
+      { 
+        dig ();
+        pingu->set_action(Actions::Walker);
+      }
+  }
 
-bool   
-Digger::have_something_to_dig()
-{
-  if (rel_getpixel(0, -1) !=  GroundpieceData::GP_NOTHING)
-    {
-      if (rel_getpixel(0, -1) ==  GroundpieceData::GP_SOLID)
-       {
-         PingusSound::play_sound("sounds/chink.wav");
-         return false;  
-       }
-      else
-       return true;
-    }
-  else
-    {
-      return false;
-    }
-}
+  bool   
+  Digger::have_something_to_dig()
+  {
+    if (rel_getpixel(0, -1) !=  GroundpieceData::GP_NOTHING)
+      {
+        if (rel_getpixel(0, -1) ==  GroundpieceData::GP_SOLID)
+         {
+           PingusSound::play_sound("sounds/chink.wav");
+           return false;  
+         }
+        else
+         return true;
+      }
+    else
+      {
+        return false;
+      }
+  }
 
-void
-Digger::dig()
-{
-  pingu->get_world()->get_colmap()->remove(digger_radius, pingu->get_x () - 
16, pingu->get_y() - 14);
-  pingu->get_world()->get_gfx_map()->remove(digger_radius_gfx, pingu->get_x () 
- 16, pingu->get_y() - 14);
+  void
+  Digger::dig()
+  {
+    pingu->get_world()->get_colmap()->remove(digger_radius, pingu->get_x () - 
16, pingu->get_y() - 14);
+    pingu->get_world()->get_gfx_map()->remove(digger_radius_gfx, pingu->get_x 
() - 16, pingu->get_y() - 14);
       
-  ++pingu->pos.y;
-}
+    ++pingu->pos.y;
+  }
+
+  void  
+  Digger::draw_offset(int x, int y, float /*s*/)
+  {
+    //std::cout << "DRawing digger" << std::endl;
+    sprite.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
+  }
 
-void  
-Digger::draw_offset(int x, int y, float /*s*/)
-{
-  //std::cout << "DRawing digger" << std::endl;
-  sprite.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
 }
 
 /* EOF */

Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- digger.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ digger.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,29 +23,35 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-/** FIXME: Not delta capable! */
-class Digger : public PinguAction
-{
-private:
-  CL_Surface digger_radius;
-  CL_Surface digger_radius_gfx;
-  Sprite sprite;
-  int digger_c;
-public:
-  Digger();
+namespace Actions {
 
-  void init(void);
-  std::string get_name () const { return "Digger"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Digger; }
-  bool have_something_to_dig();
-  void dig();
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
-  
-private:
-  Digger (const Digger&);
-  Digger operator= (const Digger&);
-};
+  /** FIXME: Not delta capable! */
+  class Digger : public PinguAction
+  {
+  private:
+    CL_Surface digger_radius;
+    CL_Surface digger_radius_gfx;
+    Sprite sprite;
+    int digger_c;
+  public:
+    Digger();
+    void init (void);
+    
+    std::string get_name () const { return "Digger"; }
+    ActionName get_type () const { return Actions::Digger; }
+    
+    bool have_something_to_dig ();
+    void dig ();
+    
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
+
+  private:
+    Digger (const Digger&);
+    Digger operator= (const Digger&);
+  };
+
+}
 
 #endif
 

Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- drown.cxx   26 Jun 2002 19:13:13 -0000      1.3
+++ drown.cxx   25 Aug 2002 09:08:49 -0000      1.4
@@ -20,41 +20,43 @@
 #include "../pingu.hxx"
 #include "drown.hxx"
 
-///
-void 
-Drown::init()
-{
-  //if (pingu->environment == ENV_AIR)
-    sprite = Sprite ("Pingus/drownfall0", "pingus", 60.0f,
-                    Sprite::NONE, Sprite::ONCE);
-    //else
-    //sprite = Sprite ("Pingus/drownwalk0", "pingus", 30.0f,
-    //      Sprite::NONE, Sprite::ONCE);
+namespace Actions {
 
-  sprite.set_align_center_bottom ();
-}
+  void 
+  Drown::init()
+  {
+    //if (pingu->environment == ENV_AIR)
+      sprite = Sprite ("Pingus/drownfall0", "pingus", 60.0f,
+                      Sprite::NONE, Sprite::ONCE);
+      //else
+      //sprite = Sprite ("Pingus/drownwalk0", "pingus", 30.0f,
+      //            Sprite::NONE, Sprite::ONCE);
 
-void 
-Drown::draw_offset(int x, int y, float /*s*/)
-{
-  // FIXME: Direction handling is ugly
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
+    sprite.set_align_center_bottom ();
+  }
 
-  sprite.put_screen (pingu->pos + CL_Vector(x, y));
-}
+  void 
+  Drown::draw_offset(int x, int y, float /*s*/)
+  {
+    // FIXME: Direction handling is ugly
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
+
+    sprite.put_screen (pingu->pos + CL_Vector(x, y));
+  }
+
+  void 
+  Drown::update(float delta)
+  {
+    sprite.update (delta);
+    if (sprite.finished ())
+      {
+        pingu->set_status(PS_DEAD);
+      }
+  }
 
-///
-void 
-Drown::update(float delta)
-{
-  sprite.update (delta);
-  if (sprite.finished ())
-    {
-      pingu->set_status(PS_DEAD);
-    }
 }
 
 /* EOF */

Index: drown.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- drown.hxx   23 Aug 2002 15:49:53 -0000      1.5
+++ drown.hxx   25 Aug 2002 09:08:49 -0000      1.6
@@ -23,24 +23,32 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Drown : public PinguAction
-{
-private:
-  Sprite sprite;
+namespace Actions {
+
+  class Drown : public PinguAction
+  {
+  private:
+    Sprite sprite;
   
-public:
-  Drown () { }
-  void init();
-  std::string get_name() const { return "Drown"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Drown; }
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
-  bool catchable () { return false; }
+  public:
+    Drown () { }
+    void init ();
+    
+    std::string get_name () const { return "Drown"; }
+    ActionName get_type () const { return Actions::Drown; }
+    
+    void update (float delta);
+    
+    void draw_offset (int x, int y, float s);
+    
+    bool catchable () { return false; }
   
-private:
-  Drown (const Drown&);
-  Drown operator= (const Drown&);
-};
+  private:
+    Drown (const Drown&);
+    Drown operator= (const Drown&);
+  };
+
+}
 
 #endif
 

Index: exiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- exiter.cxx  22 Aug 2002 02:20:12 -0000      1.3
+++ exiter.cxx  25 Aug 2002 09:08:49 -0000      1.4
@@ -21,37 +21,41 @@
 #include "../sound.hxx"
 #include "exiter.hxx"
 
-void
-Exiter::init(void)
-{
-  sprite = Sprite ("Pingus/exit0", "pingus", 10.0f, Sprite::NONE, 
Sprite::ONCE);
-  sprite.set_align_center_bottom ();
-}
+namespace Actions {
 
-void
-Exiter::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Exiter::init(void)
+  {
+    sprite = Sprite ("Pingus/exit0", "pingus", 10.0f, Sprite::NONE, 
Sprite::ONCE);
+    sprite.set_align_center_bottom ();
+  }
 
-  if (sprite.finished ())
-    {
-      if (pingu->get_status() != PS_EXITED)
-       {
-         PingusSound::play_sound("sounds/yipee.wav");
-         pingu->set_status(PS_EXITED); 
-       }
-    }
-}
+  void
+  Exiter::update(float delta)
+  {
+    sprite.update (delta);
 
-void 
-Exiter::draw_offset(int x, int y, float /*s*/)
-{
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
+    if (sprite.finished ())
+      {
+        if (pingu->get_status() != PS_EXITED)
+         {
+           PingusSound::play_sound("sounds/yipee.wav");
+           pingu->set_status(PS_EXITED); 
+         }
+      }
+  }
+
+  void 
+  Exiter::draw_offset(int x, int y, float /*s*/)
+  {
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
       
-  sprite.put_screen (pingu->pos + CL_Vector (x, y));
+    sprite.put_screen (pingu->pos + CL_Vector (x, y));
+  }
+
 }
 
 /* EOF */

Index: exiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- exiter.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ exiter.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,24 +23,27 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Exiter : public PinguAction
-{
-private:
-  Sprite sprite;
+namespace Actions {
+
+  class Exiter : public PinguAction
+  {
+  private:
+    Sprite sprite;
   
-public:
-  Exiter () { }
-  void init(void);
-  std::string get_name () const { return "Exiter"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Exiter; }
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
+  public:
+    Exiter () { }
+    void init(void);
+    std::string get_name () const { return "Exiter"; }
+    ActionName get_type() const { return Actions::Exiter; }
+    void update(float delta);
+    void draw_offset(int x, int y, float s);
   
-private:
-  Exiter (const Exiter&);
-  Exiter operator= (const Exiter&);
-};
+  private:
+    Exiter (const Exiter&);
+    Exiter operator= (const Exiter&);
+  };
+
+}
 
 #endif
 

Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- faller.cxx  23 Aug 2002 15:49:53 -0000      1.15
+++ faller.cxx  25 Aug 2002 09:08:49 -0000      1.16
@@ -27,157 +27,161 @@
 #include "../debug.hxx"
 #include "faller.hxx"
 
-const float Faller::deadly_velocity = 20.0f;
+namespace Actions {
 
-Faller::Faller() : falling(0) { }
+  const float Faller::deadly_velocity = 20.0f;
 
-Faller::~Faller() { }
+  Faller::Faller() : falling(0) { }
 
-void
-Faller::init(void)
-{
-  faller = Sprite("Pingus/faller" + to_string(pingu->get_owner ()), "pingus");
-  faller.set_align_center_bottom ();
+  Faller::~Faller() { }
+
+  void
+  Faller::init(void)
+  {
+    faller = Sprite("Pingus/faller" + to_string(pingu->get_owner ()), 
"pingus");
+    faller.set_align_center_bottom ();
   
-  // FIXME: we can save some cpu cycles & memory if we do this when it
-  // is necessary
-  tumbler = Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus");
-  tumbler.set_align_center_bottom ();
-}
+    // FIXME: we can save some cpu cycles & memory if we do this when it
+    // is necessary
+    tumbler = Sprite("Pingus/tumble" + to_string(pingu->get_owner()), 
"pingus");
+    tumbler.set_align_center_bottom ();
+  }
 
-void
-Faller::update (float delta)
-{
-  tumbler.update (delta);
-  faller.update (delta);
+  void
+  Faller::update (float delta)
+  {
+    tumbler.update (delta);
+    faller.update (delta);
 
-  // Pingu stands on ground
-  if (rel_getpixel(0, -1) !=  GroundpieceData::GP_NOTHING)
-    { 
-      pingu->set_action (Pingus::Actions::Walker);
-      return;
-    }
+    // Pingu stands on ground
+    if (rel_getpixel(0, -1) !=  GroundpieceData::GP_NOTHING)
+      { 
+        pingu->set_action (Actions::Walker);
+        return;
+      }
 
-  // FIXME: This should be triggered at a later point, when close to
-  // FIXME: deadly_velocity or something like that
-  if (pingu->velocity.y > 5.0 && pingu->request_fall_action())
-    return;
+    // FIXME: This should be triggered at a later point, when close to
+    // FIXME: deadly_velocity or something like that
+    if (pingu->velocity.y > 5.0 && pingu->request_fall_action())
+      return;
 
-  // Apply all forces
-  pingu->velocity = ForcesHolder::apply_forces(pingu->pos, pingu->velocity);
+    // Apply all forces
+    pingu->velocity = ForcesHolder::apply_forces(pingu->pos, pingu->velocity);
     
-  CL_Vector newp = pingu->velocity;
-  CL_Vector last_pos;
+    CL_Vector newp = pingu->velocity;
+    CL_Vector last_pos;
   
-  // Update x and y by moving the penguin to it's target *slowly*
-  // and checking if the penguin has hit the bottom at each loop
-  while(rel_getpixel(0, 0) == GroundpieceData::GP_NOTHING
-       && (fabs(newp.x) >= 1 || fabs(newp.y) >= 1))
-    {
-      last_pos = pingu->pos;
+    // Update x and y by moving the penguin to it's target *slowly*
+    // and checking if the penguin has hit the bottom at each loop
+    while(rel_getpixel(0, 0) == GroundpieceData::GP_NOTHING
+         && (fabs(newp.x) >= 1 || fabs(newp.y) >= 1))
+      {
+        last_pos = pingu->pos;
 
-      if (fabs(newp.x) >= 1)
-       { 
-         // Since the velocity might be a
-         // fraction stop when we are within 1 unit of the target
-         if (newp.x > 0)
-           {
-             pingu->pos.x++;
-             newp.x--;
-           }
-         else
-           {
-             pingu->pos.x--;
-             newp.x++;
-           }
-       }
+        if (fabs(newp.x) >= 1)
+         { 
+           // Since the velocity might be a
+           // fraction stop when we are within 1 unit of the target
+           if (newp.x > 0)
+             {
+               pingu->pos.x++;
+               newp.x--;
+             }
+           else
+             {
+               pingu->pos.x--;
+               newp.x++;
+             }
+         }
 
-      if (fabs(newp.y) >= 1)
-       {
-         if (newp.y > 0)
-           {
-             pingu->pos.y++;
-             newp.y--;
-           }
-         else 
-           {
-             pingu->pos.y--;
-             newp.y++;
-           }
-       }
-    }
+        if (fabs(newp.y) >= 1)
+         {
+           if (newp.y > 0)
+             {
+               pingu->pos.y++;
+               newp.y--;
+             }
+           else 
+             {
+               pingu->pos.y--;
+               newp.y++;
+             }
+         }
+      }
 
-  // Now that the Pingu is moved, check if he hits the ground.
-  if (rel_getpixel(0, 0) == GroundpieceData::GP_NOTHING)
-    { // if pingu is not on ground
-      ++falling;
+    // Now that the Pingu is moved, check if he hits the ground.
+    if (rel_getpixel(0, 0) == GroundpieceData::GP_NOTHING)
+      { // if pingu is not on ground
+        ++falling;
          
-      //if (falling > 3) //FIXME: insert floater check here
-      //pingu->environment = ENV_AIR; 
-    }
-  else // Ping is on ground/water/something
-    {
-      if (rel_getpixel(0, 0) == GroundpieceData::GP_WATER)
-       {
-         pingu->set_action(Pingus::Actions::Drown);
-         return;
-       }
-      else
-       {
-         // Did we stop too fast?
-         if (fabs(pingu->velocity.y) > deadly_velocity) 
-           {
-             pingu->set_action(Pingus::Actions::Splashed);
-             return;
-           }
-         else if (fabs(pingu->velocity.x) > deadly_velocity)
-           {
-             pout(PINGUS_DEBUG_ACTIONS) << "Pingu: x Smashed on ground, 
jumping" << std::endl;
-           }
-       }
-      // Reset the velocity
-      pingu->velocity.x = -(pingu->velocity.x/3);
-      pingu->velocity.y = 0;
+        //if (falling > 3) //FIXME: insert floater check here
+        //pingu->environment = ENV_AIR; 
+      }
+    else // Ping is on ground/water/something
+      {
+        if (rel_getpixel(0, 0) == GroundpieceData::GP_WATER)
+         {
+           pingu->set_action(Actions::Drown);
+           return;
+         }
+        else
+         {
+           // Did we stop too fast?
+           if (fabs(pingu->velocity.y) > deadly_velocity) 
+             {
+               pingu->set_action(Actions::Splashed);
+               return;
+             }
+           else if (fabs(pingu->velocity.x) > deadly_velocity)
+             {
+               pout(PINGUS_DEBUG_ACTIONS) << "Pingu: x Smashed on ground, 
jumping" << std::endl;
+             }
+         }
+        // Reset the velocity
+        pingu->velocity.x = -(pingu->velocity.x/3);
+        pingu->velocity.y = 0;
 
-      pingu->pos = last_pos;
+        pingu->pos = last_pos;
 
-      // FIXME: UGLY!
-      //pingu->set_action (Walker);
+        // FIXME: UGLY!
+        //pingu->set_action (Walker);
+      }
+  }
+
+  void 
+  Faller::draw_offset(int x, int y, float /*s*/)
+  {
+    if (is_tumbling ()) {
+      tumbler.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
+    } else {
+      faller.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
     }
-}
+  }
 
-void 
-Faller::draw_offset(int x, int y, float /*s*/)
-{
-  if (is_tumbling ()) {
-    tumbler.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
-  } else {
-    faller.put_screen (int(pingu->pos.x + x), int(pingu->pos.y + y));
+  bool
+  Faller::is_tumbling () const
+  {
+    // If we are going fast enough to get smashed, start tumbling
+    if (fabs(pingu->velocity.x) > deadly_velocity
+        || fabs(pingu->velocity.y) > deadly_velocity)
+      {
+        return true;
+      }
+    else
+      {
+        return false;
+      }
   }
-}
 
-bool
-Faller::is_tumbling () const
-{
-  // If we are going fast enough to get smashed, start tumbling
-  if (fabs(pingu->velocity.x) > deadly_velocity
-      || fabs(pingu->velocity.y) > deadly_velocity)
-    {
+  bool
+  Faller::change_allowed (ActionName new_action)
+  {
+    if (new_action == Actions::Floater)
       return true;
-    }
-  else
-    {
+    else
       return false;
-    }
-}
+  }
 
-bool
-Faller::change_allowed (ActionName new_action)
-{
-  if (new_action == Pingus::Actions::Floater)
-    return true;
-  else
-    return false;
 }
 
 /* EOF */

Index: faller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- faller.hxx  23 Aug 2002 15:49:53 -0000      1.10
+++ faller.hxx  25 Aug 2002 09:08:49 -0000      1.11
@@ -23,35 +23,39 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Faller : public PinguAction
-{
-private:
-  Sprite faller;
-  Sprite tumbler;
+namespace Actions {
 
-  int falling;
+  class Faller : public PinguAction
+  {
+  private:
+    Sprite faller;
+    Sprite tumbler;
 
-  static const float deadly_velocity;
+    int falling;
 
-public:
-  Faller();
-  virtual ~Faller();
+    static const float deadly_velocity;
+
+  public:
+    Faller();
+    virtual ~Faller();
   
-  void  init(void);
+    void  init(void);
   
-  void  update(float delta);
-  void  draw_offset(int x, int y, float s);
+    void  update(float delta);
+    void  draw_offset(int x, int y, float s);
 
-  bool change_allowed (Pingus::Actions::ActionName new_action);
+    bool change_allowed (Actions::ActionName new_action);
   
-  std::string get_name() const { return "Faller"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Faller; }
-  bool is_tumbling () const;
+    std::string get_name() const { return "Faller"; }
+    ActionName get_type() const { return Actions::Faller; }
+    bool is_tumbling () const;
   
-private:
-  Faller (const Faller&);
-  Faller operator= (const Faller&);
-};
+  private:
+    Faller (const Faller&);
+    Faller operator= (const Faller&);
+  };
+
+}
 
 #endif
 

Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- floater.cxx 23 Aug 2002 15:49:53 -0000      1.10
+++ floater.cxx 25 Aug 2002 09:08:49 -0000      1.11
@@ -21,47 +21,51 @@
 #include "../groundpiece_data.hxx"
 #include "floater.hxx"
 
-Floater::Floater() : falling_depth(0), step(0)
-{
-}
+namespace Actions {
 
-void
-Floater::init(void)
-{
-  falling_depth = 0;
-  step = 0;
-  sprite = Sprite ("Pingus/floater0", "pingus");
-  sprite.set_align_center_bottom ();
-}
+  Floater::Floater() : falling_depth(0), step(0)
+  {
+  }
 
-void
-Floater::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Floater::init(void)
+  {
+    falling_depth = 0;
+    step = 0;
+    sprite = Sprite ("Pingus/floater0", "pingus");
+    sprite.set_align_center_bottom ();
+  }
 
-  pingu->velocity = CL_Vector(0.0, 0.0);
-  if (rel_getpixel(0, -1) == GroundpieceData::GP_NOTHING) {
-    ++step;
-    if (step > 0) {
-      ++(pingu->pos.y);
-      step = 0;
+  void
+  Floater::update(float delta)
+  {
+    sprite.update (delta);
+
+    pingu->velocity = CL_Vector(0.0, 0.0);
+    if (rel_getpixel(0, -1) == GroundpieceData::GP_NOTHING) {
+      ++step;
+      if (step > 0) {
+        ++(pingu->pos.y);
+        step = 0;
+      }
+    } else {
+      pingu->set_action (Actions::Walker);
     }
-  } else {
-    pingu->set_action (Pingus::Actions::Walker);
   }
-}
 
-void 
-Floater::draw_offset (int x, int y, float s)
-{
-  sprite.put_screen (pingu->pos + CL_Vector (x, y));
-  UNUSED_ARG(s);
-}
+  void 
+  Floater::draw_offset (int x, int y, float s)
+  {
+    sprite.put_screen (pingu->pos + CL_Vector (x, y));
+    UNUSED_ARG(s);
+  }
+
+  bool
+  Floater::change_allowed (ActionName)
+  {
+    return false;
+  }
 
-bool
-Floater::change_allowed (ActionName)
-{
-  return false;
 }
 
 /* EOF */

Index: floater.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- floater.hxx 23 Aug 2002 15:49:53 -0000      1.7
+++ floater.hxx 25 Aug 2002 09:08:49 -0000      1.8
@@ -23,30 +23,33 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Floater : public PinguAction
-{
-private:
-  int falling_depth;
-  int step;
-  Sprite sprite;
-public:
-  ///
-  Floater();
+namespace Actions {
 
-  std::string get_name() const { return "Floater"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Faller; }
-  ActionType get_activation_mode() const { return FALL_TRIGGERED; }
-  void init(void);
-  void update(float delta);
-  void draw_offset (int x, int y, float s);
-  char get_persistent_char () { return 'f'; }
-  bool change_allowed (Pingus::Actions::ActionName new_action);
+  class Floater : public PinguAction
+  {
+  private:
+    int falling_depth;
+    int step;
+    Sprite sprite;
+  public:
+    Floater();
+
+    std::string get_name() const { return "Floater"; }
+    ActionName get_type() const { return Actions::Floater; }
+    ActionType get_activation_mode() const { return FALL_TRIGGERED; }
+    
+    void init(void);
+    void update(float delta);
+    void draw_offset (int x, int y, float s);
+    char get_persistent_char () { return 'f'; }
+    bool change_allowed (ActionName new_action);
   
-private:
-  Floater (const Floater&);
-  Floater operator= (const Floater&);
-};
+  private:
+    Floater (const Floater&);
+    Floater operator= (const Floater&);
+  };
+
+}
 
 #endif
 

Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- jumper.cxx  23 Aug 2002 15:49:53 -0000      1.6
+++ jumper.cxx  25 Aug 2002 09:08:49 -0000      1.7
@@ -21,40 +21,44 @@
 #include "../string_converter.hxx"
 #include "jumper.hxx"
 
-Jumper::Jumper()
-{
-  // do nothing
-}
+namespace Actions {
 
-void
-Jumper::init(void)
-{
-  sprite = Sprite("Pingus/jumper" + to_string(pingu->get_owner ()),
-                 "pingus");
-}
+  Jumper::Jumper()
+  {
+    // do nothing
+  }
 
-void 
-Jumper::draw_offset(int x, int y, float s)
-{
-  // FIXME: Huh! Does this work?!
-  sprite.put_screen (x, y);
-  UNUSED_ARG(s);
-}
+  void
+  Jumper::init(void)
+  {
+    sprite = Sprite("Pingus/jumper" + to_string(pingu->get_owner ()),
+                   "pingus");
+  }
 
-void
-Jumper::update(float delta)
-{
-  if (pingu->direction.is_right()) {
-    pingu->velocity += CL_Vector(10.0, -10.0);
-  } else {
-    pingu->velocity += CL_Vector(-10.0, -10.0);
+  void 
+  Jumper::draw_offset(int x, int y, float s)
+  {
+    // FIXME: Huh! Does this work?!
+    sprite.put_screen (x, y);
+    UNUSED_ARG(s);
   }
 
-  // Move the pingu in the air, so that it can start 'falling'
-  pingu->pos.y -= 1;
+  void
+  Jumper::update(float delta)
+  {
+    if (pingu->direction.is_right()) {
+      pingu->velocity += CL_Vector(10.0, -10.0);
+    } else {
+      pingu->velocity += CL_Vector(-10.0, -10.0);
+    }
+
+    // Move the pingu in the air, so that it can start 'falling'
+    pingu->pos.y -= 1;
+
+    pingu->set_action (Actions::Faller);
+    UNUSED_ARG(delta);
+  }
 
-  pingu->set_action (Pingus::Actions::Faller);
-  UNUSED_ARG(delta);
 }
 
 /* EOF */

Index: jumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- jumper.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ jumper.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,24 +23,27 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class Jumper : public PinguAction
-{
-private:
-  Sprite sprite;
-public:
-  Jumper();
+namespace Actions {
 
-  void  init(void);
-  std::string get_name() const { return "Jumper"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Jumper; }
-  void  update(float delta);
-  void  draw_offset(int x, int y, float s);
+  class Jumper : public PinguAction
+  {
+  private:
+    Sprite sprite;
+  public:
+    Jumper();
+
+    void  init(void);
+    std::string get_name() const { return "Jumper"; }
+    ActionName get_type() const { return Actions::Jumper; }
+    void  update(float delta);
+    void  draw_offset(int x, int y, float s);
   
-private:
-  Jumper (const Jumper&);
-  Jumper operator= (const Jumper&);
-};
+  private:
+    Jumper (const Jumper&);
+    Jumper operator= (const Jumper&);
+  };
+
+}
 
 #endif
 

Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- laser_kill.cxx      13 Jun 2002 14:25:12 -0000      1.2
+++ laser_kill.cxx      25 Aug 2002 09:08:49 -0000      1.3
@@ -20,29 +20,34 @@
 #include "../pingu.hxx"
 #include "laser_kill.hxx"
 
-LaserKill::LaserKill()
-{
-}
+namespace Actions {
 
-void
-LaserKill::init(void)
-{
-  sprite = Sprite ("Other/laser_kill0", "pingus");
-}
+  LaserKill::LaserKill()
+  {
+  }
 
-void 
-LaserKill::draw_offset(int x, int y, float /*s*/)
-{
-  sprite.put_screen (x, y);
-}
+  void
+  LaserKill::init(void)
+  {
+    sprite = Sprite ("Other/laser_kill0", "pingus");
+  }
+
+  void 
+  LaserKill::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (x, y);
+    UNUSED_ARG(s);
+  }
+
+  void
+  LaserKill::update(float /*delta*/)
+  {
+    //if (counter >= (int)(surface.get_num_frames()) - 1) 
+    //{
+        pingu->set_status(PS_DEAD);
+        //}
+  }
 
-void
-LaserKill::update(float /*delta*/)
-{
-  //if (counter >= (int)(surface.get_num_frames()) - 1) 
-  //{
-      pingu->set_status(PS_DEAD);
-      //}
 }
 
 /* EOF */

Index: laser_kill.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- laser_kill.hxx      23 Aug 2002 15:49:53 -0000      1.5
+++ laser_kill.hxx      25 Aug 2002 09:08:49 -0000      1.6
@@ -23,25 +23,28 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
-class LaserKill : public PinguAction
-{
-private:
-  Sprite sprite;
-public:
-  ///
-  LaserKill ();
-  std::string get_name () const { return "LaserKill"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Laserkill; }
-  void init (void);
-  void update (float delta);
-  void draw_offset (int x, int y, float s);
-  bool catchable () { return false; }
+namespace Actions {
+
+  class LaserKill : public PinguAction
+  {
+  private:
+    Sprite sprite;
   
-private:
-  LaserKill (const LaserKill&);
-  LaserKill operator= (const LaserKill&);
-};
+  public:
+    LaserKill ();
+    std::string get_name () const { return "LaserKill"; }
+    ActionName get_type () const { return Actions::Laserkill; }
+    void init (void);
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
+    bool catchable () { return false; }
+  
+  private:
+    LaserKill (const LaserKill&);
+    LaserKill operator= (const LaserKill&);
+  };
+
+}
 
 #endif
 

Index: miner.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- miner.cxx   23 Aug 2002 15:49:53 -0000      1.6
+++ miner.cxx   25 Aug 2002 09:08:49 -0000      1.7
@@ -25,74 +25,78 @@
 #include "../pingu.hxx"
 #include "miner.hxx"
 
-Miner::Miner()
-{
-}
+namespace Actions {
 
-void
-Miner::init(void)
-{
-  miner_radius = PingusResource::load_surface ("Other/bash_radius", "pingus");
-  miner_radius_gfx = PingusResource::load_surface ("Other/bash_radius_gfx", 
"pingus");
-  sprite = Sprite ("Pingus/miner0", "pingus", 20.0f);
-  sprite.set_align_center_bottom ();
-  slow_count = 0;
-}
+  Miner::Miner()
+  {
+  }
 
-void
-Miner::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Miner::init(void)
+  {
+    miner_radius = PingusResource::load_surface ("Other/bash_radius", 
"pingus");
+    miner_radius_gfx = PingusResource::load_surface ("Other/bash_radius_gfx", 
"pingus");
+    sprite = Sprite ("Pingus/miner0", "pingus", 20.0f);
+    sprite.set_align_center_bottom ();
+    slow_count = 0;
+  }
+
+  void
+  Miner::update(float delta)
+  {
+    sprite.update (delta);
   
-  // FIXME: Direction handling is ugly
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
+    // FIXME: Direction handling is ugly
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
 
-  ++slow_count;
-  if (slow_count % 4  == 0) 
-    {
-      if (slow_count % 3 == 0) 
-       {
-         pingu->get_world()->get_colmap()->remove(miner_radius.get_provider(), 
-                                                  pingu->get_x () - 16 + 
pingu->direction, 
-                                                  pingu->get_y () - 31);
-         
pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx.get_provider(), 
-                                                   pingu->get_x () - 16 + 
pingu->direction, 
-                                                   pingu->get_y () - 31);
-       }
+    ++slow_count;
+    if (slow_count % 4  == 0) 
+      {
+        if (slow_count % 3 == 0) 
+         {
+           
pingu->get_world()->get_colmap()->remove(miner_radius.get_provider(), 
+                                                    pingu->get_x () - 16 + 
pingu->direction, 
+                                                    pingu->get_y () - 31);
+           
pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx.get_provider(), 
+                                                     pingu->get_x () - 16 + 
pingu->direction, 
+                                                     pingu->get_y () - 31);
+         }
 
-      pingu->pos.x += pingu->direction;
-      pingu->pos.y += 1;
-    }
+        pingu->pos.x += pingu->direction;
+        pingu->pos.y += 1;
+      }
   
-  if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
-    {
-      pingu->get_world()->get_colmap()->remove(miner_radius, 
-                                              pingu->get_x () - 16 + 
pingu->direction, 
-                                              pingu->get_y () - 29);
-      pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx,
-                                               pingu->get_x () - 16 + 
pingu->direction, 
-                                               pingu->get_y () - 29);
-      pingu->set_action(Pingus::Actions::Walker);
-    }
-  else if (rel_getpixel(0, -1) ==  GroundpieceData::GP_SOLID)
-    {
-      PingusSound::play_sound("sounds/chink.wav");
-      pingu->get_world()->get_colmap()->remove(miner_radius, pingu->get_x () - 
16 + pingu->direction, 
-                                              pingu->get_y () - 31);
-      pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx, pingu->get_x 
() - 16 + pingu->direction, 
-                                               pingu->get_y () - 31);
-      pingu->set_action(Pingus::Actions::Walker);
-    }
-}
+    if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
+      {
+        pingu->get_world()->get_colmap()->remove(miner_radius, 
+                                                pingu->get_x () - 16 + 
pingu->direction, 
+                                                pingu->get_y () - 29);
+        pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx,
+                                                 pingu->get_x () - 16 + 
pingu->direction, 
+                                                 pingu->get_y () - 29);
+        pingu->set_action(Actions::Walker);
+      }
+    else if (rel_getpixel(0, -1) ==  GroundpieceData::GP_SOLID)
+      {
+        PingusSound::play_sound("sounds/chink.wav");
+        pingu->get_world()->get_colmap()->remove(miner_radius, pingu->get_x () 
- 16 + pingu->direction, 
+                                                pingu->get_y () - 31);
+        pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx, 
pingu->get_x () - 16 + pingu->direction, 
+                                                 pingu->get_y () - 31);
+        pingu->set_action(Actions::Walker);
+      }
+  }
+
+  void 
+  Miner::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
+    UNUSED_ARG(s);
+  }
 
-void 
-Miner::draw_offset(int x, int y, float s)
-{
-  sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
-  UNUSED_ARG(s);
 }
 
 /* EOF */

Index: miner.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- miner.hxx   23 Aug 2002 15:49:53 -0000      1.5
+++ miner.hxx   25 Aug 2002 09:08:49 -0000      1.6
@@ -23,27 +23,31 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-class Miner : public PinguAction
-{
-private:  
-  CL_Surface miner_radius;
-  CL_Surface miner_radius_gfx;
-  Sprite sprite;
-  int slow_count;
-public:
-  Miner ();
-  virtual ~Miner () {}
+namespace Actions {
 
-  void init (void);
-  std::string get_name () const { return "Miner"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Miner; }
-  void update (float delta);
-  void draw_offset (int x, int y, float s);
+  class Miner : public PinguAction
+  {
+  private:  
+    CL_Surface miner_radius;
+    CL_Surface miner_radius_gfx;
+    Sprite sprite;
+    int slow_count;
+  public:
+    Miner ();
+    virtual ~Miner () {}
+
+    void init (void);
+    std::string get_name () const { return "Miner"; }
+    ActionName get_type () const { return Actions::Miner; }
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
   
-private:
-  Miner (const Miner&);
-  Miner operator= (const Miner&); 
-};
+  private:
+    Miner (const Miner&);
+    Miner operator= (const Miner&); 
+  };
+
+}
 
 #endif
 

Index: rocket_launcher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rocket_launcher.cxx 23 Aug 2002 15:49:53 -0000      1.4
+++ rocket_launcher.cxx 25 Aug 2002 09:08:49 -0000      1.5
@@ -25,42 +25,46 @@
 #include "../pingu.hxx"
 #include "rocket_launcher.hxx"
 
-void
-RocketLauncher::init()
-{
-  sprite = Sprite (PingusResource::load_surface 
-                  ("Pingus/rocketlauncher" + to_string(pingu->get_owner ()),
-                   "pingus"), 10.0f, Sprite::NONE, Sprite::ONCE);
-  sprite.set_align_center_bottom ();
-  launched = false;
+namespace Actions {
 
-  pingu->get_world ()->get_particle_holder()->add_particle 
-    (new ExplosiveParticle ((int) pingu->pos.x, (int)pingu->pos.y - 12, 
-                           pingu->direction.is_left() ? -400.0f : 400.0f,
-                           0.0f));
-}
+  void
+  RocketLauncher::init()
+  {
+    sprite = Sprite (PingusResource::load_surface 
+                    ("Pingus/rocketlauncher" + to_string(pingu->get_owner ()),
+                     "pingus"), 10.0f, Sprite::NONE, Sprite::ONCE);
+    sprite.set_align_center_bottom ();
+    launched = false;
 
-void
-RocketLauncher::update(float delta)
-{
-  if (sprite.finished ())
-    {
-      pingu->set_action(Pingus::Actions::Walker);
-    }
+    pingu->get_world ()->get_particle_holder()->add_particle 
+      (new ExplosiveParticle ((int) pingu->pos.x, (int)pingu->pos.y - 12, 
+                             pingu->direction.is_left() ? -400.0f : 400.0f,
+                             0.0f));
+  }
 
-  sprite.update (delta);
-}
+  void
+  RocketLauncher::update(float delta)
+  {
+    if (sprite.finished ())
+      {
+        pingu->set_action(Actions::Walker);
+      }
 
-void
-RocketLauncher::draw_offset(int x, int y, float s)
-{
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
-  sprite.put_screen (pingu->pos + CL_Vector (x, y));
+    sprite.update (delta);
+  }
+
+  void
+  RocketLauncher::draw_offset(int x, int y, float s)
+  {
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
+    sprite.put_screen (pingu->pos + CL_Vector (x, y));
   
-  UNUSED_ARG(s);
+    UNUSED_ARG(s);
+  }
+
 }
 
 /* EOF */

Index: rocket_launcher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rocket_launcher.hxx 23 Aug 2002 15:49:53 -0000      1.5
+++ rocket_launcher.hxx 25 Aug 2002 09:08:49 -0000      1.6
@@ -23,27 +23,31 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class RocketLauncher : public PinguAction
-{
-private:
-  Sprite sprite;
-  bool launched;
-public:
-  RocketLauncher () {}
-  ~RocketLauncher () {}
+namespace Actions {
 
-  void  init ();
+  class RocketLauncher : public PinguAction
+  {
+  private:
+    Sprite sprite;
+    bool launched;
+  public:
+    RocketLauncher () {}
+    ~RocketLauncher () {}
+
+    void  init ();
   
-  std::string get_name () const { return "RocketLauncher"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Rocketlauncher; }
+    std::string get_name () const { return "RocketLauncher"; }
+    ActionName get_type () const { return Actions::Rocketlauncher; }
   
-  void update (float delta);
-  void draw_offset (int, int, float s);
+    void update (float delta);
+    void draw_offset (int, int, float s);
   
-private:
-  RocketLauncher (const RocketLauncher&);
-  RocketLauncher operator= (const RocketLauncher&);
-};
+  private:
+    RocketLauncher (const RocketLauncher&);
+    RocketLauncher operator= (const RocketLauncher&);
+  };
+
+}
 
 #endif
 

Index: slider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- slider.cxx  23 Aug 2002 15:49:53 -0000      1.4
+++ slider.cxx  25 Aug 2002 09:08:49 -0000      1.5
@@ -22,57 +22,61 @@
 #include "../pingu.hxx"
 #include "slider.hxx"
 
-Slider::Slider ()
-{
-}
+namespace Actions {
 
-void
-Slider::init(void)
-{
-  sprite = Sprite("Pingus/slider" + to_string(pingu->get_owner ()),
-                 "pingus");
-  sprite.set_align_center_bottom();
-  speed = 10;
-}
+  Slider::Slider ()
+  {
+  }
 
-void
-Slider::update(float delta)
-{
-  if (pingu->direction.is_left ())
-    sprite.set_direction (Sprite::LEFT);
-  else
-    sprite.set_direction (Sprite::RIGHT);
+  void
+  Slider::init(void)
+  {
+    sprite = Sprite("Pingus/slider" + to_string(pingu->get_owner ()),
+                   "pingus");
+    sprite.set_align_center_bottom();
+    speed = 10;
+  }
 
-  sprite.update (delta);
+  void
+  Slider::update(float delta)
+  {
+    if (pingu->direction.is_left ())
+      sprite.set_direction (Sprite::LEFT);
+    else
+      sprite.set_direction (Sprite::RIGHT);
 
-  for (int i = 0; i < speed; ++i)
-    {
-      pingu->pos.x += pingu->direction;
+    sprite.update (delta);
+
+    for (int i = 0; i < speed; ++i)
+      {
+        pingu->pos.x += pingu->direction;
       
-      if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
-       {
-         speed = (speed > 5 ? 5 : speed);
+        if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
+         {
+           speed = (speed > 5 ? 5 : speed);
 
-         if (pingu->direction.is_right()) {
-           pingu->velocity += CL_Vector(speed, 0.0);
-         } else {
-           pingu->velocity += CL_Vector(-speed, 0.0);
+           if (pingu->direction.is_right()) {
+             pingu->velocity += CL_Vector(speed, 0.0);
+           } else {
+             pingu->velocity += CL_Vector(-speed, 0.0);
+           }
+
+           pingu->set_action(Actions::Walker);
          }
+      }
 
-         pingu->set_action(Pingus::Actions::Walker);
-       }
-    }
+    speed -= 7 * delta;
+    if (speed < 1)
+      pingu->set_action(Actions::Walker);
+  }
 
-  speed -= 7 * delta;
-  if (speed < 1)
-    pingu->set_action(Pingus::Actions::Walker);
-}
+  void
+  Slider::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (pingu->pos + CL_Vector(x, y - 2));
+    UNUSED_ARG(s);
+  }
 
-void
-Slider::draw_offset(int x, int y, float s)
-{
-  sprite.put_screen (pingu->pos + CL_Vector(x, y - 2));
-  UNUSED_ARG(s);
 }
 
 /* EOF */

Index: slider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- slider.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ slider.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,24 +23,28 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Slider : public PinguAction
-{
-private:
-  Sprite sprite;
-  float  speed;
-public:
-  Slider ();
+namespace Actions {
 
-  void  init(void);
-  std::string get_name() const { return "Slider"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Slider; }
-  void  update(float delta);
-  void  draw_offset(int x, int y, float s);
+  class Slider : public PinguAction
+  {
+  private:
+    Sprite sprite;
+    float  speed;
+  public:
+    Slider ();
+
+    void  init(void);
+    std::string get_name() const { return "Slider"; }
+    ActionName get_type() const { return Actions::Slider; }
+    void  update(float delta);
+    void  draw_offset(int x, int y, float s);
   
-private:
-  Slider (const Slider&);
-  Slider operator= (const Slider&);
-};
+  private:
+    Slider (const Slider&);
+    Slider operator= (const Slider&);
+  };
+
+}
 
 #endif
 

Index: smashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- smashed.cxx 13 Jun 2002 14:25:12 -0000      1.2
+++ smashed.cxx 25 Aug 2002 09:08:49 -0000      1.3
@@ -20,24 +20,27 @@
 #include "../pingu.hxx"
 #include "smashed.hxx"
 
-void
-Smashed::init(void)
-{
-  sprite = Sprite ("Pingus/bomber0", "pingus");
-  sound_played = false;  
-}
+namespace Actions {
 
-void 
-Smashed::draw_offset(int x, int y, float /*s*/)
-{
-  sprite.put_screen (x, y);
-}
+  void
+  Smashed::init(void)
+  {
+    sprite = Sprite ("Pingus/bomber0", "pingus");
+    sound_played = false;  
+  }
 
-void
-Smashed::update(float /*delta*/)
-{
-  //  pingu->particle->add_pingu_explo(pingu->x_pos, pingu->y_pos - 16);
-  pingu->set_status(PS_DEAD);
-}
+  void 
+  Smashed::draw_offset(int x, int y, float /*s*/)
+  {
+    sprite.put_screen (x, y);
+  }
 
+  void
+  Smashed::update(float /*delta*/)
+  {
+    //  pingu->particle->add_pingu_explo(pingu->x_pos, pingu->y_pos - 16);
+    pingu->set_status(PS_DEAD);
+  }
+
+}
 /* EOF */

Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- smashed.hxx 23 Aug 2002 15:49:53 -0000      1.5
+++ smashed.hxx 25 Aug 2002 09:08:49 -0000      1.6
@@ -23,26 +23,30 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Smashed : public PinguAction
-{
-private:
-  bool particle_thrown;
-  bool sound_played;
-  Sprite sprite;
+namespace Actions {
+
+  class Smashed : public PinguAction
+  {
+  private:
+    bool particle_thrown;
+    bool sound_played;
+    Sprite sprite;
   
-public:
-  Smashed () { }
-  void init (void);
-  std::string get_name () const { return "Smashed"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Smashed; }
-  void update (float delta);
-  void draw_offset (int x, int y, float s);
-  bool catchable () { return false; }
+  public:
+    Smashed () { }
+    void init (void);
+    std::string get_name () const { return "Smashed"; }
+    ActionName get_type () const { return Actions::Smashed; }
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
+    bool catchable () { return false; }
   
-private:
-  Smashed (const Smashed&);
-  Smashed operator= (const Smashed&);
-};
+  private:
+    Smashed (const Smashed&);
+    Smashed operator= (const Smashed&);
+  };
+
+}
 
 #endif
 

Index: splashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- splashed.cxx        22 Aug 2002 02:20:12 -0000      1.3
+++ splashed.cxx        25 Aug 2002 09:08:49 -0000      1.4
@@ -22,43 +22,47 @@
 #include "../sound.hxx"
 #include "splashed.hxx"
 
-Splashed::Splashed(void)
-{
-}
+namespace Actions {
 
-void
-Splashed::init(void)
-{
-  sprite = Sprite ("Pingus/splat0", "pingus", 30.0f,
-                  Sprite::NONE, Sprite::ONCE);
-  sprite.set_align_center_bottom ();
+  Splashed::Splashed(void)
+  {
+  }
+
+  void
+  Splashed::init(void)
+  {
+    sprite = Sprite ("Pingus/splat0", "pingus", 30.0f,
+                    Sprite::NONE, Sprite::ONCE);
+    sprite.set_align_center_bottom ();
   
-  sound_played = false;
-  particle_thrown = false;
-}
+    sound_played = false;
+    particle_thrown = false;
+  }
 
-void
-Splashed::update(float delta)
-{
-  sprite.update (delta);
+  void
+  Splashed::update(float delta)
+  {
+    sprite.update (delta);
 
-  if (!particle_thrown)
+    if (!particle_thrown)
+      {
+        particle_thrown = true;
+        pingu->get_world ()->play_wav("sounds/splash.wav", pingu->get_pos ());
+      }
+
+    if (sprite.finished ())
     {
-      particle_thrown = true;
-      pingu->get_world ()->play_wav("sounds/splash.wav", pingu->get_pos ());
+      pingu->set_status(PS_DEAD);
     }
+  }
 
-  if (sprite.finished ())
+  void 
+  Splashed::draw_offset(int x_of, int y_of, float /*s*/)
   {
-    pingu->set_status(PS_DEAD);
+    sprite.put_screen (pingu->get_x () + x_of,
+                      pingu->get_y () + y_of);
   }
-}
 
-void 
-Splashed::draw_offset(int x_of, int y_of, float /*s*/)
-{
-  sprite.put_screen (pingu->get_x () + x_of,
-                    pingu->get_y () + y_of);
 }
 
 /* EOF */

Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- splashed.hxx        23 Aug 2002 15:49:53 -0000      1.5
+++ splashed.hxx        25 Aug 2002 09:08:49 -0000      1.6
@@ -23,27 +23,31 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Splashed : public PinguAction
-{
-private:
-  bool particle_thrown;
-  bool sound_played;
-  Sprite sprite;
-public:
-  Splashed();
-  void init (void);
+namespace Actions {
+
+  class Splashed : public PinguAction
+  {
+  private:
+    bool particle_thrown;
+    bool sound_played;
+    Sprite sprite;
+  public:
+    Splashed();
+    void init (void);
   
-  std::string get_name () const { return "Splashed"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Splashed; }
+    std::string get_name () const { return "Splashed"; }
+    ActionName get_type () const { return Actions::Splashed; }
   
-  void update (float delta);
-  void draw_offset (int x, int y, float s);
-  bool catchable () { return false; }
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
+    bool catchable () { return false; }
   
-private:
-  Splashed (const Splashed&);
-  Splashed operator= (const Splashed&);
-};
+  private:
+    Splashed (const Splashed&);
+    Splashed operator= (const Splashed&);
+  };
+
+}
 
 #endif
 

Index: superman.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- superman.cxx        2 Jul 2002 13:36:06 -0000       1.2
+++ superman.cxx        25 Aug 2002 09:08:49 -0000      1.3
@@ -22,40 +22,44 @@
 #include "../string_converter.hxx"
 #include "superman.hxx"
 
-Superman::Superman ()
-{
-}
+namespace Actions {
 
-void
-Superman::init()
-{
-  x_pos = pingu->pos.x;
-  counter = 0.0;
-  sprite = Sprite (PingusResource::load_surface 
-                  ("Pingus/superman" + to_string(pingu->get_owner ()),
-                   "pingus"));
-  sprite.set_align_center_bottom (); 
-}
+  Superman::Superman ()
+  {
+  }
 
-void  
-Superman::update(float delta)
-{
-  sprite.update (delta);
-  counter += delta;
-  pingu->pos.x += 40.0f * delta;
-  pingu->pos.y -= 200.0f * delta;
+  void
+  Superman::init()
+  {
+    x_pos = pingu->pos.x;
+    counter = 0.0;
+    sprite = Sprite (PingusResource::load_surface 
+                    ("Pingus/superman" + to_string(pingu->get_owner ()),
+                     "pingus"));
+    sprite.set_align_center_bottom (); 
+  }
 
-  if (pingu->pos.y < -32)
-    {
-      pingu->set_status (PS_DEAD);
-    }
-}
+  void  
+  Superman::update(float delta)
+  {
+    sprite.update (delta);
+    counter += delta;
+    pingu->pos.x += 40.0f * delta;
+    pingu->pos.y -= 200.0f * delta;
+
+    if (pingu->pos.y < -32)
+      {
+        pingu->set_status (PS_DEAD);
+      }
+  }
+
+  void   
+  Superman::draw_offset(int x_of, int y_of, float /*s*/)
+  {
+    sprite.put_screen (pingu->get_x () + x_of,
+                      pingu->get_y () + y_of);
+  }
 
-void   
-Superman::draw_offset(int x_of, int y_of, float /*s*/)
-{
-  sprite.put_screen (pingu->get_x () + x_of,
-                    pingu->get_y () + y_of);
 }
 
 /* EOF */

Index: superman.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- superman.hxx        23 Aug 2002 15:49:53 -0000      1.6
+++ superman.hxx        25 Aug 2002 09:08:49 -0000      1.7
@@ -23,26 +23,30 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Superman : public PinguAction
-{
-private:
-  double counter;
-  double x_pos;
-  Sprite sprite;
+namespace Actions {
+
+  class Superman : public PinguAction
+  {
+  private:
+    double counter;
+    double x_pos;
+    Sprite sprite;
   
-public:
-  Superman ();
-  void init ();
-  std::string get_name () const { return "Superman"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Superman; }
+  public:
+    Superman ();
+    void init ();
+    std::string get_name () const { return "Superman"; }
+    ActionName get_type () const { return Actions::Superman; }
   
-  void update (float delta);
-  void draw_offset (int, int, float s);
+    void update (float delta);
+    void draw_offset (int, int, float s);
 
-private:
-  Superman (const Superman&);
-  Superman operator= (const Superman&);
-};
+  private:
+    Superman (const Superman&);
+    Superman operator= (const Superman&);
+  };
+
+}
 
 #endif
 

Index: teleported.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- teleported.cxx      23 Aug 2002 15:49:53 -0000      1.4
+++ teleported.cxx      25 Aug 2002 09:08:49 -0000      1.5
@@ -20,31 +20,35 @@
 #include "../pingu.hxx"
 #include "teleported.hxx"
 
-Teleported::Teleported(void) : sound_played(false)
-{
-}
+namespace Actions {
 
-void
-Teleported::init(void)
-{
-  sprite = Sprite ("Pingus/bomber0", "pingus");
-}
+  Teleported::Teleported(void) : sound_played(false)
+  {
+  }
 
+  void
+  Teleported::init(void)
+  {
+    sprite = Sprite ("Pingus/bomber0", "pingus");
+  }
 
-void 
-Teleported::draw_offset(int x, int y, float s)
-{
-  sprite.put_screen (x, y);
-  UNUSED_ARG(s);
-}
 
+  void 
+  Teleported::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (x, y);
+    UNUSED_ARG(s);
+  }
+
+
+  void
+  Teleported::update(float /*delta*/)
+  {
+    pingu->set_pos (x_target, y_target);
+    pingu->set_status(PS_ALIVE);
+    pingu->set_action(Actions::Walker);
+  }
 
-void
-Teleported::update(float /*delta*/)
-{
-  pingu->set_pos (x_target, y_target);
-  pingu->set_status(PS_ALIVE);
-  pingu->set_action(Pingus::Actions::Walker);
 }
 
 /* EOF */

Index: teleported.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- teleported.hxx      23 Aug 2002 15:49:53 -0000      1.5
+++ teleported.hxx      25 Aug 2002 09:08:49 -0000      1.6
@@ -21,28 +21,32 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class Teleported : public PinguAction
-{
-private:
-  //bool particle_thrown;
-  bool sound_played;
-  Sprite sprite;
-public:
-  Teleported();
+namespace Actions {
 
-  std::string get_name() const { return "Teleported"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Teleported; }
-  void init(void);
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
-  bool catchable () { return false; }
+  class Teleported : public PinguAction
+  {
+  private:
+    //bool particle_thrown;
+    bool sound_played;
+    Sprite sprite;
+  public:
+    Teleported();
 
-  int x_target, y_target; // <- FIXME: Ugly!
+    std::string get_name() const { return "Teleported"; }
+    ActionName get_type() const { return Actions::Teleported; }
+    void init(void);
+    void update(float delta);
+    void draw_offset(int x, int y, float s);
+    bool catchable () { return false; }
+
+    int x_target, y_target; // <- FIXME: Ugly!
   
-private:
-  Teleported (const Teleported&);
-  Teleported operator= (const Teleported&);
-};
+  private:
+    Teleported (const Teleported&);
+    Teleported operator= (const Teleported&);
+  };
+
+}
 
 #endif
 

Index: waiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- waiter.cxx  23 Aug 2002 15:49:53 -0000      1.3
+++ waiter.cxx  25 Aug 2002 09:08:49 -0000      1.4
@@ -21,33 +21,38 @@
 #include "../pingus_resource.hxx"
 #include "waiter.hxx"
 
-Waiter::Waiter()
-{
-}
+namespace Actions {
 
-void
-Waiter::update(float delta)
-{
-  sprite.update (delta);
+  Waiter::Waiter()
+  {
+  }
+
+  void
+  Waiter::update(float delta)
+  {
+    sprite.update (delta);
   
-  if (countdown < 0)
-    pingu->set_action(Pingus::Actions::Walker);
+    if (countdown < 0)
+      pingu->set_action(Actions::Walker);
   
-  countdown -= delta;
-}
+    countdown -= delta;
+  }
 
-void
-Waiter::init()
-{
-  sprite = PingusResource::load_surface ("Pingus/blocker0", "pingus");
-  sprite.set_align_center_bottom ();
-  countdown = 2.0;
-}
+  void
+  Waiter::init()
+  {
+    sprite = PingusResource::load_surface ("Pingus/blocker0", "pingus");
+    sprite.set_align_center_bottom ();
+    countdown = 2.0;
+  }
+
+  void
+  Waiter::draw_offset(int x, int y, float s)
+  {
+    sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
+    UNUSED_ARG(s);
+  }
 
-void
-Waiter::draw_offset(int x, int y, float /*s*/)
-{
-  sprite.put_screen (pingu->get_pos () + CL_Vector(x, y));
 }
 
 /* EOF */

Index: waiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- waiter.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ waiter.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,28 +23,33 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-/** A Waiting action for the bridger, it gets activated when the
-    bridger is out of bridges. It then waits two seconds (meanwhile doing a
-    funny animation) and then he changes back to a normal walker. */
-class Waiter : public PinguAction
-{
-private:
-  float countdown;
-  Sprite sprite;
-public:
-  Waiter();
-  void init();
+namespace Actions {
+
+  /** A Waiting action for the bridger, it gets activated when the
+      bridger is out of bridges. It then waits two seconds (meanwhile doing a
+      funny animation) and then he changes back to a normal walker. */
+  class Waiter : public PinguAction
+  {
+  private:
+    float countdown;
+    Sprite sprite;
   
-  std::string get_name() const { return "Waiter"; }
-  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Waiter; }
+  public:
+    Waiter();
+    void init();
   
-  void update(float delta);
-  void  draw_offset(int x, int y, float s);
+    std::string get_name() const { return "Waiter"; }
+    ActionName get_type() const { return Actions::Waiter; }
   
-private:
-  Waiter (const Waiter&);
-  Waiter operator= (const Waiter&);
-};
+    void update(float delta);
+    void  draw_offset(int x, int y, float s);
+  
+  private:
+    Waiter (const Waiter&);
+    Waiter operator= (const Waiter&);
+  };
+
+}
 
 #endif
 

Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- walker.cxx  23 Aug 2002 15:49:53 -0000      1.16
+++ walker.cxx  25 Aug 2002 09:08:49 -0000      1.17
@@ -24,185 +24,189 @@
 #include "../debug.hxx"
 #include "walker.hxx"
 
-void
-Walker::init(void)
-{
-  walker = Sprite ("Pingus/walker" + to_string(pingu->get_owner ()), "pingus");
-  walker.set_align_center_bottom ();
+namespace Actions {
+
+  void
+  Walker::init(void)
+  {
+    walker = Sprite ("Pingus/walker" + to_string(pingu->get_owner ()), 
"pingus");
+    walker.set_align_center_bottom ();
   
-  // Reset the velocity
-  pingu->velocity = CL_Vector ();
-}
+    // Reset the velocity
+    pingu->velocity = CL_Vector ();
+  }
 
-void
-Walker::update(float delta)
-{
-  // update the sprite
-  walker.update (delta);
+  void
+  Walker::update(float delta)
+  {
+    // update the sprite
+    walker.update (delta);
 
-  CL_Vector last_pos = pingu->pos;
+    CL_Vector last_pos = pingu->pos;
 
-  /* How should this code work?
+    /* How should this code work?
      
-  1) Check that the Pingu stands still on ground, if not turn it into
-  a faller or drown. The reason we do so, is that we catch situations
-  where a digger or a similar action removed the ground under the
-  walker.
+    1) Check that the Pingu stands still on ground, if not turn it into
+    a faller or drown. The reason we do so, is that we catch situations
+    where a digger or a similar action removed the ground under the
+    walker.
   
-  2) If pingu is still on ground, we can preprare the next step
+    2) If pingu is still on ground, we can preprare the next step
 
-  3) Check if up-hill or down-hill is required
+    3) Check if up-hill or down-hill is required
   
 
-  4)
+    4)
   
-  */
+    */
 
-  if (rel_getpixel(0, -1) ==  GroundpieceData::GP_WATER)
-    {
-      pingu->set_action (Pingus::Actions::Drown);
-      return;
-    }
+    if (rel_getpixel(0, -1) ==  GroundpieceData::GP_WATER)
+      {
+        pingu->set_action (Actions::Drown);
+        return;
+      }
 
-  // The Pingu stands no longer on ground, the cause for this could be
-  // a digger, miner or a bomber
-  if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
-    { 
-      // We search for the nearest ground below the pingu, if we can't
-      // find anything within a few pixels, we will turn into a faller
-      bool found_ground = false;
-      int i;
-      for (i = -2; i > -5; --i)
-       {
-         if (!(rel_getpixel(0, i) == GroundpieceData::GP_NOTHING))
-           {
-             found_ground = true;
-             break;
-           }
-       }
+    // The Pingu stands no longer on ground, the cause for this could be
+    // a digger, miner or a bomber
+    if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING)
+      { 
+        // We search for the nearest ground below the pingu, if we can't
+        // find anything within a few pixels, we will turn into a faller
+        bool found_ground = false;
+        int i;
+        for (i = -2; i > -5; --i)
+         {
+           if (!(rel_getpixel(0, i) == GroundpieceData::GP_NOTHING))
+             {
+               found_ground = true;
+               break;
+             }
+         }
        
-      if (found_ground)
-       {
-         pingu->pos.y -= i;
-       }
-      else
-       {
-         pingu->set_action (Pingus::Actions::Faller);
-         return;
-       }
-    }
+        if (found_ground)
+         {
+           pingu->pos.y -= i;
+         }
+        else
+         {
+           pingu->set_action (Actions::Faller);
+           return;
+         }
+      }
 
   
-  // FIXME: here we could/should scan more pixels
-  if (rel_getpixel(1, 0) == GroundpieceData::GP_BRIDGE
-      && !head_collision_on_walk(1, 1))  // bridge
-    {
-      // simple, stupid, but working bridge code
-      // FIXME: We don't check if we 'drift' into a solid ground block
-      pingu->pos.x += pingu->direction;
-      pingu->pos.y -= 1; // pingus 'float' through bridges
-    }
-  else 
-    { 
-      // Non of the trivial moves worked, so we do up-hill or down-hill walking
-      // FIXME: currently the pingu takes multiple steps at once when
-      // FIXME: working uphill, this looks kind of ugly
+    // FIXME: here we could/should scan more pixels
+    if (rel_getpixel(1, 0) == GroundpieceData::GP_BRIDGE
+        && !head_collision_on_walk(1, 1))  // bridge
+      {
+        // simple, stupid, but working bridge code
+        // FIXME: We don't check if we 'drift' into a solid ground block
+        pingu->pos.x += pingu->direction;
+        pingu->pos.y -= 1; // pingus 'float' through bridges
+      }
+    else 
+      { 
+        // Non of the trivial moves worked, so we do up-hill or down-hill 
walking
+        // FIXME: currently the pingu takes multiple steps at once when
+        // FIXME: working uphill, this looks kind of ugly
 
 
-      // FIXME: rel_getpixel works on the current pos, so modifing pos
-      // FIXME: is evil, a backup copy might help
+        // FIXME: rel_getpixel works on the current pos, so modifing pos
+        // FIXME: is evil, a backup copy might help
 
-      // if infront is a pixel 
-      // Pingu is walking up the mountain 
-      // we can continue walking up. search for the correct y_pos
-      int y_inc = 0;
-      int possible_y_step = 0;
-      bool found_next_step = false;
-      for(y_inc=-max_steps; y_inc <= max_steps; y_inc++)
-       {// up/down-hill scan
-         if ((rel_getpixel(1, y_inc) ==  GroundpieceData::GP_NOTHING
-              || rel_getpixel(1, y_inc) ==  GroundpieceData::GP_BRIDGE) // 
FIXME: This causes a rather huge step
-             && rel_getpixel(1, y_inc - 1) !=  GroundpieceData::GP_NOTHING)
-           { // FIXME:
-             found_next_step = true;
-             possible_y_step = y_inc;
-             // No break here, since we always want to use the highest 
possible position
-             //break;
-           }
-       }
+        // if infront is a pixel 
+        // Pingu is walking up the mountain 
+        // we can continue walking up. search for the correct y_pos
+        int y_inc = 0;
+        int possible_y_step = 0;
+        bool found_next_step = false;
+        for(y_inc=-max_steps; y_inc <= max_steps; y_inc++)
+         {// up/down-hill scan
+           if ((rel_getpixel(1, y_inc) ==  GroundpieceData::GP_NOTHING
+                || rel_getpixel(1, y_inc) ==  GroundpieceData::GP_BRIDGE) // 
FIXME: This causes a rather huge step
+               && rel_getpixel(1, y_inc - 1) !=  GroundpieceData::GP_NOTHING)
+             { // FIXME:
+               found_next_step = true;
+               possible_y_step = y_inc;
+               // No break here, since we always want to use the highest 
possible position
+               //break;
+             }
+         }
       
-      if (found_next_step)
-       {
-         pingu->pos.x += pingu->direction;
-         pingu->pos.y -= possible_y_step; // pos.y has a reversed co-system to 
rel_getpixel()?
-       }
-      else
-       {
-         if (rel_getpixel(1, 0) !=  GroundpieceData::GP_NOTHING)
-           {
-             // We reached a wall
-              if (pingu->request_wall_action()) 
-                {
-                 pout(PINGUS_DEBUG_ACTIONS) 
-                   << "Pingu: We are in front of a wall, setting persistant 
action" << std::endl;
-                 return;
-                }
+        if (found_next_step)
+         {
+           pingu->pos.x += pingu->direction;
+           pingu->pos.y -= possible_y_step; // pos.y has a reversed co-system 
to rel_getpixel()?
+         }
+        else
+         {
+           if (rel_getpixel(1, 0) !=  GroundpieceData::GP_NOTHING)
+             {
+               // We reached a wall
+                if (pingu->request_wall_action()) 
+                  {
+                   pout(PINGUS_DEBUG_ACTIONS) 
+                     << "Pingu: We are in front of a wall, setting persistant 
action" << std::endl;
+                   return;
+                  }
             
-             // No persitent action found, so change the direction
-             pingu->direction.change();              
-           }
-         else
-           {
-             // We take the step, so that we are in the air
-             pingu->pos.x += pingu->direction;
-             // We reached a cliff
-             pingu->set_action (Pingus::Actions::Faller);
-             return;
-           }
-       }
-    }
+               // No persitent action found, so change the direction
+               pingu->direction.change();            
+             }
+           else
+             {
+               // We take the step, so that we are in the air
+               pingu->pos.x += pingu->direction;
+               // We reached a cliff
+               pingu->set_action (Actions::Faller);
+               return;
+             }
+         }
+      }
 
 
-  // This is moved here to fix the bug where pingu stuck turning both
-  // sides indefinetely when a head collision occured. the fix needs the
-  // above downhill walk being done before head collision check.
-  if (head_collision_on_walk(0, 0))
-    {
-      pout(PINGUS_DEBUG_ACTIONS) << "Pingu: Head collision" << std::endl;
+    // This is moved here to fix the bug where pingu stuck turning both
+    // sides indefinetely when a head collision occured. the fix needs the
+    // above downhill walk being done before head collision check.
+    if (head_collision_on_walk(0, 0))
+      {
+        pout(PINGUS_DEBUG_ACTIONS) << "Pingu: Head collision" << std::endl;
 
-      //if the new position causes a head collision, we are already
-      //stuck in a wall, so lets go back to the old position
-      pingu->direction.change();
-      pingu->pos = last_pos;
-      return;
-    }
+        //if the new position causes a head collision, we are already
+        //stuck in a wall, so lets go back to the old position
+        pingu->direction.change();
+        pingu->pos = last_pos;
+        return;
+      }
       
-  /*
-    for(int y_inc=1; y_inc <= max_steps; ++y_inc) 
-    {
-    if (rel_getpixel(1, -y_inc) == ColMap::WATER) 
-    {
-    pingu->set_paction ("drown");
-    return;
-    } 
-    else if(rel_getpixel(1, -y_inc) != ColMap::NOTHING)
-    { // there is land
-    pingu->pos.y += y_inc - 1;
-    break;
-    }
-    }
-  */
-}
+    /*
+      for(int y_inc=1; y_inc <= max_steps; ++y_inc) 
+      {
+      if (rel_getpixel(1, -y_inc) == ColMap::WATER) 
+      {
+      pingu->set_paction ("drown");
+      return;
+      } 
+      else if(rel_getpixel(1, -y_inc) != ColMap::NOTHING)
+      { // there is land
+      pingu->pos.y += y_inc - 1;
+      break;
+      }
+      }
+    */
+  }
 
-void  
-Walker::draw_offset(int x, int y, float /*s*/)
-{
-  if (pingu->direction.is_left ())
-    walker.set_direction (Sprite::LEFT);
-  else
-    walker.set_direction (Sprite::RIGHT);
+  void  
+  Walker::draw_offset(int x, int y, float /*s*/)
+  {
+    if (pingu->direction.is_left ())
+      walker.set_direction (Sprite::LEFT);
+    else
+      walker.set_direction (Sprite::RIGHT);
+
+    walker.put_screen (pingu->pos + CL_Vector (x, y));
+  }
 
-  walker.put_screen (pingu->pos + CL_Vector (x, y));
 }
 
 /* EOF */

Index: walker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- walker.hxx  23 Aug 2002 15:49:53 -0000      1.5
+++ walker.hxx  25 Aug 2002 09:08:49 -0000      1.6
@@ -23,27 +23,31 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-class Walker : public PinguAction
-{
-private:
-  Sprite walker; 
+namespace Actions {
 
-  enum { max_steps = 5 }; // max nr. of pixels that pingu can walk up/down
+  class Walker : public PinguAction
+  {
+  private:
+    Sprite walker; 
 
-public:
-  Walker () { }
-  void init (void);
+    enum { max_steps = 5 }; // max nr. of pixels that pingu can walk up/down
 
-  void update (float delta);
-  void draw_offset (int x, int y, float s);
+  public:
+    Walker () { }
+    void init (void);
 
-  std::string get_name () const { return "Walker"; }
-  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Walker; }
+    void update (float delta);
+    void draw_offset (int x, int y, float s);
+
+    std::string get_name () const { return "Walker"; }
+    ActionName get_type () const { return Actions::Walker; }
   
-private:
-  Walker (const Walker&);
-  Walker operator= (const Walker&);
-};
+  private:
+    Walker (const Walker&);
+    Walker operator= (const Walker&);
+  };
+
+}
 
 #endif
 





reply via email to

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