diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-07-29 12:08:57 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-07-30 18:45:16 +0200 |
commit | 558f088e9aa6ef75589cdea4ebd908c5b3985eb0 (patch) | |
tree | 498ecba031c0ce0bc21563c76866ee316d3d7f85 /crawl-ref/source/player-stats.h | |
parent | 4817bb3d806b3156bea1d2bc2b648f04bb0e04e5 (diff) | |
download | crawl-ref-558f088e9aa6ef75589cdea4ebd908c5b3985eb0.tar.gz crawl-ref-558f088e9aa6ef75589cdea4ebd908c5b3985eb0.zip |
Rename chars used as numbers to int8_t/uint8_t. Fix some other type usage.
This should help against the signed char problems, and is good for
code readability. Now, if you have a char, it's either an untyped
in-memory byte, or a symbol inside a string. Small numbers are instead
[u]int8_t, ints, an enum type, or, in so many cases, bools.
I didn't touch any of the tiles code, as it's currently broken and I don't
want to risk making it unbroken harder.
Diffstat (limited to 'crawl-ref/source/player-stats.h')
-rw-r--r-- | crawl-ref/source/player-stats.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/player-stats.h b/crawl-ref/source/player-stats.h index 21219e5292..9a22db1b64 100644 --- a/crawl-ref/source/player-stats.h +++ b/crawl-ref/source/player-stats.h @@ -14,31 +14,31 @@ const char* stat_desc(stat_type stat, stat_desc_type desc); void attribute_increase(); -void modify_stat(stat_type which_stat, signed char amount, bool suppress_msg, +void modify_stat(stat_type which_stat, int8_t amount, bool suppress_msg, const char* cause, bool see_source = true); -void notify_stat_change(stat_type which_stat, signed char amount, +void notify_stat_change(stat_type which_stat, int8_t amount, bool suppress_msg, const char* cause, bool see_source = true); -void notify_stat_change(stat_type which_stat, signed char amount, +void notify_stat_change(stat_type which_stat, int8_t amount, bool suppress_msg, const item_def &cause, bool removed = false); void notify_stat_change(const char* cause); void jiyva_stat_action(); -bool lose_stat(stat_type which_stat, unsigned char stat_loss, +bool lose_stat(stat_type which_stat, int8_t stat_loss, bool force = false, const std::string cause = "", bool see_source = true); -bool lose_stat(stat_type which_stat, unsigned char stat_loss, +bool lose_stat(stat_type which_stat, int8_t stat_loss, bool force = false, const char* cause = NULL, bool see_source = true); -bool lose_stat(stat_type which_stat, unsigned char stat_loss, +bool lose_stat(stat_type which_stat, int8_t stat_loss, const monsters* cause, bool force = false); -bool lose_stat(stat_type which_stat, unsigned char stat_loss, +bool lose_stat(stat_type which_stat, int8_t stat_loss, const item_def &cause, bool removed, bool force = false); -bool restore_stat(stat_type which_stat, unsigned char stat_gain, +bool restore_stat(stat_type which_stat, int8_t stat_gain, bool suppress_msg, bool recovery = false); void update_stat_zero(); |