Update.
[universe.git] / manipulator.h
index 0b8c0a1..cd44a6d 100644 (file)
@@ -12,6 +12,7 @@
 
 class Manipulator : public Map {
   static const int sqsize = 16;
+
   Polygon *_touching_polygon, *_current_polygon;
   scalar_t _grab_relative_x, _grab_relative_y;
   scalar_t _xmax, _ymax;
@@ -19,15 +20,24 @@ class Manipulator : public Map {
   scalar_t _force_x, _force_y;
   bool _grab, _release;
   int _current_action;
+
   enum { FEEL_TOUCHING_OBJECT, FEEL_GRABBING_OBJECT, NB_DISCRETE_PARAMETERS };
+
   enum { MAP_LOCATION_X, MAP_LOCATION_Y, MAP_RESISTANCE_X, MAP_RESISTANCE_Y, NB_CONTINUOUS_MAPS };
+
   static const int continuous_map_size = 25;
+
   scalar_t _kernel_continuous_maps[continuous_map_size * 2 + 1];
+
 public:
-  enum { ACTION_IDLE,
-         ACTION_MOVE_UP, ACTION_MOVE_RIGHT, ACTION_MOVE_DOWN, ACTION_MOVE_LEFT,
-         ACTION_GRAB, ACTION_RELEASE,
-         NB_ACTIONS };
+
+  enum {
+    ACTION_IDLE,
+    ACTION_MOVE_UP, ACTION_MOVE_RIGHT, ACTION_MOVE_DOWN, ACTION_MOVE_LEFT,
+    ACTION_GRAB, ACTION_RELEASE,
+    NB_ACTIONS
+  };
+
   Manipulator(Task *task);
 
   inline scalar_t hand_x() { return _hand_x; }
@@ -47,7 +57,7 @@ public:
 
   int random_action();
 
-//   void force_grab(Universe *universe, scalar_t x, scalar_t y);
+  //   void force_grab(Universe *universe, scalar_t x, scalar_t y);
   void force_move(scalar_t x, scalar_t y);
   void force_release();
 };