mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r20262) -Codechange: Remove unused ScoreInfo::id field, and doxyment the data structures.
This commit is contained in:
parent
ea05f284a9
commit
3f62ee6355
|
@ -92,18 +92,20 @@ static inline uint32 BigMulSU(const uint32 a, const uint32 b, const uint8 shift)
|
||||||
|
|
||||||
typedef SmallVector<Industry *, 16> SmallIndustryList;
|
typedef SmallVector<Industry *, 16> SmallIndustryList;
|
||||||
|
|
||||||
/* Score info */
|
/**
|
||||||
|
* Score info, values used for computing the detailed performance rating.
|
||||||
|
*/
|
||||||
const ScoreInfo _score_info[] = {
|
const ScoreInfo _score_info[] = {
|
||||||
{ SCORE_VEHICLES, 120, 100 },
|
{ 120, 100}, // SCORE_VEHICLES
|
||||||
{ SCORE_STATIONS, 80, 100 },
|
{ 80, 100}, // SCORE_STATIONS
|
||||||
{ SCORE_MIN_PROFIT, 10000, 100 },
|
{ 10000, 100}, // SCORE_MIN_PROFIT
|
||||||
{ SCORE_MIN_INCOME, 50000, 50 },
|
{ 50000, 50}, // SCORE_MIN_INCOME
|
||||||
{ SCORE_MAX_INCOME, 100000, 100 },
|
{ 100000, 100}, // SCORE_MAX_INCOME
|
||||||
{ SCORE_DELIVERED, 40000, 400 },
|
{ 40000, 400}, // SCORE_DELIVERED
|
||||||
{ SCORE_CARGO, 8, 50 },
|
{ 8, 50}, // SCORE_CARGO
|
||||||
{ SCORE_MONEY, 10000000, 50 },
|
{10000000, 50}, // SCORE_MONEY
|
||||||
{ SCORE_LOAN, 250000, 50 },
|
{ 250000, 50}, // SCORE_LOAN
|
||||||
{ SCORE_TOTAL, 0, 0 }
|
{ 0, 0} // SCORE_TOTAL
|
||||||
};
|
};
|
||||||
|
|
||||||
int _score_part[MAX_COMPANIES][SCORE_END];
|
int _score_part[MAX_COMPANIES][SCORE_END];
|
||||||
|
|
|
@ -34,6 +34,7 @@ struct Economy {
|
||||||
uint16 old_max_loan_unround_fract; ///< Old: Fraction of the unrounded max loan
|
uint16 old_max_loan_unround_fract; ///< Old: Fraction of the unrounded max loan
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Score categories in the detailed performance rating. */
|
||||||
enum ScoreID {
|
enum ScoreID {
|
||||||
SCORE_BEGIN = 0,
|
SCORE_BEGIN = 0,
|
||||||
SCORE_VEHICLES = 0,
|
SCORE_VEHICLES = 0,
|
||||||
|
@ -53,8 +54,8 @@ enum ScoreID {
|
||||||
};
|
};
|
||||||
DECLARE_POSTFIX_INCREMENT(ScoreID)
|
DECLARE_POSTFIX_INCREMENT(ScoreID)
|
||||||
|
|
||||||
|
/** Data structure for storing how the score is computed for a single score id. */
|
||||||
struct ScoreInfo {
|
struct ScoreInfo {
|
||||||
byte id; ///< Unique ID of the score
|
|
||||||
int needed; ///< How much you need to get the perfect score
|
int needed; ///< How much you need to get the perfect score
|
||||||
int score; ///< How much score it will give
|
int score; ///< How much score it will give
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue