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/hiscores.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/hiscores.h')
-rw-r--r-- | crawl-ref/source/hiscores.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/hiscores.h b/crawl-ref/source/hiscores.h index d92172b2ba..4991a3c7ab 100644 --- a/crawl-ref/source/hiscores.h +++ b/crawl-ref/source/hiscores.h @@ -72,16 +72,16 @@ private: species_type race; int job; // job_type + legacy values std::string race_class_name; // overrides race & cls if non-empty. - char lvl; // player level. - char best_skill; // best skill # - char best_skill_lvl; // best skill level + uint8_t lvl; // player level. + uint8_t best_skill; // best skill # + uint8_t best_skill_lvl; // best skill level int death_type; int death_source; // NON_MONSTER or monster type std::string death_source_name; // overrides death_source std::string auxkilldata; // weapon wielded, spell cast, etc std::string indirectkiller; // the effect or real monster that summoned std::string killerpath; // colon-separated intermediate killers - char dlvl; // dungeon level (relative) + uint8_t dlvl; // dungeon level (relative) short absdepth; // 1-based absolute depth level_area_type level_type; // what kind of level died on.. branch_type branch; // dungeon branch @@ -97,7 +97,7 @@ private: god_type god; // god int piety; // piety int penance; // penance - char wiz_mode; // character used wiz mode + uint8_t wiz_mode; // character used wiz mode time_t birth_time; // start time of character time_t death_time; // end time of character time_t real_time; // real playing time in seconds |