pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.3,1.4 hammer.cx


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.3,1.4 hammer.cxx,1.3,1.4 laser_exit.cxx,1.3,1.4 smasher.cxx,1.4,1.5
Date: 28 Jun 2002 15:12:25 -0000

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

Modified Files:
        fake_exit.cxx hammer.cxx laser_exit.cxx smasher.cxx 
Log Message:
- changed action names from string to enum
- implemented actions slots for wall and fall case
- some cleanup


Index: fake_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/fake_exit.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fake_exit.cxx       26 Jun 2002 17:43:18 -0000      1.3
+++ fake_exit.cxx       28 Jun 2002 15:12:23 -0000      1.4
@@ -25,6 +25,8 @@
 
 #include "fake_exit.hxx"
 
+using namespace Pingus::Actions;
+
 FakeExit::FakeExit(const TrapData& data) : smashing(false)
 {
   surface = PingusResource::load_surface("Traps/fake_exit", "traps");
@@ -72,7 +74,7 @@
       }
 
       if (counter >= 3 && counter <= 5) {
-       pingu->set_action("smashed");
+       pingu->set_action(Smashed);
       }
     }
 }

Index: hammer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/hammer.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hammer.cxx  26 Jun 2002 17:43:18 -0000      1.3
+++ hammer.cxx  28 Jun 2002 15:12:23 -0000      1.4
@@ -24,6 +24,8 @@
 #include "../pingu_holder.hxx"
 #include "../pingu.hxx"
 
+using namespace Pingus::Actions;
+
 Hammer::Hammer(const TrapData& data)
 {
   pos = data.pos;
@@ -68,7 +70,7 @@
   if (counter >= (int)(surface.get_num_frames()) - 3) {
     if (pingu->get_x() > pos.x + 55 && pingu->get_x() < pos.x + 77
        && pingu->get_y() > pos.y + 146 && pingu->get_y() < pos.y + 185)
-      pingu->set_action("smashed");
+      pingu->set_action(Smashed);
   }
 }
 

Index: laser_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/laser_exit.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- laser_exit.cxx      26 Jun 2002 17:43:18 -0000      1.3
+++ laser_exit.cxx      28 Jun 2002 15:12:23 -0000      1.4
@@ -77,7 +77,7 @@
          if (!(pingu->get_action() && pingu->get_action()->get_name() == 
"LaserKill")) 
            {
              killing = true;
-             pingu->set_action("laserkill");
+             pingu->set_action(Laserkill);
            }
        }
     }

Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/traps/smasher.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smasher.cxx 26 Jun 2002 17:43:18 -0000      1.4
+++ smasher.cxx 28 Jun 2002 15:12:23 -0000      1.5
@@ -29,6 +29,8 @@
 #include "../pingu_action_factory.hxx"
 #include "../pingu.hxx"
 
+using namespace Pingus::Actions;
+
 Smasher::Smasher(const TrapData& data) : smashing(false), downwards(false), 
count(0)
 {
   pos = data.pos;
@@ -70,7 +72,7 @@
                  if ((*pingu)->is_inside (int(pos.x + 30), int(pos.y + 90),
                                           int(pos.x + 250), int(pos.y + 190)))
                    {
-                     (*pingu)->set_action ("splashed");
+                     (*pingu)->set_action (Splashed);
                    }
                }
            }




reply via email to

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