Update to 1.10.0-beta1
This commit is contained in:
@@ -34,7 +34,7 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
uint16 duration_phase_3; ///< Third reliability phase on months, decaying to #reliability_final.
|
||||
byte flags; ///< Flags of the engine. @see EngineFlags
|
||||
CompanyMask preview_asked; ///< Bit for each company which has already been offered a preview.
|
||||
CompanyByte preview_company;///< Company which is currently being offered a preview \c INVALID_COMPANY means no company.
|
||||
CompanyID preview_company; ///< Company which is currently being offered a preview \c INVALID_COMPANY means no company.
|
||||
byte preview_wait; ///< Daily countdown timer for timeout of offering the engine to the #preview_company company.
|
||||
CompanyMask company_avail; ///< Bit for each company whether the engine is available for that company.
|
||||
CompanyMask company_hidden; ///< Bit for each company whether the engine is normally hidden in the build gui for that company.
|
||||
@@ -83,7 +83,7 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
return this->info.cargo_type;
|
||||
}
|
||||
|
||||
uint DetermineCapacity(const Vehicle *v, uint16 *mail_capacity = NULL) const;
|
||||
uint DetermineCapacity(const Vehicle *v, uint16 *mail_capacity = nullptr) const;
|
||||
|
||||
bool CanCarryCargo() const;
|
||||
|
||||
@@ -98,9 +98,9 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
* @return The default capacity
|
||||
* @see GetDefaultCargoType
|
||||
*/
|
||||
uint GetDisplayDefaultCapacity(uint16 *mail_capacity = NULL) const
|
||||
uint GetDisplayDefaultCapacity(uint16 *mail_capacity = nullptr) const
|
||||
{
|
||||
return this->DetermineCapacity(NULL, mail_capacity);
|
||||
return this->DetermineCapacity(nullptr, mail_capacity);
|
||||
}
|
||||
|
||||
Money GetRunningCost() const;
|
||||
@@ -118,7 +118,7 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
* @param c Company to check.
|
||||
* @return \c true iff the engine is hidden in the GUI for the given company.
|
||||
*/
|
||||
inline bool IsHidden(CompanyByte c) const
|
||||
inline bool IsHidden(CompanyID c) const
|
||||
{
|
||||
return c < MAX_COMPANIES && HasBit(this->company_hidden, c);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
struct EngineIDMapping {
|
||||
uint32 grfid; ///< The GRF ID of the file the entity belongs to
|
||||
uint16 internal_id; ///< The internal ID within the GRF file
|
||||
VehicleTypeByte type; ///< The engine type
|
||||
VehicleType type; ///< The engine type
|
||||
uint8 substitute_id; ///< The (original) entity ID to use if this GRF is not available (currently not used)
|
||||
};
|
||||
|
||||
@@ -156,7 +156,7 @@ struct EngineIDMapping {
|
||||
* Stores the mapping of EngineID to the internal id of newgrfs.
|
||||
* Note: This is not part of Engine, as the data in the EngineOverrideManager and the engine pool get resetted in different cases.
|
||||
*/
|
||||
struct EngineOverrideManager : SmallVector<EngineIDMapping, 256> {
|
||||
struct EngineOverrideManager : std::vector<EngineIDMapping> {
|
||||
static const uint NUM_DEFAULT_ENGINES; ///< Number of default entries
|
||||
|
||||
void ResetToDefaultMapping();
|
||||
|
||||
Reference in New Issue
Block a user