Merge branch 'master' into jgrpp

Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2019-03-27 18:12:04 +00:00
422 changed files with 4697 additions and 6619 deletions

View File

@@ -29,7 +29,7 @@ typedef enum {
D_ARRIVAL = 1,
} DepartureType;
typedef struct CallAt {
struct CallAt {
StationID station;
DateTicks scheduled_date;
@@ -61,31 +61,27 @@ typedef struct CallAt {
inline bool operator==(StationID s) const {
return this->station == s;
}
} CallAt;
};
/** A scheduled departure. */
typedef struct Departure {
struct Departure {
DateTicksScaled scheduled_date; ///< The date this departure is scheduled to finish on (i.e. when the vehicle leaves the station)
Ticks lateness; ///< How delayed the departure is expected to be
CallAt terminus; ///< The station at which the vehicle will terminate following this departure
StationID via; ///< The station the departure should list as going via
SmallVector<CallAt, 32> calling_at; ///< The stations both called at and unloaded at by the vehicle after this departure before it terminates
std::vector<CallAt> calling_at; ///< The stations both called at and unloaded at by the vehicle after this departure before it terminates
DepartureStatus status; ///< Whether the vehicle has arrived yet for this departure
DepartureType type; ///< The type of the departure (departure or arrival)
const Vehicle *vehicle; ///< The vehicle performing this departure
const Order *order; ///< The order corresponding to this departure
uint scheduled_waiting_time; ///< Scheduled waiting time if scheduled dispatch is used
Departure() : terminus(INVALID_STATION), via(INVALID_STATION), calling_at(), vehicle(NULL) { }
~Departure()
{
calling_at.Reset();
}
Departure() : terminus(INVALID_STATION), via(INVALID_STATION), vehicle(NULL), order(NULL) { }
inline bool operator==(const Departure& d) const {
if (this->calling_at.Length() != d.calling_at.Length()) return false;
if (this->calling_at.size() != d.calling_at.size()) return false;
for (uint i = 0; i < this->calling_at.Length(); ++i) {
if (*(this->calling_at.Get(i)) != *(d.calling_at.Get(i))) return false;
for (uint i = 0; i < this->calling_at.size(); ++i) {
if (this->calling_at[i] != d.calling_at[i]) return false;
}
return
@@ -95,8 +91,8 @@ typedef struct Departure {
this->type == d.type
;
}
} Departure;
};
typedef SmallVector<Departure*, 32> DepartureList;
typedef std::vector<Departure*> DepartureList;
#endif /* DEPARTURES_TYPE_H */