Pol
Revision:cb584c9
|
#include <region.h>
Public Member Functions | |
RegionGroupBase (const char *name) | |
virtual | ~RegionGroupBase () |
void | create_bgnd_region (Clib::ConfigElem &elem) |
virtual size_t | estimateSize () const |
const std::string & | name () const |
void | read_region (Clib::ConfigElem &elem) |
Protected Types | |
typedef std::map< Realms::Realm *, RegionId ** > | RegionRealms |
Protected Member Functions | |
Region * | getregion_byloc (xcoord x, ycoord y, Realms::Realm *realm) |
Region * | getregion_byname (const std::string ®ionname) |
Protected Attributes | |
RegionRealms | regionrealms |
std::vector< Region * > | regions_ |
Private Types | |
typedef std::map< std::string, Region * > | RegionsByName |
Private Member Functions | |
virtual Region * | create_region (Clib::ConfigElem &elem, RegionId id) const =0 |
RegionId | getregionid (xcoord x, ycoord y, Realms::Realm *realm) |
void | paint_zones (Clib::ConfigElem &elem, RegionId ridx) |
Private Attributes | |
std::string | name_ |
RegionsByName | regions_byname_ |
|
protected |
|
private |
|
explicit |
Definition at line 62 of file region.cpp.
References Pol::Core::gamestate, Pol::Core::GameState::Realms, regionrealms, and Pol::Core::ZONE_SIZE.
|
virtual |
Definition at line 83 of file region.cpp.
References regionrealms, regions_, and Pol::Core::ZONE_SIZE.
void Pol::Core::RegionGroupBase::create_bgnd_region | ( | Clib::ConfigElem & | elem | ) |
Definition at line 192 of file region.cpp.
References create_region(), Pol::Core::Region::read_custom_config(), regions_, and regions_byname_.
Referenced by Pol::Core::read_region_data().
|
privatepure virtual |
Implemented in Pol::Core::RegionGroup< T >, Pol::Core::RegionGroup< WeatherRegion >, and Pol::Core::RegionGroup< ResourceRegion >.
Referenced by create_bgnd_region(), and read_region().
|
virtual |
Reimplemented in Pol::Core::ResourceDef, and Pol::Core::WeatherDef.
Definition at line 201 of file region.cpp.
References name_, regionrealms, regions_, regions_byname_, and Pol::Core::ZONE_SIZE.
Referenced by Pol::Core::WeatherDef::estimateSize(), Pol::Core::ResourceDef::estimateSize(), and Pol::Core::GameState::estimateSize().
|
protected |
Definition at line 170 of file region.cpp.
References getregionid(), and regions_.
Referenced by Pol::Core::RegionGroup< T >::getregion().
|
protected |
Definition at line 161 of file region.cpp.
References regions_byname_.
Referenced by Pol::Core::WeatherDef::assign_zones_to_region(), and Pol::Core::RegionGroup< T >::getregion().
|
private |
Definition at line 149 of file region.cpp.
References Pol::Realms::Realm::baserealm, Pol::Realms::Realm::is_shadowrealm, regionrealms, and Pol::Core::XyToZone().
Referenced by getregion_byloc().
|
inline |
Definition at line 101 of file region.h.
Referenced by Pol::Core::ResourceDef::counttiles(), and Pol::Core::ResourceDef::write().
|
private |
Definition at line 106 of file region.cpp.
References Pol::Core::find_realm(), Pol::Realms::Realm::height(), ISTRINGSTREAM, regionrealms, Pol::Clib::ConfigElem::remove_prop(), Pol::Clib::ConfigElem::remove_string(), Pol::Clib::ConfigElem::throw_error(), Pol::Realms::Realm::width(), and Pol::Core::XyToZone().
Referenced by read_region().
void Pol::Core::RegionGroupBase::read_region | ( | Clib::ConfigElem & | elem | ) |
Definition at line 182 of file region.cpp.
References create_region(), paint_zones(), Pol::Core::Region::read_custom_config(), regions_, regions_byname_, and Pol::Clib::ConfigElemBase::rest().
Referenced by Pol::Core::read_region_data().
|
private |
Definition at line 96 of file region.h.
Referenced by estimateSize(), and Pol::Core::ResourceRegion::write().
|
protected |
Definition at line 89 of file region.h.
Referenced by Pol::Core::WeatherDef::assign_zones_to_region(), Pol::Core::WeatherDef::copy_default_regions(), estimateSize(), getregionid(), paint_zones(), RegionGroupBase(), and ~RegionGroupBase().
|
protected |
Definition at line 86 of file region.h.
Referenced by Pol::Core::ResourceDef::counttiles(), create_bgnd_region(), estimateSize(), getregion_byloc(), read_region(), Pol::Core::ResourceDef::regenerate(), Pol::Core::ResourceDef::write(), and ~RegionGroupBase().
|
private |
Definition at line 98 of file region.h.
Referenced by create_bgnd_region(), estimateSize(), getregion_byname(), and read_region().