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 angel.hxx,1.5,1.6 basher.cxx,


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.5,1.6 basher.cxx,1.9,1.10 basher.hxx,1.5,1.6 blocker.cxx,1.3,1.4 blocker.hxx,1.5,1.6 boarder.cxx,1.3,1.4 boarder.hxx,1.5,1.6 bomber.hxx,1.7,1.8 bridger.cxx,1.9,1.10 bridger.hxx,1.7,1.8 climber.cxx,1.5,1.6 climber.hxx,1.4,1.5 digger.cxx,1.7,1.8 digger.hxx,1.4,1.5 drown.hxx,1.4,1.5 exiter.hxx,1.4,1.5 faller.cxx,1.14,1.15 faller.hxx,1.9,1.10 floater.cxx,1.9,1.10 floater.hxx,1.6,1.7 jumper.cxx,1.5,1.6 jumper.hxx,1.4,1.5 laser_kill.hxx,1.4,1.5 miner.cxx,1.5,1.6 miner.hxx,1.4,1.5 rocket_launcher.cxx,1.3,1.4 rocket_launcher.hxx,1.4,1.5 slider.cxx,1.3,1.4 slider.hxx,1.4,1.5 smashed.hxx,1.4,1.5 splashed.hxx,1.4,1.5 superman.hxx,1.5,1.6 teleported.cxx,1.3,1.4 teleported.hxx,1.4,1.5 waiter.cxx,1.2,1.3 waiter.hxx,1.4,1.5 walker.cxx,1.15,1.16 walker.hxx,1.4,1.5
Date: 23 Aug 2002 15:50:27 -0000

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

Modified Files:
        angel.hxx basher.cxx basher.hxx blocker.cxx blocker.hxx 
        boarder.cxx boarder.hxx bomber.hxx bridger.cxx bridger.hxx 
        climber.cxx climber.hxx digger.cxx digger.hxx drown.hxx 
        exiter.hxx faller.cxx faller.hxx floater.cxx floater.hxx 
        jumper.cxx jumper.hxx laser_kill.hxx miner.cxx miner.hxx 
        rocket_launcher.cxx rocket_launcher.hxx slider.cxx slider.hxx 
        smashed.hxx splashed.hxx superman.hxx teleported.cxx 
        teleported.hxx waiter.cxx waiter.hxx walker.cxx walker.hxx 
Log Message:
- added copy constructor/operator= or private declarations
- some cleanup


Index: angel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- angel.hxx   12 Aug 2002 22:52:04 -0000      1.5
+++ angel.hxx   23 Aug 2002 15:49:53 -0000      1.6
@@ -42,10 +42,13 @@
   Angel ();
   void  init();
   std::string get_name() const { return "Angel"; }
-  ActionName get_type() const { return Pingus::Actions::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&);
 };
 
 #endif

Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- basher.cxx  17 Aug 2002 17:56:23 -0000      1.9
+++ basher.cxx  23 Aug 2002 15:49:53 -0000      1.10
@@ -78,7 +78,7 @@
        }
       else if (sprite.get_progress () > 0.6f)
        {
-         pingu->set_action(Walker);
+         pingu->set_action(Pingus::Actions::Walker);
        }
     }
 }
@@ -99,7 +99,7 @@
 {
   if (rel_getpixel(0, -1) ==  GroundpieceData::GP_NOTHING) {
     // We are in the air... lets fall...
-    pingu->set_action(Faller);
+    pingu->set_action(Pingus::Actions::Faller);
   } else {
     // On ground, walk forward...
     pingu->pos.x += pingu->direction;

Index: basher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- basher.hxx  28 Jun 2002 15:12:22 -0000      1.5
+++ basher.hxx  23 Aug 2002 15:49:53 -0000      1.6
@@ -38,7 +38,7 @@
   
   void   init(void);
   std::string get_name () const { return "Basher"; }
-  ActionName get_type() const { return Pingus::Actions::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();
@@ -47,6 +47,10 @@
   
   /// Defines "wall" height needed so as to determine whether it should be 
bashed.
   static const int bash_height;
+  
+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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- blocker.cxx 28 Jun 2002 15:12:22 -0000      1.3
+++ blocker.cxx 23 Aug 2002 15:49:53 -0000      1.4
@@ -53,18 +53,21 @@
 }
 
 void
-Blocker::update(float /*delta*/)
+Blocker::update(float delta)
 {
   if (!standing_on_ground())
     {
-      pingu->set_action(Faller);
+      pingu->set_action(Pingus::Actions::Faller);
     }
+    
+  UNUSED_ARG(delta);
 }
 
 void
-Blocker::draw_offset(int x, int y, float /*s*/)
+Blocker::draw_offset(int x, int y, float s)
 {
   sprite.put_screen (pingu->pos + CL_Vector(x, y));
+  UNUSED_ARG(s);
 }
 
 bool

Index: blocker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- blocker.hxx 2 Jul 2002 13:36:06 -0000       1.5
+++ blocker.hxx 23 Aug 2002 15:49:53 -0000      1.6
@@ -36,7 +36,7 @@
   ///
   void  init();
   std::string get_name () const { return "Blocker"; }
-  ActionName get_type() const { return Pingus::Actions::Blocker; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Blocker; }
  
   void  update(float delta);
   void  draw_offset(int, int, float s);
@@ -45,6 +45,10 @@
   bool  need_catch();
   ///
   void  catch_pingu(Pingu* pingu);
+  
+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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- boarder.cxx 28 Jun 2002 15:12:22 -0000      1.3
+++ boarder.cxx 23 Aug 2002 15:49:53 -0000      1.4
@@ -69,7 +69,7 @@
 
                      pingu->apply_force (CL_Vector(speed * pingu->direction * 
0.5,
                                            -speed * abs(pingu->direction) * 
0.5));
-              pingu->set_action(Walker);
+              pingu->set_action(Pingus::Actions::Walker);
               return;
            }
        }
@@ -77,15 +77,16 @@
   else
     {
       pingu->apply_force (CL_Vector(speed * pingu->direction, 0));
-      pingu->set_action(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
 }
 
 void   
-Boarder::draw_offset(int x_of, int y_of, float /*s*/)
+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

Index: boarder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- boarder.hxx 28 Jun 2002 15:12:22 -0000      1.5
+++ boarder.hxx 23 Aug 2002 15:49:53 -0000      1.6
@@ -35,12 +35,18 @@
 public:
   Boarder ();
   void  init();
+  
   std::string get_name() const { return "Boarder"; }
-  ActionName get_type() const { return Pingus::Actions::Boarder; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Boarder; }
+  
   void  update(float delta);
   void  draw_offset(int, int, float s);
+  
 private:
   bool on_ground ();
+  
+  Boarder (const Boarder&); 
+  Boarder operator= (const Boarder&); 
 };
 
 #endif

Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bomber.hxx  22 Aug 2002 10:21:29 -0000      1.7
+++ bomber.hxx  23 Aug 2002 15:49:53 -0000      1.8
@@ -45,13 +45,17 @@
   
   void   init(void);
   std::string get_name () const { return "Bomber"; }
-  ActionName get_type() const { return Pingus::Actions::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*);
+  
+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.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bridger.cxx 9 Aug 2002 22:02:14 -0000       1.9
+++ bridger.cxx 23 Aug 2002 15:49:53 -0000      1.10
@@ -133,7 +133,7 @@
       else // We reached a wall...
         {
           pingu->direction.change ();
-          pingu->set_action (Walker);
+          pingu->set_action (Pingus::Actions::Walker);
           pingu->pos = last_pos;
           return;
         }
@@ -159,7 +159,7 @@
         }
       else // Out of bricks
        {
-         pingu->set_action(Waiter);
+         pingu->set_action(Pingus::Actions::Waiter);
        }     
     }
 

Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bridger.hxx 28 Jun 2002 15:12:22 -0000      1.7
+++ bridger.hxx 23 Aug 2002 15:49:53 -0000      1.8
@@ -54,7 +54,7 @@
 
   void   init();
   std::string get_name () const;
-  ActionName get_type() const { return Pingus::Actions::Bridger; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Bridger; }
   void   update(float delta);
   void   update_build (float delta);
   void   update_walk (float delta);
@@ -62,6 +62,10 @@
   bool   way_is_free();
   void   place_a_brick();
   void   walk_one_step_up();
+  
+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.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- climber.cxx 28 Jun 2002 15:12:22 -0000      1.5
+++ climber.cxx 23 Aug 2002 15:49:53 -0000      1.6
@@ -84,21 +84,22 @@
             }
 
           // Finish climbing.
-         pingu->set_action(Walker);
+         pingu->set_action(Pingus::Actions::Walker);
        }
     }
   else 
     {
       //    std::cout << "Climber failed, falling down" << std::endl;
       pingu->direction.change();
-      pingu->set_action(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
 }
 
 void
-Climber::draw_offset(int x, int y, float /*s*/)
+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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- climber.hxx 28 Jun 2002 15:12:22 -0000      1.4
+++ climber.hxx 23 Aug 2002 15:49:53 -0000      1.5
@@ -33,11 +33,15 @@
   Climber();
   void   init();
   std::string get_name () const { return "Climber"; }
-  ActionName get_type() const { return Pingus::Actions::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'; }
+  
+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.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- digger.cxx  4 Aug 2002 12:56:11 -0000       1.7
+++ digger.cxx  23 Aug 2002 15:49:53 -0000      1.8
@@ -61,7 +61,7 @@
   if (!have_something_to_dig())
     { 
       dig ();
-      pingu->set_action(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
 }
 

Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- digger.hxx  28 Jun 2002 15:12:22 -0000      1.4
+++ digger.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -36,11 +36,15 @@
 
   void init(void);
   std::string get_name () const { return "Digger"; }
-  ActionName get_type() const { return Pingus::Actions::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&);
 };
 
 #endif

Index: drown.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- drown.hxx   28 Jun 2002 15:12:22 -0000      1.4
+++ drown.hxx   23 Aug 2002 15:49:53 -0000      1.5
@@ -27,13 +27,19 @@
 {
 private:
   Sprite sprite;
+  
 public:
+  Drown () { }
   void init();
   std::string get_name() const { return "Drown"; }
-  ActionName get_type() const { return Pingus::Actions::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; }
+  
+private:
+  Drown (const Drown&);
+  Drown operator= (const Drown&);
 };
 
 #endif

Index: exiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- exiter.hxx  28 Jun 2002 15:12:22 -0000      1.4
+++ exiter.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -28,12 +28,18 @@
 {
 private:
   Sprite sprite;
+  
 public:
+  Exiter () { }
   void init(void);
   std::string get_name () const { return "Exiter"; }
-  ActionName get_type() const { return Pingus::Actions::Exiter; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Exiter; }
   void update(float delta);
   void draw_offset(int x, int y, float s);
+  
+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.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- faller.cxx  13 Aug 2002 18:44:50 -0000      1.14
+++ faller.cxx  23 Aug 2002 15:49:53 -0000      1.15
@@ -54,7 +54,7 @@
   // Pingu stands on ground
   if (rel_getpixel(0, -1) !=  GroundpieceData::GP_NOTHING)
     { 
-      pingu->set_action (Walker);
+      pingu->set_action (Pingus::Actions::Walker);
       return;
     }
 
@@ -119,7 +119,7 @@
     {
       if (rel_getpixel(0, 0) == GroundpieceData::GP_WATER)
        {
-         pingu->set_action(Drown);
+         pingu->set_action(Pingus::Actions::Drown);
          return;
        }
       else
@@ -127,7 +127,7 @@
          // Did we stop too fast?
          if (fabs(pingu->velocity.y) > deadly_velocity) 
            {
-             pingu->set_action(Splashed);
+             pingu->set_action(Pingus::Actions::Splashed);
              return;
            }
          else if (fabs(pingu->velocity.x) > deadly_velocity)
@@ -174,7 +174,7 @@
 bool
 Faller::change_allowed (ActionName new_action)
 {
-  if (new_action == Floater)
+  if (new_action == Pingus::Actions::Floater)
     return true;
   else
     return false;

Index: faller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- faller.hxx  13 Aug 2002 18:44:50 -0000      1.9
+++ faller.hxx  23 Aug 2002 15:49:53 -0000      1.10
@@ -42,11 +42,15 @@
   void  update(float delta);
   void  draw_offset(int x, int y, float s);
 
-  bool change_allowed (ActionName new_action);
+  bool change_allowed (Pingus::Actions::ActionName new_action);
   
   std::string get_name() const { return "Faller"; }
-  ActionName get_type() const { return Pingus::Actions::Faller; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Faller; }
   bool is_tumbling () const;
+  
+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.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- floater.cxx 14 Aug 2002 12:45:02 -0000      1.9
+++ floater.cxx 23 Aug 2002 15:49:53 -0000      1.10
@@ -47,14 +47,15 @@
       step = 0;
     }
   } else {
-    pingu->set_action (Walker);
+    pingu->set_action (Pingus::Actions::Walker);
   }
 }
 
 void 
-Floater::draw_offset (int x, int y, float /*s*/)
+Floater::draw_offset (int x, int y, float s)
 {
   sprite.put_screen (pingu->pos + CL_Vector (x, y));
+  UNUSED_ARG(s);
 }
 
 bool

Index: floater.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- floater.hxx 2 Jul 2002 16:06:51 -0000       1.6
+++ floater.hxx 23 Aug 2002 15:49:53 -0000      1.7
@@ -35,13 +35,17 @@
   Floater();
 
   std::string get_name() const { return "Floater"; }
-  ActionName get_type() const { return Pingus::Actions::Faller; }
+  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 (ActionName new_action);
+  bool change_allowed (Pingus::Actions::ActionName new_action);
+  
+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.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- jumper.cxx  2 Jul 2002 13:36:06 -0000       1.5
+++ jumper.cxx  23 Aug 2002 15:49:53 -0000      1.6
@@ -34,14 +34,15 @@
 }
 
 void 
-Jumper::draw_offset(int x, int y, float /*s*/)
+Jumper::draw_offset(int x, int y, float s)
 {
   // FIXME: Huh! Does this work?!
   sprite.put_screen (x, y);
+  UNUSED_ARG(s);
 }
 
 void
-Jumper::update(float /*delta*/)
+Jumper::update(float delta)
 {
   if (pingu->direction.is_right()) {
     pingu->velocity += CL_Vector(10.0, -10.0);
@@ -52,7 +53,8 @@
   // Move the pingu in the air, so that it can start 'falling'
   pingu->pos.y -= 1;
 
-  pingu->set_action (Faller);
+  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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- jumper.hxx  28 Jun 2002 15:12:22 -0000      1.4
+++ jumper.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -33,9 +33,13 @@
 
   void  init(void);
   std::string get_name() const { return "Jumper"; }
-  ActionName get_type() const { return Pingus::Actions::Jumper; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Jumper; }
   void  update(float delta);
   void  draw_offset(int x, int y, float s);
+  
+private:
+  Jumper (const Jumper&);
+  Jumper operator= (const Jumper&);
 };
 
 #endif

Index: laser_kill.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- laser_kill.hxx      28 Jun 2002 15:12:22 -0000      1.4
+++ laser_kill.hxx      23 Aug 2002 15:49:53 -0000      1.5
@@ -30,13 +30,17 @@
   Sprite sprite;
 public:
   ///
-  LaserKill();
-  std::string get_name() const { return "LaserKill"; }
-  ActionName get_type() const { return Pingus::Actions::Laserkill; }
-  void init(void);
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
+  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; }
+  
+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.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- miner.cxx   28 Jun 2002 15:12:22 -0000      1.5
+++ miner.cxx   23 Aug 2002 15:49:53 -0000      1.6
@@ -75,7 +75,7 @@
       pingu->get_world()->get_gfx_map()->remove(miner_radius_gfx,
                                                pingu->get_x () - 16 + 
pingu->direction, 
                                                pingu->get_y () - 29);
-      pingu->set_action(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
   else if (rel_getpixel(0, -1) ==  GroundpieceData::GP_SOLID)
     {
@@ -84,14 +84,15 @@
                                               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(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
 }
 
 void 
-Miner::draw_offset(int x, int y, float /*s*/)
+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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- miner.hxx   28 Jun 2002 15:12:22 -0000      1.4
+++ miner.hxx   23 Aug 2002 15:49:53 -0000      1.5
@@ -23,7 +23,6 @@
 #include "../pingu_action.hxx"
 #include "../sprite.hxx"
 
-///
 class Miner : public PinguAction
 {
 private:  
@@ -32,15 +31,18 @@
   Sprite sprite;
   int slow_count;
 public:
-  ///
-  Miner();
+  Miner ();
   virtual ~Miner () {}
 
-  void init(void);
-  std::string get_name() const { return "Miner"; }
-  ActionName get_type() const { return Pingus::Actions::Miner; }
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
+  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);
+  
+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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rocket_launcher.cxx 2 Jul 2002 13:36:06 -0000       1.3
+++ rocket_launcher.cxx 23 Aug 2002 15:49:53 -0000      1.4
@@ -45,20 +45,22 @@
 {
   if (sprite.finished ())
     {
-      pingu->set_action(Walker);
+      pingu->set_action(Pingus::Actions::Walker);
     }
 
   sprite.update (delta);
 }
 
 void
-RocketLauncher::draw_offset(int x, int y, float /*s*/)
+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);
 }
 
 /* EOF */

Index: rocket_launcher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rocket_launcher.hxx 28 Jun 2002 15:12:22 -0000      1.4
+++ rocket_launcher.hxx 23 Aug 2002 15:49:53 -0000      1.5
@@ -23,8 +23,7 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-class RocketLauncher
-  : public PinguAction
+class RocketLauncher : public PinguAction
 {
 private:
   Sprite sprite;
@@ -33,11 +32,17 @@
   RocketLauncher () {}
   ~RocketLauncher () {}
 
-  void  init();
-  std::string get_name() const { return "RocketLauncher"; }
-  ActionName get_type() const { return Pingus::Actions::Rocketlauncher; }
-  void  update(float delta);
-  void  draw_offset(int, int, float s);
+  void  init ();
+  
+  std::string get_name () const { return "RocketLauncher"; }
+  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Rocketlauncher; }
+  
+  void update (float delta);
+  void draw_offset (int, int, float s);
+  
+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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- slider.cxx  28 Jun 2002 15:12:22 -0000      1.3
+++ slider.cxx  23 Aug 2002 15:49:53 -0000      1.4
@@ -59,19 +59,20 @@
            pingu->velocity += CL_Vector(-speed, 0.0);
          }
 
-         pingu->set_action(Walker);
+         pingu->set_action(Pingus::Actions::Walker);
        }
     }
 
   speed -= 7 * delta;
   if (speed < 1)
-    pingu->set_action(Walker);
+    pingu->set_action(Pingus::Actions::Walker);
 }
 
 void
-Slider::draw_offset(int x, int y, float /*s*/)
+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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- slider.hxx  28 Jun 2002 15:12:22 -0000      1.4
+++ slider.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -33,9 +33,13 @@
 
   void  init(void);
   std::string get_name() const { return "Slider"; }
-  ActionName get_type() const { return Pingus::Actions::Slider; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::Slider; }
   void  update(float delta);
   void  draw_offset(int x, int y, float s);
+  
+private:
+  Slider (const Slider&);
+  Slider operator= (const Slider&);
 };
 
 #endif

Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smashed.hxx 28 Jun 2002 15:12:23 -0000      1.4
+++ smashed.hxx 23 Aug 2002 15:49:53 -0000      1.5
@@ -23,20 +23,25 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
 class Smashed : public PinguAction
 {
 private:
   bool particle_thrown;
   bool sound_played;
   Sprite sprite;
+  
 public:
-  void   init(void);
-  std::string get_name() const { return "Smashed"; }
-  ActionName get_type() const { return Pingus::Actions::Smashed; }
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
+  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; }
+  
+private:
+  Smashed (const Smashed&);
+  Smashed operator= (const Smashed&);
 };
 
 #endif

Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- splashed.hxx        28 Jun 2002 15:12:23 -0000      1.4
+++ splashed.hxx        23 Aug 2002 15:49:53 -0000      1.5
@@ -23,7 +23,6 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
 class Splashed : public PinguAction
 {
 private:
@@ -31,15 +30,19 @@
   bool sound_played;
   Sprite sprite;
 public:
-  ///
   Splashed();
+  void init (void);
   
-  void   init(void);
-  std::string get_name() const { return "Splashed"; }
-  ActionName get_type() const { return Pingus::Actions::Splashed; }
-  void update(float delta);
-  void draw_offset(int x, int y, float s);
+  std::string get_name () const { return "Splashed"; }
+  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Splashed; }
+  
+  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&);
 };
 
 #endif

Index: superman.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- superman.hxx        2 Jul 2002 13:36:06 -0000       1.5
+++ superman.hxx        23 Aug 2002 15:49:53 -0000      1.6
@@ -29,14 +29,19 @@
   double counter;
   double x_pos;
   Sprite sprite;
+  
 public:
   Superman ();
-  void  init();
-  std::string get_name() const { return "Superman"; }
-  ActionName get_type() const { return Pingus::Actions::Superman; }
-  void  update(float delta);
-  void  draw_offset(int, int, float s);
+  void init ();
+  std::string get_name () const { return "Superman"; }
+  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Superman; }
+  
+  void update (float delta);
+  void draw_offset (int, int, float s);
 
+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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- teleported.cxx      28 Jun 2002 15:12:23 -0000      1.3
+++ teleported.cxx      23 Aug 2002 15:49:53 -0000      1.4
@@ -20,7 +20,7 @@
 #include "../pingu.hxx"
 #include "teleported.hxx"
 
-Teleported::Teleported(void)
+Teleported::Teleported(void) : sound_played(false)
 {
 }
 
@@ -28,14 +28,14 @@
 Teleported::init(void)
 {
   sprite = Sprite ("Pingus/bomber0", "pingus");
-  sound_played = false;
 }
 
 
 void 
-Teleported::draw_offset(int x, int y, float /*s*/)
+Teleported::draw_offset(int x, int y, float s)
 {
   sprite.put_screen (x, y);
+  UNUSED_ARG(s);
 }
 
 
@@ -44,7 +44,7 @@
 {
   pingu->set_pos (x_target, y_target);
   pingu->set_status(PS_ALIVE);
-  pingu->set_action(Walker);
+  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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- teleported.hxx      28 Jun 2002 15:12:23 -0000      1.4
+++ teleported.hxx      23 Aug 2002 15:49:53 -0000      1.5
@@ -21,24 +21,27 @@
 #include "../sprite.hxx"
 #include "../pingu_action.hxx"
 
-///
 class Teleported : public PinguAction
 {
 private:
-  bool particle_thrown;
+  //bool particle_thrown;
   bool sound_played;
   Sprite sprite;
 public:
   Teleported();
 
   std::string get_name() const { return "Teleported"; }
-  ActionName get_type() const { return Pingus::Actions::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; }
 
   int x_target, y_target; // <- FIXME: Ugly!
+  
+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.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- waiter.cxx  28 Jun 2002 15:12:23 -0000      1.2
+++ waiter.cxx  23 Aug 2002 15:49:53 -0000      1.3
@@ -31,7 +31,7 @@
   sprite.update (delta);
   
   if (countdown < 0)
-    pingu->set_action(Walker);
+    pingu->set_action(Pingus::Actions::Walker);
   
   countdown -= delta;
 }

Index: waiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- waiter.hxx  28 Jun 2002 15:12:23 -0000      1.4
+++ waiter.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -32,14 +32,18 @@
   float countdown;
   Sprite sprite;
 public:
-  ///
   Waiter();
-  /// 
   void init();
+  
   std::string get_name() const { return "Waiter"; }
-  ActionName get_type() const { return Pingus::Actions::Waiter; }
+  Pingus::Actions::ActionName get_type() const { return 
Pingus::Actions::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.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- walker.cxx  4 Aug 2002 12:56:11 -0000       1.15
+++ walker.cxx  23 Aug 2002 15:49:53 -0000      1.16
@@ -24,8 +24,6 @@
 #include "../debug.hxx"
 #include "walker.hxx"
 
-const int Walker::max_steps=5;
-
 void
 Walker::init(void)
 {
@@ -62,7 +60,7 @@
 
   if (rel_getpixel(0, -1) ==  GroundpieceData::GP_WATER)
     {
-      pingu->set_action (Drown);
+      pingu->set_action (Pingus::Actions::Drown);
       return;
     }
 
@@ -89,7 +87,7 @@
        }
       else
        {
-         pingu->set_action (Faller);
+         pingu->set_action (Pingus::Actions::Faller);
          return;
        }
     }
@@ -158,7 +156,7 @@
              // We take the step, so that we are in the air
              pingu->pos.x += pingu->direction;
              // We reached a cliff
-             pingu->set_action (Faller);
+             pingu->set_action (Pingus::Actions::Faller);
              return;
            }
        }

Index: walker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- walker.hxx  28 Jun 2002 15:12:23 -0000      1.4
+++ walker.hxx  23 Aug 2002 15:49:53 -0000      1.5
@@ -28,16 +28,21 @@
 private:
   Sprite walker; 
 
-  static const int max_steps; // max nr. of pixels that pingu can walk up/down
+  enum { max_steps = 5 }; // max nr. of pixels that pingu can walk up/down
 
 public:
-  void  init(void);
+  Walker () { }
+  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);
 
-  std::string get_name() const { return "Walker"; }
-  ActionName get_type() const { return Pingus::Actions::Walker; }
+  std::string get_name () const { return "Walker"; }
+  Pingus::Actions::ActionName get_type () const { return 
Pingus::Actions::Walker; }
+  
+private:
+  Walker (const Walker&);
+  Walker operator= (const Walker&);
 };
 
 #endif





reply via email to

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