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

Map Class Reference

#include <Map.h>

List of all members.

Public Member Functions

 Map ()
 ~Map ()
void Populate (Event::Map *)
unsigned char Get_h (long x, long y)
unsigned char Get_t_left (long x, long y)
unsigned char Get_t_up (long x, long y)

Private Attributes

unsigned char m_h [MAPSIZE *MAPSIZE]
unsigned char m_terrain_left [MAPSIZE *MAPSIZE]
unsigned char m_terrain_up [MAPSIZE *MAPSIZE]


Detailed Description

File ......... Map.h Published .... 2005-02-07 Author ....... grymse@alhem.net

Definition at line 29 of file Map.h.


Constructor & Destructor Documentation

Map::Map  ) 
 

File ......... Map.cpp Published .... 2005-02-07 Author ....... grymse@alhem.net

Definition at line 31 of file Map.cpp.

References m_h, m_terrain_left, and m_terrain_up.

00032 { 00033 memset(m_h, 0, MAPSIZE * MAPSIZE); 00034 memset(m_terrain_left, 0, MAPSIZE * MAPSIZE); 00035 memset(m_terrain_up, 0, MAPSIZE * MAPSIZE); 00036 }

Map::~Map  ) 
 

Definition at line 39 of file Map.cpp.

00040 { 00041 }


Member Function Documentation

unsigned char Map::Get_h long  x,
long  y
 

Definition at line 54 of file Map.cpp.

References Get_h(), and m_h.

Referenced by Get_h(), and Populate().

00055 { 00056 int index = (y % MAPSIZE) * MAPSIZE + (x % MAPSIZE); 00057 return m_h[index]; 00058 }

unsigned char Map::Get_t_left long  x,
long  y
 

Definition at line 61 of file Map.cpp.

References Get_t_left(), and m_terrain_left.

Referenced by Get_t_left(), and Populate().

00062 { 00063 int index = (y % MAPSIZE) * MAPSIZE + (x % MAPSIZE); 00064 return m_terrain_left[index]; 00065 }

unsigned char Map::Get_t_up long  x,
long  y
 

Definition at line 68 of file Map.cpp.

References Get_t_up(), and m_terrain_up.

Referenced by Get_t_up(), and Populate().

00069 { 00070 int index = (y % MAPSIZE) * MAPSIZE + (x % MAPSIZE); 00071 return m_terrain_up[index]; 00072 }

void Map::Populate Event::Map *   ) 
 

Definition at line 44 of file Map.cpp.

References Get_h(), Get_t_left(), Get_t_up(), m_h, m_terrain_left, m_terrain_up, and Populate().

Referenced by Populate().

00045 { 00046 size_t l = MAPSIZE * MAPSIZE; 00047 00048 memmove(m_h, pclMap -> Get_h(), l); 00049 memmove(m_terrain_left, pclMap -> Get_t_left(), l); 00050 memmove(m_terrain_up, pclMap -> Get_t_up(), l); 00051 }


Member Data Documentation

unsigned char Map::m_h[MAPSIZE *MAPSIZE] [private]
 

Definition at line 42 of file Map.h.

Referenced by Get_h(), Map(), and Populate().

unsigned char Map::m_terrain_left[MAPSIZE *MAPSIZE] [private]
 

Definition at line 43 of file Map.h.

Referenced by Get_t_left(), Map(), and Populate().

unsigned char Map::m_terrain_up[MAPSIZE *MAPSIZE] [private]
 

Definition at line 44 of file Map.h.

Referenced by Get_t_up(), Map(), and Populate().


The documentation for this class was generated from the following files:
Generated for SDL C++ GUI by doxygen 1.3.6