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/decks.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/decks.h')
-rw-r--r-- | crawl-ref/source/decks.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/decks.h b/crawl-ref/source/decks.h index 044abe5ba4..8c13c4bcfd 100644 --- a/crawl-ref/source/decks.h +++ b/crawl-ref/source/decks.h @@ -130,7 +130,7 @@ void shuffle_all_decks_on_level(); // Return true if it was a "genuine" draw, false otherwise. bool card_effect(card_type which_card, deck_rarity_type rarity, - unsigned char card_flags = 0, bool tell_card = true); + uint8_t card_flags = 0, bool tell_card = true); void draw_from_deck_of_punishment(); bool top_card_is_known(const item_def &item); @@ -139,12 +139,12 @@ card_type top_card(const item_def &item); bool is_deck(const item_def &item); bool bad_deck(const item_def &item); deck_rarity_type deck_rarity(const item_def &item); -unsigned char deck_rarity_to_color(deck_rarity_type rarity); +uint8_t deck_rarity_to_color(deck_rarity_type rarity); void init_deck(item_def &item); int cards_in_deck(const item_def &deck); card_type get_card_and_flags(const item_def& deck, int idx, - unsigned char& _flags); + uint8_t& _flags); const std::vector<card_type> get_drawn_cards(const item_def& deck); |