src/interface/cursor.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *  Wormux is a convivial mass murder game.
00003  *  Copyright (C) 2001-2004 Lawrence Azzoug.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00018  ******************************************************************************
00019  * Arrow on top of the active character
00020  *****************************************************************************/
00021 
00022 #ifndef CURSOR_H
00023 #define CURSOR_H
00024 //-----------------------------------------------------------------------------
00025 #include "../graphic/sprite.h"
00026 #include "../object/physical_obj.h"
00027 #include "../include/base.h"
00028 //-----------------------------------------------------------------------------
00029 
00030 class CharacterCursor
00031 {
00032 public:
00033    Sprite *image;
00034 
00035 private:
00036   uint time_begin_anim;
00037   uint last_update;
00038   PhysicalObj *obj_designe;
00039   int dy;
00040   bool actif;
00041   bool want_hide;
00042 
00043   static CharacterCursor * singleton;
00044 
00045 public:
00046   static CharacterCursor * GetInstance();
00047 
00048   void Reset();
00049   void Draw();
00050   void Refresh();
00051 
00052   // Pointe un objet
00053   void PointeObj (PhysicalObj *obj);
00054 
00055   // Pointe un objet
00056   void FollowActiveCharacter ();
00057 
00058   // Hide the cursor
00059   void Hide();
00060 
00061   
00062 
00063 private:
00064   CharacterCursor();
00065   ~CharacterCursor();
00066 
00067   bool IsDisplayed() const;
00068 };
00069 
00070 //-----------------------------------------------------------------------------
00071 #endif

Generated on Mon Jan 1 13:10:57 2007 for Wormux by  doxygen 1.4.7