Mercurial > hg > openttd
changeset 15601:4d1a28b41236 draft
(svn r20262) -Codechange: Remove unused ScoreInfo::id field, and doxyment the data structures.
author | alberth <alberth@openttd.org> |
---|---|
date | Sat, 31 Jul 2010 19:45:48 +0000 |
parents | 703848cef902 |
children | 71b4c310d261 |
files | src/economy.cpp src/economy_type.h |
diffstat | 2 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/economy.cpp +++ b/src/economy.cpp @@ -92,18 +92,20 @@ typedef SmallVector<Industry *, 16> SmallIndustryList; -/* Score info */ +/** + * Score info, values used for computing the detailed performance rating. + */ const ScoreInfo _score_info[] = { - { SCORE_VEHICLES, 120, 100 }, - { SCORE_STATIONS, 80, 100 }, - { SCORE_MIN_PROFIT, 10000, 100 }, - { SCORE_MIN_INCOME, 50000, 50 }, - { SCORE_MAX_INCOME, 100000, 100 }, - { SCORE_DELIVERED, 40000, 400 }, - { SCORE_CARGO, 8, 50 }, - { SCORE_MONEY, 10000000, 50 }, - { SCORE_LOAN, 250000, 50 }, - { SCORE_TOTAL, 0, 0 } + { 120, 100}, // SCORE_VEHICLES + { 80, 100}, // SCORE_STATIONS + { 10000, 100}, // SCORE_MIN_PROFIT + { 50000, 50}, // SCORE_MIN_INCOME + { 100000, 100}, // SCORE_MAX_INCOME + { 40000, 400}, // SCORE_DELIVERED + { 8, 50}, // SCORE_CARGO + {10000000, 50}, // SCORE_MONEY + { 250000, 50}, // SCORE_LOAN + { 0, 0} // SCORE_TOTAL }; int _score_part[MAX_COMPANIES][SCORE_END];
--- a/src/economy_type.h +++ b/src/economy_type.h @@ -34,6 +34,7 @@ uint16 old_max_loan_unround_fract; ///< Old: Fraction of the unrounded max loan }; +/** Score categories in the detailed performance rating. */ enum ScoreID { SCORE_BEGIN = 0, SCORE_VEHICLES = 0, @@ -53,8 +54,8 @@ }; DECLARE_POSTFIX_INCREMENT(ScoreID) +/** Data structure for storing how the score is computed for a single score id. */ struct ScoreInfo { - byte id; ///< Unique ID of the score int needed; ///< How much you need to get the perfect score int score; ///< How much score it will give };