Merge branch 'save_ext' into infrastructure_sharing
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#define MKEND {{-0x80, 0}, 0}
|
||||
|
||||
/** Tiles for Country Airfield (small) */
|
||||
static AirportTileTable _tile_table_country_0[] = {
|
||||
static const AirportTileTable _tile_table_country_0[] = {
|
||||
MK(0, 0, APT_SMALL_BUILDING_1),
|
||||
MK(1, 0, APT_SMALL_BUILDING_2),
|
||||
MK(2, 0, APT_SMALL_BUILDING_3),
|
||||
@@ -44,12 +44,12 @@ static AirportTileTable _tile_table_country_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_country[] = {
|
||||
static const AirportTileTable * const _tile_table_country[] = {
|
||||
_tile_table_country_0,
|
||||
};
|
||||
|
||||
/** Tiles for Commuter Airfield (small) */
|
||||
static AirportTileTable _tile_table_commuter_0[] = {
|
||||
static const AirportTileTable _tile_table_commuter_0[] = {
|
||||
MK(0, 0, APT_TOWER),
|
||||
MK(1, 0, APT_BUILDING_3),
|
||||
MK(2, 0, APT_HELIPAD_2_FENCE_NW),
|
||||
@@ -73,12 +73,12 @@ static AirportTileTable _tile_table_commuter_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_commuter[] = {
|
||||
static const AirportTileTable * const _tile_table_commuter[] = {
|
||||
_tile_table_commuter_0,
|
||||
};
|
||||
|
||||
/** Tiles for City Airport (large) */
|
||||
static AirportTileTable _tile_table_city_0[] = {
|
||||
static const AirportTileTable _tile_table_city_0[] = {
|
||||
MK(0, 0, APT_BUILDING_1),
|
||||
MK(1, 0, APT_APRON_FENCE_NW),
|
||||
MK(2, 0, APT_STAND_1),
|
||||
@@ -118,12 +118,12 @@ static AirportTileTable _tile_table_city_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_city[] = {
|
||||
static const AirportTileTable * const _tile_table_city[] = {
|
||||
_tile_table_city_0,
|
||||
};
|
||||
|
||||
/** Tiles for Metropolitain Airport (large) - 2 runways */
|
||||
static AirportTileTable _tile_table_metropolitan_0[] = {
|
||||
static const AirportTileTable _tile_table_metropolitan_0[] = {
|
||||
MK(0, 0, APT_BUILDING_1),
|
||||
MK(1, 0, APT_APRON_FENCE_NW),
|
||||
MK(2, 0, APT_STAND_1),
|
||||
@@ -163,12 +163,12 @@ static AirportTileTable _tile_table_metropolitan_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_metropolitan[] = {
|
||||
static const AirportTileTable * const _tile_table_metropolitan[] = {
|
||||
_tile_table_metropolitan_0,
|
||||
};
|
||||
|
||||
/** Tiles for International Airport (large) - 2 runways */
|
||||
static AirportTileTable _tile_table_international_0[] = {
|
||||
static const AirportTileTable _tile_table_international_0[] = {
|
||||
MK(0, 0, APT_RUNWAY_END_FENCE_NW),
|
||||
MK(1, 0, APT_RUNWAY_FENCE_NW),
|
||||
MK(2, 0, APT_RUNWAY_FENCE_NW),
|
||||
@@ -221,12 +221,12 @@ static AirportTileTable _tile_table_international_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_international[] = {
|
||||
static const AirportTileTable * const _tile_table_international[] = {
|
||||
_tile_table_international_0,
|
||||
};
|
||||
|
||||
/** Tiles for International Airport (large) - 2 runways */
|
||||
static AirportTileTable _tile_table_intercontinental_0[] = {
|
||||
static const AirportTileTable _tile_table_intercontinental_0[] = {
|
||||
MK(0, 0, APT_RADAR_FENCE_NE),
|
||||
MK(1, 0, APT_RUNWAY_END_FENCE_NE_NW),
|
||||
MK(2, 0, APT_RUNWAY_FENCE_NW),
|
||||
@@ -329,22 +329,22 @@ static AirportTileTable _tile_table_intercontinental_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_intercontinental[] = {
|
||||
static const AirportTileTable * const _tile_table_intercontinental[] = {
|
||||
_tile_table_intercontinental_0,
|
||||
};
|
||||
|
||||
/** Tiles for Heliport */
|
||||
static AirportTileTable _tile_table_heliport_0[] = {
|
||||
static const AirportTileTable _tile_table_heliport_0[] = {
|
||||
MK(0, 0, APT_HELIPORT),
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_heliport[] = {
|
||||
static const AirportTileTable * const _tile_table_heliport[] = {
|
||||
_tile_table_heliport_0,
|
||||
};
|
||||
|
||||
/** Tiles for Helidepot */
|
||||
static AirportTileTable _tile_table_helidepot_0[] = {
|
||||
static const AirportTileTable _tile_table_helidepot_0[] = {
|
||||
MK(0, 0, APT_LOW_BUILDING_FENCE_N),
|
||||
MK(1, 0, APT_DEPOT_SE),
|
||||
MK(0, 1, APT_HELIPAD_2_FENCE_NE_SE),
|
||||
@@ -352,12 +352,12 @@ static AirportTileTable _tile_table_helidepot_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_helidepot[] = {
|
||||
static const AirportTileTable * const _tile_table_helidepot[] = {
|
||||
_tile_table_helidepot_0,
|
||||
};
|
||||
|
||||
/** Tiles for Helistation */
|
||||
static AirportTileTable _tile_table_helistation_0[] = {
|
||||
static const AirportTileTable _tile_table_helistation_0[] = {
|
||||
MK(0, 0, APT_DEPOT_SE),
|
||||
MK(1, 0, APT_LOW_BUILDING_FENCE_NW),
|
||||
MK(2, 0, APT_HELIPAD_3_FENCE_NW),
|
||||
@@ -369,11 +369,11 @@ static AirportTileTable _tile_table_helistation_0[] = {
|
||||
MKEND
|
||||
};
|
||||
|
||||
static AirportTileTable *_tile_table_helistation[] = {
|
||||
static const AirportTileTable * const _tile_table_helistation[] = {
|
||||
_tile_table_helistation_0,
|
||||
};
|
||||
|
||||
static Direction _default_airports_rotation[] = {
|
||||
static const Direction _default_airports_rotation[] = {
|
||||
DIR_N,
|
||||
};
|
||||
|
||||
@@ -410,7 +410,7 @@ extern const AirportSpec _origin_airport_specs[] = {
|
||||
|
||||
assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
|
||||
|
||||
AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, NULL, _default_airports_rotation, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, 0, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, 0, false);
|
||||
const AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, NULL, _default_airports_rotation, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, 0, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, 0, false);
|
||||
|
||||
#undef AS
|
||||
#undef AS_ND
|
||||
|
||||
@@ -19,7 +19,8 @@ static const SettingDesc _company_settings[] = {
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname, $orderproc),
|
||||
SDT_NULL = SDT_NULL($length, $from, $to, $extver),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -36,6 +37,7 @@ to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
patxname = NULL
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -118,35 +118,36 @@ enum StringControlCode {
|
||||
* It uses a "stack" of bytes and reads from there.
|
||||
*/
|
||||
SCC_NEWGRF_FIRST,
|
||||
SCC_NEWGRF_PRINT_DWORD_SIGNED = SCC_NEWGRF_FIRST, ///< Read 4 bytes from the stack
|
||||
SCC_NEWGRF_PRINT_WORD_SIGNED, ///< Read 2 bytes from the stack as signed value
|
||||
SCC_NEWGRF_PRINT_BYTE_SIGNED, ///< Read 1 byte from the stack as signed value
|
||||
SCC_NEWGRF_PRINT_WORD_UNSIGNED, ///< Read 2 bytes from the stack as unsigned value
|
||||
SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< Read 4 bytes from the stack as currency
|
||||
SCC_NEWGRF_PRINT_WORD_STRING_ID, ///< Read 2 bytes from the stack as String ID
|
||||
SCC_NEWGRF_PRINT_WORD_DATE_LONG, ///< Read 2 bytes from the stack as base 1920 date
|
||||
SCC_NEWGRF_PRINT_WORD_DATE_SHORT, ///< Read 2 bytes from the stack as base 1920 date
|
||||
SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed
|
||||
SCC_NEWGRF_PRINT_WORD_VOLUME_LONG, ///< Read 2 bytes from the stack as long signed volume
|
||||
SCC_NEWGRF_PRINT_WORD_WEIGHT_LONG, ///< Read 2 bytes from the stack as long unsigned weight
|
||||
SCC_NEWGRF_PRINT_WORD_STATION_NAME, ///< Read 2 bytes from the stack as station name
|
||||
SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< Read 8 bytes from the stack as currency
|
||||
SCC_NEWGRF_PRINT_BYTE_HEX, ///< Read 1 byte from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_WORD_HEX, ///< Read 2 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_DWORD_HEX, ///< Read 4 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_QWORD_HEX, ///< Read 8 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_DWORD_DATE_LONG, ///< Read 4 bytes from the stack as base 0 date
|
||||
SCC_NEWGRF_PRINT_DWORD_DATE_SHORT, ///< Read 4 bytes from the stack as base 0 date
|
||||
SCC_NEWGRF_PRINT_WORD_POWER, ///< Read 2 bytes from the stack as unsigned power
|
||||
SCC_NEWGRF_PRINT_WORD_VOLUME_SHORT, ///< Read 2 bytes from the stack as short signed volume
|
||||
SCC_NEWGRF_PRINT_WORD_WEIGHT_SHORT, ///< Read 2 bytes from the stack as short unsigned weight
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_LONG, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_SHORT, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_TINY, ///< Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PUSH_WORD, ///< Pushes 2 bytes onto the stack
|
||||
SCC_NEWGRF_UNPRINT, ///< "Unprints" the given number of bytes from the string
|
||||
SCC_NEWGRF_DISCARD_WORD, ///< Discard the next two bytes
|
||||
SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< Rotate the top 4 words of the stack (W4 W1 W2 W3)
|
||||
SCC_NEWGRF_PRINT_DWORD_SIGNED = SCC_NEWGRF_FIRST, ///< 7B: Read 4 bytes from the stack
|
||||
SCC_NEWGRF_PRINT_WORD_SIGNED, ///< 7C: Read 2 bytes from the stack as signed value
|
||||
SCC_NEWGRF_PRINT_BYTE_SIGNED, ///< 7D: Read 1 byte from the stack as signed value
|
||||
SCC_NEWGRF_PRINT_WORD_UNSIGNED, ///< 7E: Read 2 bytes from the stack as unsigned value
|
||||
SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< 8F: Read 4 bytes from the stack as currency
|
||||
SCC_NEWGRF_PRINT_WORD_STRING_ID, ///< 81: Read 2 bytes from the stack as String ID
|
||||
SCC_NEWGRF_PRINT_WORD_DATE_LONG, ///< 82: Read 2 bytes from the stack as base 1920 date
|
||||
SCC_NEWGRF_PRINT_WORD_DATE_SHORT, ///< 83: Read 2 bytes from the stack as base 1920 date
|
||||
SCC_NEWGRF_PRINT_WORD_SPEED, ///< 84: Read 2 bytes from the stack as signed speed
|
||||
SCC_NEWGRF_PRINT_WORD_VOLUME_LONG, ///< 87: Read 2 bytes from the stack as long signed volume
|
||||
SCC_NEWGRF_PRINT_WORD_WEIGHT_LONG, ///< 9A 0D: Read 2 bytes from the stack as long unsigned weight
|
||||
SCC_NEWGRF_PRINT_WORD_STATION_NAME, ///< 9A 0C: Read 2 bytes from the stack as station name
|
||||
SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< 9A 01: Read 8 bytes from the stack as currency
|
||||
SCC_NEWGRF_PRINT_BYTE_HEX, ///< 9A 06: Read 1 byte from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_WORD_HEX, ///< 9A 07: Read 2 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_DWORD_HEX, ///< 9A 08: Read 4 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_QWORD_HEX, ///< 9A 0B: Read 8 bytes from the stack and print it as hex
|
||||
SCC_NEWGRF_PRINT_DWORD_DATE_LONG, ///< 9A 16: Read 4 bytes from the stack as base 0 date
|
||||
SCC_NEWGRF_PRINT_DWORD_DATE_SHORT, ///< 9A 17: Read 4 bytes from the stack as base 0 date
|
||||
SCC_NEWGRF_PRINT_WORD_POWER, ///< 9A 18: Read 2 bytes from the stack as unsigned power
|
||||
SCC_NEWGRF_PRINT_WORD_VOLUME_SHORT, ///< 9A 19: Read 2 bytes from the stack as short signed volume
|
||||
SCC_NEWGRF_PRINT_WORD_WEIGHT_SHORT, ///< 9A 1A: Read 2 bytes from the stack as short unsigned weight
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_LONG, ///< 9A 1B: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_SHORT, ///< 9A 1C: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_TINY, ///< 9A 1D: Read 2 + 2 bytes from the stack as cargo type (translated) and unsigned cargo amount
|
||||
SCC_NEWGRF_PRINT_WORD_CARGO_NAME, ///< 9A 1E: Read 2 bytes from the stack as cargo name
|
||||
SCC_NEWGRF_PUSH_WORD, ///< 9A 03: Pushes 2 bytes onto the stack
|
||||
SCC_NEWGRF_UNPRINT, ///< 9A 04: "Unprints" the given number of bytes from the string
|
||||
SCC_NEWGRF_DISCARD_WORD, ///< 85: Discard the next two bytes
|
||||
SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< 86: Rotate the top 4 words of the stack (W4 W1 W2 W3)
|
||||
SCC_NEWGRF_LAST = SCC_NEWGRF_ROTATE_TOP_4_WORDS,
|
||||
|
||||
SCC_NEWGRF_STRINL, ///< Inline another string at the current position, StringID is encoded in the string
|
||||
|
||||
@@ -11,7 +11,7 @@ static const SettingDesc _currency_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDT_CHR = SDT_CHR($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_END = SDT_END()
|
||||
@@ -29,6 +29,7 @@ from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ static const uint ELRAIL_ELEVATION = 10;
|
||||
/** Wires that a draw one level higher than the north corner. */
|
||||
static const uint ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT;
|
||||
|
||||
static const SortableSpriteStruct CatenarySpriteData[] = {
|
||||
static const SortableSpriteStruct RailCatenarySpriteData[] = {
|
||||
/* X direction
|
||||
* Flat tiles:
|
||||
* Wires */
|
||||
@@ -392,14 +392,14 @@ static const SortableSpriteStruct CatenarySpriteData[] = {
|
||||
{ WSO_EW_E, 15, 8, 3, 3, 1, ELRAIL_ELEVATION } //!33: LOWER trackbit wire, pylon on both ends
|
||||
};
|
||||
|
||||
static const SortableSpriteStruct CatenarySpriteData_Depot[] = {
|
||||
static const SortableSpriteStruct RailCatenarySpriteData_Depot[] = {
|
||||
{ WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE depot exit
|
||||
{ WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE depot exit
|
||||
{ WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW depot exit
|
||||
{ WSO_ENTRANCE_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW depot exit
|
||||
};
|
||||
|
||||
static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = {
|
||||
static const SortableSpriteStruct RailCatenarySpriteData_Tunnel[] = {
|
||||
{ WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE tunnel exit
|
||||
{ WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE tunnel exit
|
||||
{ WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW tunnel exit
|
||||
@@ -419,7 +419,7 @@ static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = {
|
||||
* <li>Position of the Pylon relative to the track</li>
|
||||
* <li>Position of the Pylon inside the tile</li></ol>
|
||||
*/
|
||||
enum CatenarySprite {
|
||||
enum RailCatenarySprite {
|
||||
WIRE_X_FLAT_SW,
|
||||
WIRE_X_FLAT_NE,
|
||||
WIRE_X_FLAT_BOTH,
|
||||
@@ -471,7 +471,7 @@ enum CatenarySprite {
|
||||
* c) the second
|
||||
* d) both
|
||||
* PCP exists.*/
|
||||
static const CatenarySprite Wires[5][TRACK_END][4] = {
|
||||
static const RailCatenarySprite Wires[5][TRACK_END][4] = {
|
||||
{ // Tileh == 0
|
||||
{INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH},
|
||||
{INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH},
|
||||
|
||||
@@ -42,12 +42,12 @@ static const SettingDesc _gameopt_settings[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_GENERAL = SDTG_GENERAL($name, $sdt_cmd, $sle_cmd, $type, $flags, $guiflags, $var, $length, $def, $min, $max, $interval, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDT_NULL = SDT_NULL($length, $from, $to, $extver),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat, $extver, NULL),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -63,6 +63,7 @@ from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $guiflags, $var, $def,
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_STR = SDTG_STR($name, $type, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDTG_END = SDTG_END()
|
||||
|
||||
[defaults]
|
||||
@@ -36,6 +36,7 @@ from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define NIP_END() { NULL, 0, 0, 0, 0 }
|
||||
|
||||
/* Helper for filling callback tables */
|
||||
#define NIC(cb_id, base, variable, bit) { #cb_id, cpp_offsetof(base, variable), cpp_sizeof(base, variable), bit, cb_id }
|
||||
#define NIC(cb_id, base, variable, bit) { #cb_id, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), bit, cb_id }
|
||||
#define NIC_END() { NULL, 0, 0, 0, 0 }
|
||||
|
||||
/* Helper for filling variable tables */
|
||||
|
||||
@@ -61,11 +61,14 @@ static size_t ConvertLandscape(const char *value);
|
||||
|
||||
/* Macros for various objects to go in the configuration file.
|
||||
* This section is for global variables */
|
||||
#define SDTG_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, NULL, cat), SLEG_GENERAL_X(sle_cmd, var, type | flags, length, from, to, extver), patxname}
|
||||
#define SDTG_GENERAL2(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, NULL, cat), SLEG_GENERAL_X(sle_cmd, var, type | flags, length, from, to, extver), patxname, NULL, orderproc}
|
||||
|
||||
#define SDTG_VAR(name, type, flags, guiflags, var, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
#define SDTG_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL2(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, strhelp, strval, proc, from, to, cat, extver, patxname, NULL)
|
||||
|
||||
#define SDTG_VAR(name, type, flags, guiflags, var, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)\
|
||||
SDTG_GENERAL2(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)
|
||||
|
||||
#define SDTG_BOOL(name, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL(name, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, var, 0, def, 0, 1, 0, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
@@ -83,17 +86,20 @@ static size_t ConvertLandscape(const char *value);
|
||||
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
|
||||
#define SDTG_NULL(length, from, to, extver)\
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_NULL_X(length, from, to, extver), NULL}
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_NULL_X(length, from, to, extver), NULL, NULL, NULL}
|
||||
|
||||
#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_END(), NULL}
|
||||
#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_END(), NULL, NULL, NULL}
|
||||
|
||||
/* Macros for various objects to go in the configuration file.
|
||||
* This section is for structures where their various members are saved */
|
||||
#define SDT_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, strhelp, strval, proc, load, from, to, cat, extver, patxname)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, load, cat), SLE_GENERAL_X(sle_cmd, base, var, type | flags, length, from, to, extver), patxname}
|
||||
#define SDT_GENERAL2(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, strhelp, strval, proc, load, from, to, cat, extver, patxname, orderproc)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, load, cat), SLE_GENERAL_X(sle_cmd, base, var, type | flags, length, from, to, extver), patxname, NULL, orderproc}
|
||||
|
||||
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDT_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, strhelp, strval, proc, NULL, from, to, cat, extver, patxname)
|
||||
#define SDT_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, strhelp, strval, proc, load, from, to, cat, extver, patxname)\
|
||||
SDT_GENERAL2(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, strhelp, strval, proc, load, from, to, cat, extver, patxname, NULL)
|
||||
|
||||
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)\
|
||||
SDT_GENERAL2(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, strhelp, strval, proc, NULL, from, to, cat, extver, patxname, orderproc)
|
||||
|
||||
#define SDT_BOOL(base, var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDT_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, base, var, 1, def, 0, 1, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat, extver, patxname)
|
||||
@@ -114,11 +120,11 @@ static size_t ConvertLandscape(const char *value);
|
||||
SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, strhelp, strval, proc, NULL, from, to, cat, extver, patxname)
|
||||
|
||||
#define SDT_NULL(length, from, to, extver)\
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_CONDNULL_X(length, from, to, extver), NULL}
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_CONDNULL_X(length, from, to, extver), NULL, NULL, NULL}
|
||||
|
||||
|
||||
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, min, max, interval, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)\
|
||||
SDTG_GENERAL2(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, min, max, interval, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname, orderproc)
|
||||
|
||||
#define SDTC_BOOL(var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, _settings_client.var, 1, def, 0, 1, 0, NULL, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
@@ -132,5 +138,8 @@ static size_t ConvertLandscape(const char *value);
|
||||
#define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, cat, extver, patxname)\
|
||||
SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat, extver, patxname)
|
||||
|
||||
#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_END(), NULL}
|
||||
#define SDT_XREF(from, to, extver, xref)\
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_CONDNULL_X(0, from, to, extver), NULL, xref, NULL}
|
||||
|
||||
#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_END(), NULL, NULL, NULL}
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ static bool CheckSharingAir(int32 p1);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
/* End - Callback Functions for the various settings */
|
||||
|
||||
/* Begin - GUI order callbacks */
|
||||
|
||||
/* End - GUI order callbacks */
|
||||
|
||||
/* Some settings do not need to be synchronised when playing in multiplayer.
|
||||
* These include for example the GUI settings and will not be saved with the
|
||||
* savegame.
|
||||
@@ -69,18 +73,19 @@ const SettingDesc _settings[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname, $orderproc),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_LIST = SDTC_LIST( $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_STR = SDTC_STR( $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname, $orderproc),
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat, $extver, $patxname),
|
||||
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, $patxname, $orderproc),
|
||||
SDT_NULL = SDT_NULL($length, $from, $to, $extver),
|
||||
SDT_XREF = SDT_XREF( $from, $to, $extver, $xref),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -97,6 +102,8 @@ to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
patxname = NULL
|
||||
xref = <this parameter must be set>
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
@@ -766,7 +773,7 @@ base = GameSettings
|
||||
var = vehicle.train_acceleration_model
|
||||
type = SLE_UINT8
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 0
|
||||
def = 1
|
||||
min = 0
|
||||
max = 1
|
||||
interval = 1
|
||||
@@ -781,7 +788,7 @@ var = vehicle.roadveh_acceleration_model
|
||||
type = SLE_UINT8
|
||||
from = 139
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 0
|
||||
def = 1
|
||||
min = 0
|
||||
max = 1
|
||||
interval = 1
|
||||
@@ -2699,6 +2706,14 @@ str = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING
|
||||
strhelp = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.right_mouse_wnd_close
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE
|
||||
strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.measure_tooltip
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
#include "../core/enum_type.hpp"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
static const char * const _name_original_english_1[] = {
|
||||
"Great ",
|
||||
"Little ",
|
||||
|
||||
@@ -18,7 +18,7 @@ static const SettingDescGlobVarList _win32_settings[] = {
|
||||
#endif /* WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDTG_END = SDTG_END()
|
||||
|
||||
[defaults]
|
||||
|
||||
@@ -13,7 +13,7 @@ static const SettingDesc _window_settings[] = {
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extver, NULL, $orderproc),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -30,6 +30,7 @@ from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
extver = SlXvFeatureTest()
|
||||
orderproc = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user