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:
Jonathan G Rennison
2021-11-01 18:33:39 +00:00
parent c6f0559ad4
commit d1f1a6942a
88 changed files with 11154 additions and 511 deletions

View File

@@ -15,7 +15,7 @@
#include "tile_type.h"
#include "vehicle_type.h"
#include "base_consist.h"
#include "saveload/saveload.h"
#include "saveload/saveload_common.h"
/** Unique identifier for an order backup. */
typedef uint8 OrderBackupID;
@@ -29,6 +29,11 @@ extern OrderBackupPool _order_backup_pool;
/** Flag to pass to the vehicle construction command when an order should be preserved. */
static const uint32 MAKE_ORDER_BACKUP_FLAG = 1U << 31;
namespace upstream_sl {
SaveLoadTable GetOrderBackupDescription();
struct BKORChunkHandler;
}
/**
* Data for backing up an order of a vehicle so it can be
* restored after a vehicle is rebuilt in the same depot.
@@ -36,7 +41,9 @@ static const uint32 MAKE_ORDER_BACKUP_FLAG = 1U << 31;
struct OrderBackup : OrderBackupPool::PoolItem<&_order_backup_pool>, BaseConsist {
private:
friend SaveLoadTable GetOrderBackupDescription(); ///< Saving and loading of order backups.
friend upstream_sl::SaveLoadTable upstream_sl::GetOrderBackupDescription(); ///< Saving and loading of order backups.
friend void Load_BKOR(); ///< Creating empty orders upon savegame loading.
friend upstream_sl::BKORChunkHandler;
uint32 user; ///< The user that requested the backup.
TileIndex tile; ///< Tile of the depot where the order was changed.
GroupID group; ///< The group the vehicle was part of.