pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/input inverted_axis.cxx,1.1,1.2 inver


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/input inverted_axis.cxx,1.1,1.2 inverted_axis.hxx,1.1,1.2
Date: 5 Jul 2002 10:06:22 -0000

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

Modified Files:
        inverted_axis.cxx inverted_axis.hxx 
Log Message:
cache modified angle


Index: inverted_axis.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/inverted_axis.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- inverted_axis.cxx   5 Jul 2002 09:59:20 -0000       1.1
+++ inverted_axis.cxx   5 Jul 2002 10:06:20 -0000       1.2
@@ -21,8 +21,10 @@
 
 namespace Input
 {
-  InvertedAxis::InvertedAxis(Axis* axis_) : axis(axis_) { }
-
+  InvertedAxis::InvertedAxis(Axis* axis_) : axis(axis_)
+  {
+    angle = (static_cast<int>(axis->get_angle()) + 180) % 360;
+  }
 
   float
   InvertedAxis::get_pos ()
@@ -33,7 +35,7 @@
   float
   InvertedAxis::get_angle ()
   {
-    return (static_cast<int>(axis->get_angle()) + 180) % 360;
+    return angle;
   }
   
   void

Index: inverted_axis.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/inverted_axis.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- inverted_axis.hxx   5 Jul 2002 09:59:21 -0000       1.1
+++ inverted_axis.hxx   5 Jul 2002 10:06:20 -0000       1.2
@@ -28,9 +28,9 @@
 
   private:
     Axis* axis;
+    float angle;
     
   public:
-  
     InvertedAxis(Axis* axis_);
   
     virtual float get_pos ();




reply via email to

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