summaryrefslogtreecommitdiff
path: root/economy.h
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-08-23 10:59:03 +0000
committerdominik <dominik@openttd.org>2004-08-23 10:59:03 +0000
commita6f2257600b8818ceff54c4f2b7fee376f11cfe6 (patch)
tree03f736144e43a70ff9b3aaca01c983b5bc7d282c /economy.h
parentcce45b44d8575bc60fe4b3c77c63987e40fc355a (diff)
downloadopenttd-a6f2257600b8818ceff54c4f2b7fee376f11cfe6.tar.xz
(svn r117) Feature: Performance details window in company league menu (TrueLight)
Diffstat (limited to 'economy.h')
-rw-r--r--economy.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/economy.h b/economy.h
index 5ed2e9c70..cee60e314 100644
--- a/economy.h
+++ b/economy.h
@@ -23,6 +23,48 @@ typedef struct Subsidy {
} Subsidy;
+enum {
+ SCORE_VEHICLES = 0,
+ SCORE_STATIONS = 1,
+ SCORE_MIN_PROFIT = 2,
+ SCORE_MIN_INCOME = 3,
+ SCORE_MAX_INCOME = 4,
+ SCORE_DELIVERED = 5,
+ SCORE_CARGO = 6,
+ SCORE_MONEY = 7,
+ SCORE_LOAN = 8,
+ SCORE_TOTAL = 9, // This must always be the last entry
+
+ NUM_SCORE = 10, // How many scores are there..
+
+ SCORE_MAX = 1000, // The max score that can be in the performance history
+ // the scores together of score_info is allowed to be more!
+};
+
+typedef 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
+} ScoreInfo;
+
+static 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}
+};
+
+int _score_part[MAX_PLAYERS][NUM_SCORE];
+
+void UpdateCompanyRatingAndValue(Player *p, bool update);
+
+
VARDEF Subsidy _subsidies[MAX_PLAYERS];
Pair SetupSubsidyDecodeParam(Subsidy *s, bool mode);
void DeleteSubsidyWithIndustry(byte index);