Merge branch 'save_ext' into jgrpp

# Conflicts:
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/vehicle_base.h
#	src/widgets/dropdown.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-21 19:28:29 +00:00
112 changed files with 541 additions and 921 deletions

View File

@@ -12,6 +12,8 @@
#ifndef SHIP_H
#define SHIP_H
#include <deque>
#include "vehicle_base.h"
#include "water_map.h"
@@ -20,11 +22,14 @@ extern const DiagDirection _ship_search_directions[TRACK_END][DIAGDIR_END];
void GetShipSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type);
WaterClass GetEffectiveWaterClass(TileIndex tile);
typedef std::deque<TrackdirByte> ShipPathCache;
/**
* All ships have this type.
*/
struct Ship FINAL : public SpecializedVehicle<Ship, VEH_SHIP> {
TrackBitsByte state; ///< The "track" the ship is following.
ShipPathCache path; ///< Cached path.
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
Ship() : SpecializedVehicleBase() {}
@@ -48,6 +53,7 @@ struct Ship FINAL : public SpecializedVehicle<Ship, VEH_SHIP> {
TileIndex GetOrderStationLocation(StationID station);
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
void UpdateCache();
void SetDestTile(TileIndex tile);
};
static const uint SHIP_MAX_ORDER_DISTANCE = 130;