- moved loadshared() to the right point
[supertux.git] / src / mousecursor.cpp
index 0d5f829..f7a5993 100644 (file)
@@ -21,8 +21,8 @@ MouseCursor::MouseCursor(std::string cursor_file, int frames)
   cur_frame = 0;
   tot_frames = frames;
 
-  timer_init(&timer, false);
-  timer_start(&timer,MC_FRAME_PERIOD);
+  timer.init(false);
+  timer.start(MC_FRAME_PERIOD);
 
   SDL_ShowCursor(SDL_DISABLE);
 }
@@ -64,13 +64,13 @@ void MouseCursor::draw()
         cur_state = state_before_click;
     }
 
-  if(timer_get_left(&timer) < 0 && tot_frames > 1)
+  if(timer.get_left() < 0 && tot_frames > 1)
     {
       cur_frame++;
       if(cur_frame++ >= tot_frames)
         cur_frame = 0;
 
-      timer_start(&timer,MC_FRAME_PERIOD);
+      timer.start(MC_FRAME_PERIOD);
     }
 
   texture_draw_part(&cursor, w*cur_frame, h*cur_state , x, y, w, h);