summaryrefslogtreecommitdiff
path: root/src/newgrf.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-04-06 07:46:15 +0100
committerMichael Lutz <michi@icosahedron.de>2019-05-01 21:36:27 +0200
commitc02ef3e4564b7b54d49f0827d2d7625cbc38f335 (patch)
tree1c0ee62b6ce55124b247daaafa42300bfaa932e7 /src/newgrf.h
parent21edf67f89c60351d5a0d84625455aa296b6b950 (diff)
downloadopenttd-c02ef3e4564b7b54d49f0827d2d7625cbc38f335.tar.xz
Feature: Add NotRoadTypes (NRT)
Diffstat (limited to 'src/newgrf.h')
-rw-r--r--src/newgrf.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/newgrf.h b/src/newgrf.h
index c36005b0f..5d76a3364 100644
--- a/src/newgrf.h
+++ b/src/newgrf.h
@@ -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.
};
/**