]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Area.h
removed stupid file headers that eclipse put in
[l2e.git] / src / map / Area.h
index 3c370abc0acf88afb6ee8c78217cd88d4971bb83..5ea35874c8a088d9d2aae81c101a34c363c91024 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * Area.h
- *
- *  Created on: Sep 26, 2012
- *      Author: holy
- */
-
 #ifndef MAP_AREA_H_
 #define MAP_AREA_H_
 
 
 namespace map {
 
+/// Defines a rectangular section of a map.
+/// Tiles are rendered ltr with a row break each width tiles.
+/// Missing tiles in the last row are possible but don't fool yourself.
 class Area {
 
+public:
+       static const int TYPE_ID = 601;
+
 public:
        Area();
        ~Area() { }
 
 public:
+       /// Get the width in tiles.
        int Width() const { return width; }
+       /// Get the height in tiles.
        int Height() const { return numTiles / width + (numTiles % width ? 1 : 0); }
+       /// Get the size in tiles.
        geometry::Vector<int> Size() const { return geometry::Vector<int>(Width(), Height()); }
+       /// Get a tile by tile coordinates (not pixel coordinates!).
        Tile *TileAt(const geometry::Vector<int> &);
        const Tile *TileAt(const geometry::Vector<int> &) const;
 
+       /// Get the default battle background for this area.
        SDL_Surface *BattleBackground() { return battlebg; }
 
        void Render(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector<int> &offset) const;