DiagonalTileIterator Class Reference

Iterator to iterate over a diagonal area of the map. More...

#include <tilearea_type.h>

Inheritance diagram for DiagonalTileIterator:
TileIterator

Public Member Functions

 DiagonalTileIterator (TileIndex begin, TileIndex end)
 Construct the iterator.
TileIteratoroperator++ ()
 Move ourselves to the next tile in the rectange on the map.

Private Attributes

uint base_x
uint base_y
 The base tile x and y coordinates from where the iterating happens.
int a_cur
int b_cur
 The current (rotated) x and y coordinates of the iteration.
int a_max
int b_max
 The (rotated) x and y coordinates of the end of the iteration.

Detailed Description

Iterator to iterate over a diagonal area of the map.

Definition at line 133 of file tilearea_type.h.


Constructor & Destructor Documentation

DiagonalTileIterator::DiagonalTileIterator ( TileIndex  corner1,
TileIndex  corner2 
)

Construct the iterator.

Parameters:
begin Tile from where to begin iterating.
end Tile where to end the iterating.

Definition at line 111 of file tilearea.cpp.

References b_max, MapSize(), TileX(), and TileY().


The documentation for this class was generated from the following files:

Generated on Sun May 15 19:20:59 2011 for OpenTTD by  doxygen 1.6.1