diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-09-06 03:40:34 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-09-06 23:52:05 +0200 |
commit | 2a9cc7446033a1a0e56c1be11bde4e260f3f30e8 (patch) | |
tree | 0bb21c002603bd7fd6c8527f5ba0ac47ca9115ca /crawl-ref/source/status.h | |
parent | e63501eb3117a0f9cf3f7067d8c3c818704bf60d (diff) | |
download | crawl-ref-2a9cc7446033a1a0e56c1be11bde4e260f3f30e8.tar.gz crawl-ref-2a9cc7446033a1a0e56c1be11bde4e260f3f30e8.zip |
Unify handling of status output.
The @ messages, @: line on the % screen and status lights
are now mostly treated together in status.cc.
Diffstat (limited to 'crawl-ref/source/status.h')
-rw-r--r-- | crawl-ref/source/status.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/crawl-ref/source/status.h b/crawl-ref/source/status.h new file mode 100644 index 0000000000..487843041d --- /dev/null +++ b/crawl-ref/source/status.h @@ -0,0 +1,41 @@ +/* + * File: status.h + * Summary: Collects information for output of status effects. + */ + +#ifndef STATUS_H +#define STATUS_H + +enum status_type +{ + STATUS_AIRBORNE = NUM_DURATIONS + 1, + STATUS_BEHELD, + STATUS_BURDEN, + STATUS_GLOW, + STATUS_NET, + STATUS_HUNGER, + STATUS_REGENERATION, + STATUS_ROT, + STATUS_SICK, + STATUS_SPEED, +}; + +struct status_info +{ + int light_colour; + std::string light_text; // status light + std::string short_text; // @: line + std::string long_text; // @ message +}; + +int dur_colour(int exp_colour, bool expiring); + +// status should be a duration or status_type +// *info will be filled in as appropriate for current +// character state +void fill_status_info(int status, status_info* info); + +void init_duration_index(); + +#endif + |