Remove bogus assert
[supertux.git] / src / gui / mousecursor.hpp
index 329f225..4aaa11d 100644 (file)
 #define HEADER_SUPERTUX_GUI_MOUSECURSOR_HPP
 
 #include <string>
+#include <vector>
 
-#include "math/vector.hpp"
 #include "video/surface_ptr.hpp"
 
 #define MC_STATES_NB 3
 
-enum {
+enum MouseCursorState
+{
   MC_NORMAL = 0,
   MC_CLICK,
   MC_LINK,
@@ -32,7 +33,6 @@ enum {
 };
 
 class DrawingContext;
-class Vector;
 
 /// Mouse cursor.
 /** Used to create mouse cursors.
@@ -42,23 +42,19 @@ class Vector;
 class MouseCursor
 {
 public:
-  /// Constructor of MouseCursor.
-  /** Expects an imagefile for the cursor and  the number of animation frames it contains. */
-  MouseCursor(std::string cursor_file);
+  MouseCursor(const std::string& cursor_file,
+              const std::string& cursor_click_file,
+              const std::string& cursor_link_file);
   ~MouseCursor();
-  /// Get MouseCursor state.
-  /** (MC_NORMAL, MC_CLICK, MC_LINK or MC_HIDE) */
-  int state();
+
   /// Set MouseCursor state.
   /** (MC_NORMAL, MC_CLICK, MC_LINK or MC_HIDE) */
-  void set_state(int nstate);
+  void set_state(MouseCursorState nstate);
+
   /// Define the middle of a MouseCursor.
   /** Useful for cross mouse cursor images in example. */
   void set_mid(int x, int y);
 
-  /** Set the position where the cursor should appear */
-  void set_pos(const Vector& pos);
-
   /// Draw MouseCursor on screen.
   void draw(DrawingContext& context);
 
@@ -68,16 +64,12 @@ public:
   /// Set current cursor.
   static void set_current(MouseCursor* pcursor)
   {        current_ = pcursor;      };
-  
-  friend class Resources;
 
 private:
-  Vector mouse_pos;
-  int mid_x;
-  int mid_y;
-  int state_before_click;
-  int cur_state;
-  SurfacePtr cursor;
+  int m_mid_x;
+  int m_mid_y;
+  MouseCursorState m_state;
+  std::vector<SurfacePtr> m_cursor;
 
 private:
   static MouseCursor* current_;