fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / gui / mousecursor.cpp
index 8b774f7..b2010c5 100644 (file)
@@ -1,7 +1,7 @@
 //  $Id$
 //
-//  SuperTux -  A Jump'n Run
-//  Copyright (C) 2004 Ricardo Cruz <rick2@aeiou.pt>
+//  SuperTux
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
 #include <config.h>
 
-#include "video/drawing_context.h"
-#include "gui/mousecursor.h"
-#include "main.h"
+#include "video/drawing_context.hpp"
+#include "gui/mousecursor.hpp"
+#include "main.hpp"
 
 MouseCursor* MouseCursor::current_ = 0;
 extern SDL_Surface* screen;
 
 MouseCursor::MouseCursor(std::string cursor_file) : mid_x(0), mid_y(0)
 {
-  cursor = new Surface(cursor_file, true);
-  
+  cursor = new Surface(cursor_file);
+
   cur_state = MC_NORMAL;
 
   SDL_ShowCursor(SDL_DISABLE);
@@ -68,8 +69,8 @@ void MouseCursor::draw(DrawingContext& context)
   x = int(x * float(SCREEN_WIDTH)/screen->w);
   y = int(y * float(SCREEN_HEIGHT)/screen->h);
 
-  w = cursor->w;
-  h = cursor->h / MC_STATES_NB;
+  w = (int) cursor->get_width();
+  h = (int) (cursor->get_height() / MC_STATES_NB);
   if(ispressed &SDL_BUTTON(1) || ispressed &SDL_BUTTON(2)) {
     if(cur_state != MC_CLICK) {
       state_before_click = cur_state;