src/economy.h
branchcpp_gui
changeset 6268 4b5241e5dd10
parent 5838 9c3129cb019b
child 6298 c30fe89622df
child 6573 7624f942237f
equal deleted inserted replaced
6267:7c8ec33959b1 6268:4b5241e5dd10
     1 /* $Id$ */
     1 /* $Id$ */
       
     2 
       
     3 /** @file economy.h */
     2 
     4 
     3 #ifndef ECONOMY_H
     5 #ifndef ECONOMY_H
     4 #define ECONOMY_H
     6 #define ECONOMY_H
     5 
     7 
     6 void ResetPriceBaseMultipliers(void);
     8 void ResetPriceBaseMultipliers(void);
     7 void SetPriceBaseMultiplier(uint price, byte factor);
     9 void SetPriceBaseMultiplier(uint price, byte factor);
     8 
    10 
     9 typedef struct {
    11 typedef struct {
    10 	// Maximum possible loan
    12 	int32 max_loan;         ///< Maximum possible loan
    11 	int32 max_loan;
    13 	int32 max_loan_unround; ///< Economy fluctuation status
    12 	int32 max_loan_unround;
       
    13 	// Economy fluctuation status
       
    14 	int fluct;
    14 	int fluct;
    15 	// Interest
    15 	byte interest_rate;     ///< Interest
    16 	byte interest_rate;
    16 	byte infl_amount;       ///< inflation amount
    17 	byte infl_amount;
    17 	byte infl_amount_pr;    ///< "floating" portion of inflation
    18 	byte infl_amount_pr;
       
    19 } Economy;
    18 } Economy;
    20 
    19 
    21 VARDEF Economy _economy;
    20 VARDEF Economy _economy;
    22 
    21 
    23 typedef struct Subsidy {
    22 typedef struct Subsidy {
    38 	SCORE_MAX_INCOME = 4,
    37 	SCORE_MAX_INCOME = 4,
    39 	SCORE_DELIVERED  = 5,
    38 	SCORE_DELIVERED  = 5,
    40 	SCORE_CARGO      = 6,
    39 	SCORE_CARGO      = 6,
    41 	SCORE_MONEY      = 7,
    40 	SCORE_MONEY      = 7,
    42 	SCORE_LOAN       = 8,
    41 	SCORE_LOAN       = 8,
    43 	SCORE_TOTAL      = 9, // This must always be the last entry
    42 	SCORE_TOTAL      = 9,  ///< This must always be the last entry
    44 	SCORE_END        = 10, // How many scores are there..
    43 	SCORE_END        = 10, ///< How many scores are there..
    45 
    44 
    46 	SCORE_MAX = 1000 // The max score that can be in the performance history
    45 	SCORE_MAX = 1000       ///< The max score that can be in the performance history
    47 	//  the scores together of score_info is allowed to be more!
    46 	/* the scores together of score_info is allowed to be more! */
    48 };
    47 };
    49 
    48 
    50 DECLARE_POSTFIX_INCREMENT(ScoreID);
    49 DECLARE_POSTFIX_INCREMENT(ScoreID);
    51 
    50 
    52 typedef struct ScoreInfo {
    51 typedef struct ScoreInfo {
    53 	byte id;    // Unique ID of the score
    52 	byte id;    ///< Unique ID of the score
    54 	int needed; // How much you need to get the perfect score
    53 	int needed; ///< How much you need to get the perfect score
    55 	int score;  // How much score it will give
    54 	int score;  ///< How much score it will give
    56 } ScoreInfo;
    55 } ScoreInfo;
    57 
    56 
    58 extern const ScoreInfo _score_info[];
    57 extern const ScoreInfo _score_info[];
    59 extern int _score_part[MAX_PLAYERS][SCORE_END];
    58 extern int _score_part[MAX_PLAYERS][SCORE_END];
    60 
    59