(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed

This commit is contained in:
smatz
2009-08-07 22:23:34 +00:00
parent 876d09d751
commit 738d7fde53
13 changed files with 157 additions and 171 deletions

View File

@@ -13,10 +13,12 @@ typedef uint16 SubsidyID; ///< ID of a subsidy
/** Struct about subsidies, offered and awarded */
struct Subsidy {
CargoID cargo_type; ///< Cargo type involved in this subsidy, CT_INVALID for invalid subsidy
byte age; ///< Subsidy age; < 12 is unawarded, >= 12 is awarded
uint16 from; ///< Index of source. Either TownID, IndustryID or StationID, when awarded
uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded
CargoID cargo_type; ///< Cargo type involved in this subsidy, CT_INVALID for invalid subsidy
byte age; ///< Subsidy age; < 12 is unawarded, >= 12 is awarded
SourceTypeByte src_type; ///< Source of subsidised path
SourceTypeByte dst_type; ///< Destination of subsidised path
uint16 src; ///< Index of source. Either TownID, IndustryID or StationID, when awarded
uint16 dst; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded
/**
* Tests whether this subsidy has been awarded to someone