diff options
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 121512b8e..88112966d 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -54,6 +54,19 @@ #include "table/railtypes.h" #include "table/track_land.h" +RailtypeInfo _railtypes[RAILTYPE_END]; + +assert_compile(sizeof(_original_railtypes) <= sizeof(_railtypes)); + +/** + * Initialize rail type information. + */ +void ResetRailTypes() +{ + memset(_railtypes, 0, sizeof(_railtypes)); + memcpy(_railtypes, _original_railtypes, sizeof(_original_railtypes)); +} + const byte _track_sloped_sprites[14] = { 14, 15, 22, 13, 0, 21, 17, 12, |