Add support for loading trunk savegames versions 293 - 299 (12.0)
Use modified upstream saveload implementation for these versions Re-arrange headers to support multiple saveload implementations
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "../station_base.h"
|
||||
#include "../cargotype.h"
|
||||
#include "../date_func.h"
|
||||
#include "../saveload/saveload.h"
|
||||
#include "../saveload/saveload_common.h"
|
||||
#include "linkgraph_type.h"
|
||||
#include <utility>
|
||||
|
||||
@@ -31,6 +31,13 @@ typedef Pool<LinkGraph, LinkGraphID, 32, 0xFFFF> LinkGraphPool;
|
||||
/** The actual pool with link graphs. */
|
||||
extern LinkGraphPool _link_graph_pool;
|
||||
|
||||
namespace upstream_sl {
|
||||
SaveLoadTable GetLinkGraphDesc();
|
||||
SaveLoadTable GetLinkGraphJobDesc();
|
||||
class SlLinkgraphNode;
|
||||
class SlLinkgraphEdge;
|
||||
}
|
||||
|
||||
/**
|
||||
* A connected component of a link graph. Contains a complete set of stations
|
||||
* connected by links as nodes and edges. Each component also holds a copy of
|
||||
@@ -536,6 +543,11 @@ protected:
|
||||
friend void Save_LinkGraph(LinkGraph &lg);
|
||||
friend void Load_LinkGraph(LinkGraph &lg);
|
||||
|
||||
friend upstream_sl::SaveLoadTable upstream_sl::GetLinkGraphDesc();
|
||||
friend upstream_sl::SaveLoadTable upstream_sl::GetLinkGraphJobDesc();
|
||||
friend upstream_sl::SlLinkgraphNode;
|
||||
friend upstream_sl::SlLinkgraphEdge;
|
||||
|
||||
CargoID cargo; ///< Cargo of this component's link graph.
|
||||
Date last_compression; ///< Last time the capacities and supplies were compressed.
|
||||
NodeVector nodes; ///< Nodes in the component.
|
||||
|
@@ -27,6 +27,10 @@ typedef Pool<LinkGraphJob, LinkGraphJobID, 32, 0xFFFF> LinkGraphJobPool;
|
||||
/** The actual pool with link graph jobs. */
|
||||
extern LinkGraphJobPool _link_graph_job_pool;
|
||||
|
||||
namespace upstream_sl {
|
||||
SaveLoadTable GetLinkGraphJobDesc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class for calculation jobs to be run on link graphs.
|
||||
*/
|
||||
@@ -57,6 +61,7 @@ private:
|
||||
typedef SmallMatrix<EdgeAnnotation> EdgeAnnotationMatrix;
|
||||
|
||||
friend SaveLoadTable GetLinkGraphJobDesc();
|
||||
friend upstream_sl::SaveLoadTable upstream_sl::GetLinkGraphJobDesc();
|
||||
friend void GetLinkGraphJobDayLengthScaleAfterLoad(LinkGraphJob *lgj);
|
||||
friend class LinkGraphSchedule;
|
||||
friend class LinkGraphJobGroup;
|
||||
|
@@ -16,6 +16,10 @@
|
||||
|
||||
class LinkGraphJob;
|
||||
|
||||
namespace upstream_sl {
|
||||
SaveLoadTable GetLinkGraphScheduleDesc();
|
||||
}
|
||||
|
||||
/**
|
||||
* A handler doing "something" on a link graph component. It must not keep any
|
||||
* state as it is called concurrently from different threads.
|
||||
@@ -42,6 +46,7 @@ private:
|
||||
typedef std::list<LinkGraph *> GraphList;
|
||||
typedef std::list<std::unique_ptr<LinkGraphJob>> JobList;
|
||||
friend SaveLoadTable GetLinkGraphScheduleDesc();
|
||||
friend upstream_sl::SaveLoadTable upstream_sl::GetLinkGraphScheduleDesc();
|
||||
|
||||
protected:
|
||||
std::unique_ptr<ComponentHandler> handlers[6]; ///< Handlers to be run for each job.
|
||||
|
Reference in New Issue
Block a user