Merge branch 'improved_breakdowns-sx' into jgrpp
Conflicts: src/saveload/extended_ver_sl.cpp src/saveload/extended_ver_sl.h src/settings_type.h
This commit is contained in:
@@ -28,6 +28,7 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_TIMETABLES_START_TICKS, ///< Timetable start time is in ticks, instead of days (from departure boards patch)
|
||||
XSLFI_TOWN_CARGO_ADJ, ///< Town cargo adjustment patch
|
||||
XSLFI_SIG_TUNNEL_BRIDGE, ///< Signals on tunnels and bridges
|
||||
XLSFI_IMPROVED_BREAKDOWNS, ///< Improved breakdowns patch
|
||||
|
||||
XSLFI_SIZE, ///< Total count of features, including null feature
|
||||
};
|
||||
@@ -47,20 +48,17 @@ enum SlXvFeatureTestOperator {
|
||||
*/
|
||||
struct SlXvFeatureTest {
|
||||
private:
|
||||
uint64 value;
|
||||
uint16 min_version;
|
||||
uint16 max_version;
|
||||
SlXvFeatureIndex feature;
|
||||
SlXvFeatureTestOperator op;
|
||||
|
||||
public:
|
||||
SlXvFeatureTest()
|
||||
: value(0) { }
|
||||
: min_version(0), max_version(0), feature(XSLFI_NULL), op(XSLFTO_OR) { }
|
||||
|
||||
SlXvFeatureTest(SlXvFeatureTestOperator op, SlXvFeatureIndex feature, uint16 min_version = 1, uint16 max_version = 0xFFFF)
|
||||
{
|
||||
this->value = 0;
|
||||
SB(this->value, 0, 16, feature);
|
||||
SB(this->value, 16, 16, min_version);
|
||||
SB(this->value, 32, 16, max_version);
|
||||
SB(this->value, 48, 16, op);
|
||||
}
|
||||
SlXvFeatureTest(SlXvFeatureTestOperator op_, SlXvFeatureIndex feature_, uint16 min_version_ = 1, uint16 max_version_ = 0xFFFF)
|
||||
: min_version(min_version_), max_version(max_version_), feature(feature_), op(op_) { }
|
||||
|
||||
bool IsFeaturePresent(uint16 savegame_version, uint16 savegame_version_from, uint16 savegame_version_to) const;
|
||||
};
|
||||
|
Reference in New Issue
Block a user