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 faller.cxx,1.4,1.5 faller.hxx


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions faller.cxx,1.4,1.5 faller.hxx,1.2,1.3 walker.cxx,1.4,1.5
Date: 24 Jun 2002 14:25:05 -0000

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

Modified Files:
        faller.cxx faller.hxx walker.cxx 
Log Message:
- moved some stuff in Pingu into private
- added PinguAction::change_allowed() along with the good/bad check in 
capture_rectangle

Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- faller.cxx  23 Jun 2002 19:16:41 -0000      1.4
+++ faller.cxx  24 Jun 2002 14:25:03 -0000      1.5
@@ -39,12 +39,12 @@
 void
 Faller::init(void)
 {
-  faller = Sprite("Pingus/faller" + to_string(pingu->owner_id), "pingus");
+  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->owner_id), "pingus");
+  tumbler = Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus");
   tumbler.set_align_center_bottom ();
 }
 
@@ -161,6 +161,15 @@
     {
       return false;
     }
+}
+
+bool
+Faller::change_allowed (const std::string& new_action)
+{
+  if (new_action == "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.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- faller.hxx  19 Jun 2002 15:19:26 -0000      1.2
+++ faller.hxx  24 Jun 2002 14:25:03 -0000      1.3
@@ -41,6 +41,8 @@
   
   void  update(float delta);
   void  draw_offset(int x, int y, float s);
+
+  bool change_allowed (const std::string&);
   
   PinguEnvironment get_environment() const { return ENV_ALWAYS; }
   std::string get_name() const { return "Faller"; }

Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- walker.cxx  24 Jun 2002 12:30:02 -0000      1.4
+++ walker.cxx  24 Jun 2002 14:25:03 -0000      1.5
@@ -32,7 +32,7 @@
 void
 Walker::init(void)
 {
-  walker = Sprite ("Pingus/walker" + to_string(pingu->owner_id), "pingus");
+  walker = Sprite ("Pingus/walker" + to_string(pingu->get_owner ()), "pingus");
   walker.set_align_center_bottom ();
 }
 
@@ -138,7 +138,8 @@
                {
                  if (pingu->persist[i]->get_type() & (ActionType)WALL) 
                    {
-                     pout(PINGUS_DEBUG_ACTIONS) << "Pingu: We are in front of 
a wall, setting persistant action" << std::endl;
+                     pout(PINGUS_DEBUG_ACTIONS) 
+                       << "Pingu: We are in front of a wall, setting 
persistant action" << std::endl;
                      // pingu->set_paction(pingu->persist[i]->get_name());
                      // FIXME: above fails because of Capitalised name
                      // returned from get_name(). May be we should 




reply via email to

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