D:/Development/Projects/X-Clone/X-Clone/trunk/Map.h

Go to the documentation of this file.
00001 #ifndef XCLONE_MAP_H
00002 #define XCLONE_MAP_H
00003 
00004 #include "includes.h"
00005 #include "MapTile.h"
00006 #include "Terrain.h"
00007 
00008 class MapTile;
00009 
00010 class Map
00011 {
00012    public:
00013       Map();
00014       ~Map();
00015 
00016       bool load( istream& data );
00017 
00018       void drawTerrainLayer(Point offset);
00019       void drawObjectLayer(Point offset);
00020       void drawMinimap();
00021       void highlightMouseOverTile(Point offset);
00022       
00023       int getWidth() const;
00024       int getHeight() const;
00025 
00026       spMapTile getTile(int x, int y) const;
00027 
00028       spMapTile getMouseOverTile();
00029       void updateMouseOverTile(Point offset);
00030 
00031    private:
00032       spMapTile getTile(Point position, Point offset);
00033       bool makeTerrain(string terrain);
00034 
00035       void populateTileNeighbors(spMapTile tile);
00036 
00037       int _width;
00038       int _height;
00039 
00040       vector<spMapTile> _mapTiles;
00041       
00042       static map<string, TerrainType> terrainMap;
00043       
00044       SDL_Surface* _tileMouseMap;
00045       spMapTile _mouseOverTile;
00046 };
00047 
00048 #endif
00049 
00050 

Generated on Fri Sep 22 06:00:26 2006 for X-CLONE by  doxygen 1.4.7