#include <map_zones.h>
Inheritance diagram for hoa_map::private_map::MapZone:


Public Member Functions | |
| void | AddSection (ZoneSection *section) |
| bool | IsInsideZone (uint16 pos_x, uint16 pos_y) |
| Returns true if the position coordinates are located inside the zone. | |
| MapZone () | |
| virtual void | Update () |
| Updates the state of the zone and the state of any objects in the zone. | |
| virtual | ~MapZone () |
Protected Member Functions | |
| void | _RandomPosition (uint16 &x, uint16 &y) |
| Returns random x, y position coordinates within the zone. | |
Protected Attributes | |
| std::vector< ZoneSection > | _sections |
| The rectangular sections which compose the map zone. | |
***************************************************************************
The area is made up of many ZoneSection instances, so it can be any shape. This class can be derived to create enemy zones, poisonous zones, etc.
Definition at line 58 of file map_zones.h.
| hoa_map::private_map::MapZone::MapZone | ( | ) | [inline] |
Definition at line 60 of file map_zones.h.
| virtual hoa_map::private_map::MapZone::~MapZone | ( | ) | [inline, virtual] |
Definition at line 63 of file map_zones.h.
Returns random x, y position coordinates within the zone.
| &x | A reference where to store the value of the x position | |
| &y | A reference where to store the value of the x position |
Definition at line 57 of file map_zones.cpp.
References _sections, and hoa_utils::RandomBoundedInteger().
Referenced by hoa_map::private_map::EnemyZone::Update().
Here is the call graph for this function:

| void hoa_map::private_map::MapZone::AddSection | ( | ZoneSection * | section | ) |
Returns true if the position coordinates are located inside the zone.
| pos_x | The x position to check | |
| pos_y | The y position to check |
Definition at line 43 of file map_zones.cpp.
References _sections.
Referenced by hoa_map::private_map::EnemySprite::Update().
| virtual void hoa_map::private_map::MapZone::Update | ( | ) | [inline, virtual] |
Updates the state of the zone and the state of any objects in the zone.
Reimplemented in hoa_map::private_map::EnemyZone.
Definition at line 76 of file map_zones.h.
std::vector<ZoneSection> hoa_map::private_map::MapZone::_sections [protected] |
The rectangular sections which compose the map zone.
Definition at line 81 of file map_zones.h.
Referenced by _RandomPosition(), AddSection(), and IsInsideZone().
1.5.1