pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src math.hxx,1.4,1.5 pingu_action.cxx,1.2


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src math.hxx,1.4,1.5 pingu_action.cxx,1.20,1.21 sprite.cxx,1.10,1.11 sprite.hxx,1.8,1.9
Date: 26 Nov 2002 21:30:39 -0000

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

Modified Files:
        math.hxx pingu_action.cxx sprite.cxx sprite.hxx 
Log Message:
- added direction handling for sprite on worldmap


Index: math.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/math.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- math.hxx    11 Sep 2002 12:45:57 -0000      1.4
+++ math.hxx    26 Nov 2002 21:30:37 -0000      1.5
@@ -29,6 +29,9 @@
     @brief A collection of mathematical helper functions */
 namespace Math {
 
+const double pi   = 3.14159265358979323846;    /* pi */
+const double pi_2 = 1.57079632679489661923;    /* pi/2 */
+
 template<class T> 
 T min (const T& a, const T& b) 
 {

Index: pingu_action.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- pingu_action.cxx    26 Nov 2002 18:55:27 -0000      1.20
+++ pingu_action.cxx    26 Nov 2002 21:30:37 -0000      1.21
@@ -109,7 +109,7 @@
   // Apply gravity
   pingu->set_velocity(pingu->get_velocity() + Vector(0.0f, 1.0f));
 
-#if 0
+#if 0 // New Code
   Vector pos        = pingu->get_pos();
   Vector target_pos = pos + pingu->get_velocity();
   Vector dir        = target_pos - pingu->get_pos();
@@ -153,7 +153,7 @@
           return;
         }
     }
-#else
+#else // Old Code
     
   // FIXME: What does this variable do?
   Vector resultant_force = pingu->get_velocity();

Index: sprite.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sprite.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sprite.cxx  14 Oct 2002 11:15:15 -0000      1.10
+++ sprite.cxx  26 Nov 2002 21:30:37 -0000      1.11
@@ -283,6 +283,12 @@
   return sur;
 }
 
+void
+Sprite::set_frame (int n)
+{
+  frame = n;
+}
+
 /* EOF */
 
 

Index: sprite.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sprite.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sprite.hxx  1 Oct 2002 19:53:44 -0000       1.8
+++ sprite.hxx  26 Nov 2002 21:30:37 -0000      1.9
@@ -141,6 +141,9 @@
       position */
   void reset ();
 
+  /** Set the sprite to the n'th frame */
+  void set_frame (int n);
+
   /// @return the surface which is used internally
   CL_Surface& get_surface ();
 };





reply via email to

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