Feature: Add NotRoadTypes (NRT)

This commit is contained in:
peter1138
2019-04-06 07:46:15 +01:00
committed by Michael Lutz
parent 21edf67f89
commit c02ef3e456
106 changed files with 4465 additions and 1245 deletions

View File

@@ -14,6 +14,7 @@
#include "cargotype.h"
#include "rail_type.h"
#include "road_type.h"
#include "fileio_type.h"
#include "core/bitmath_func.hpp"
#include "core/alloc_type.hpp"
@@ -83,6 +84,8 @@ enum GrfSpecFeature {
GSF_OBJECTS,
GSF_RAILTYPES,
GSF_AIRPORTTILES,
GSF_ROADTYPES,
GSF_TRAMTYPES,
GSF_END,
GSF_FAKE_TOWNS = GSF_END, ///< Fake town GrfSpecFeature for NewGRF debugging (parent scope)
@@ -128,6 +131,12 @@ struct GRFFile : ZeroedMemoryAllocator {
std::vector<RailTypeLabel> railtype_list; ///< Railtype translation table
RailType railtype_map[RAILTYPE_END];
std::vector<RoadTypeLabel> roadtype_list; ///< Roadtype translation table (road)
RoadType roadtype_map[ROADTYPE_END];
std::vector<RoadTypeLabel> tramtype_list; ///, Roadtype translation table (tram)
RoadType tramtype_map[ROADTYPE_END];
CanalProperties canal_local_properties[CF_END]; ///< Canal properties as set by this NewGRF
struct LanguageMap *language_map; ///< Mappings related to the languages.
@@ -158,12 +167,19 @@ enum ShoreReplacement {
SHORE_REPLACE_ONLY_NEW, ///< Only corner-shores were loaded by Action5 (openttd(w/d).grf only).
};
enum TramReplacement {
TRAMWAY_REPLACE_DEPOT_NONE, ///< No tram depot graphics were loaded.
TRAMWAY_REPLACE_DEPOT_WITH_TRACK, ///< Electrified depot graphics with tram track were loaded.
TRAMWAY_REPLACE_DEPOT_NO_TRACK, ///< Electrified depot graphics without tram track were loaded.
};
struct GRFLoadedFeatures {
bool has_2CC; ///< Set if any vehicle is loaded which uses 2cc (two company colours).
uint64 used_liveries; ///< Bitmask of #LiveryScheme used by the defined engines.
bool has_newhouses; ///< Set if there are any newhouses loaded.
bool has_newindustries; ///< Set if there are any newindustries loaded.
ShoreReplacement shore; ///< In which way shore sprites were replaced.
TramReplacement tram; ///< In which way tram depots were replaced.
};
/**