diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-04-01 11:42:47 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-04-01 12:37:18 +0200 |
commit | 6a85c4874b0959245581c22772603a490e8dfca3 (patch) | |
tree | 512f206b5ebc4ea616087e27b508cbed4e193eea /crawl-ref/source/place-info.h | |
parent | 88e2246a0e6edfc221a0d6abf0b622ddb8a6f9c5 (diff) | |
download | crawl-ref-6a85c4874b0959245581c22772603a490e8dfca3.tar.gz crawl-ref-6a85c4874b0959245581c22772603a490e8dfca3.zip |
Move PlaceInfo to place-info.{cc,h}.
Diffstat (limited to 'crawl-ref/source/place-info.h')
-rw-r--r-- | crawl-ref/source/place-info.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/crawl-ref/source/place-info.h b/crawl-ref/source/place-info.h new file mode 100644 index 0000000000..57eee7f0c3 --- /dev/null +++ b/crawl-ref/source/place-info.h @@ -0,0 +1,48 @@ +#ifndef PLACE_INFO_H +#define PLACE_INFO_H + +class PlaceInfo +{ +public: + int level_type; // enum level_area_type + int branch; // enum branch_type if LEVEL_DUNGEON; otherwise -1 + + unsigned long num_visits; + unsigned long levels_seen; + + unsigned long mon_kill_exp; + unsigned long mon_kill_exp_avail; + unsigned long mon_kill_num[KC_NCATEGORIES]; + + long turns_total; + long turns_explore; + long turns_travel; + long turns_interlevel; + long turns_resting; + long turns_other; + + long elapsed_total; + long elapsed_explore; + long elapsed_travel; + long elapsed_interlevel; + long elapsed_resting; + long elapsed_other; + +public: + PlaceInfo(); + + bool is_global() const; + void make_global(); + + void assert_validity() const; + + const std::string short_name() const; + + const PlaceInfo &operator += (const PlaceInfo &other); + const PlaceInfo &operator -= (const PlaceInfo &other); + PlaceInfo operator + (const PlaceInfo &other) const; + PlaceInfo operator - (const PlaceInfo &other) const; +}; + +#endif + |