Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Grid.h

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef _GRID_H 00024 #define _GRID_H 00025 00026 #include <events/Facing.h> 00027 #include <events/Position.h> 00028 00029 00030 class Grid 00031 { 00032 public: 00033 Grid(); 00034 ~Grid(); 00035 00036 void ReCalculate(); 00037 00038 void SetSize(int,int); 00039 void SetBase(int); 00040 void SetDirection(Event::Facing *); 00041 void SetPosition(Event::Position *); 00042 00043 int GetBase(); 00044 int GetWidth(); 00045 int GetHeight(); 00046 void GetXY(int x,int y,int *cx,int *cy,int *elevation); 00047 int GetHBase(); 00048 double Sin(int); 00049 00050 private: 00051 int m_x; // xmax 00052 int m_y; // ymax 00053 int m_base; // sida 00054 int m_hbase; 00055 int m_left; // first x coordinates outside screen 00056 int m_right; 00057 int m_top; // first y coordinates outside screen 00058 int m_bottom; 00059 int m_w; 00060 int m_h; 00061 double m_sin[360]; 00062 int m_riktning; // 0..5 00063 int m_xpos; // 0.. 00064 int m_ypos; // 0.. 00065 }; 00066 00067 00068 #endif // _GRID_H

Generated for SDL C++ GUI by doxygen 1.3.6