Main Page | Class List | File List | Class Members | Related Pages

town.h

00001 /***************************************************************************
00002                            town.h
00003                            -------------------
00004     begin                : 2004-04-25
00005     copyright            : (C) 2004-2005 by Michael Menne
00006     email                : menne@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  This program is free software; you can redistribute it and/or
00011  modify it under the terms of the GNU General Public License
00012  as published by the Free Software Foundation; either version 2
00013  of the License, or (at your option) any later version.
00014 
00015  This program is distributed in the hope that it will be useful,
00016  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  GNU General Public License for more details.
00019 
00020  You should have received a copy of the GNU General Public License
00021  along with this program; if not, write to the Free Software
00022  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023  ***************************************************************************/
00024 
00025 #ifndef TOWN_H
00026 #define TOWN_H
00027 
00028 #include "global.h"
00029 
00030 namespace WDS
00031 {
00032 
00033 // Forward declarations
00034 class CGLCanvas;
00035 
00045 class CTown
00046 {
00047 public:
00048     CTown();
00049     virtual ~CTown();
00050 
00051     void SetName( wxString strName, wxString strOwner, wxString strGuild );
00052     void SetPos( int x, int y );
00053     void Draw( const Rect *pScreen );
00054 
00055     Rect* GetRect() { return &m_rcRect; }
00056 
00057     wxString GetName()  { return m_strName;  }
00058     wxString GetGuild() { return m_strGuild; }
00059     wxString GetOwner() { return m_strOwner; }
00060     int      GetXPos()  { return m_ptPos.x;  }
00061     int      GetYPos()  { return m_ptPos.y;  }
00062 
00063     void SetSight(int sight);
00064 
00065 protected:
00066     void CalcRect();
00067 
00068     CGLCanvas* GetGLCanvas();
00069 
00070     wxPoint  m_ptPos;       // x, y as int
00071     wxString m_strName;
00072     wxString m_strOwner;
00073     wxString m_strGuild;
00074     wxString m_strComplete;
00075 
00076     int      m_nSight;      // Sichtradius, default = 0
00077 
00078     Rect m_rcRect;
00079 
00080 };
00081 
00082 }
00083 
00084 #endif // TOWN_H
00085 
00086 // kate: space-indent off; tab-width 4; replace-tabs off;

Generated on Sun Jan 16 18:20:26 2005 for WDSMap by  doxygen 1.3.9.1