Merge remote-tracking branch 'upstream/master'

This commit is contained in:
pelya
2021-01-25 00:50:42 +02:00
1076 changed files with 25433 additions and 61762 deletions
+87
View File
@@ -0,0 +1,87 @@
set(GENERATED_BINARY_DIR ${CMAKE_BINARY_DIR}/generated)
set(TABLE_BINARY_DIR ${GENERATED_BINARY_DIR}/table)
set(TABLE_INI_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/company_settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/currency_settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/gameopt_settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/misc_settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/win32_settings.ini
${CMAKE_CURRENT_SOURCE_DIR}/window_settings.ini
)
if (HOST_BINARY_DIR)
include(${HOST_BINARY_DIR}/settingsgen.cmake)
endif()
# Generate a command and target to create the settings table
add_custom_command_timestamp(OUTPUT ${TABLE_BINARY_DIR}/settings.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${TABLE_BINARY_DIR}
COMMAND settingsgen
-o ${TABLE_BINARY_DIR}/settings.h
-b ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble
-a ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble
${TABLE_INI_SOURCE_FILES}
DEPENDS settingsgen ${TABLE_INI_SOURCE_FILES}
${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble
${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating table/settings.h"
)
add_custom_target_timestamp(table_settings
DEPENDS
${TABLE_BINARY_DIR}/settings.h
)
add_library(settings
INTERFACE
)
target_include_directories(settings
INTERFACE
${GENERATED_BINARY_DIR}
)
add_dependencies(settings
table_settings
)
add_library(openttd::settings ALIAS settings)
add_files(
airport_defaults.h
airport_movement.h
airporttile_ids.h
airporttiles.h
animcursors.h
autorail.h
bridge_land.h
build_industry.h
cargo_const.h
clear_land.h
control_codes.h
elrail_data.h
engines.h
genland.h
heightmap_colours.h
industry_land.h
landscape_sprite.h
newgrf_debug_data.h
object_land.h
palette_convert.h
palettes.h
pricebase.h
railtypes.h
road_land.h
roadtypes.h
roadveh_movement.h
sprites.h
station_land.h
strgen_tables.h
string_colours.h
town_land.h
townname.h
track_land.h
train_cmd.h
tree_land.h
unicode.h
water_land.h
)
+1 -1
View File
@@ -406,7 +406,7 @@ extern const AirportSpec _origin_airport_specs[] = {
AS_GENERIC(&_airportfta_oilrig, nullptr, _default_airports_rotation, 0, nullptr, 0, 1, 1, 0, 4, 0, 0, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, 0, false),
};
assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
static_assert(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
const AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, nullptr, _default_airports_rotation, 0, nullptr, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, 0, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, 0, false);
+1 -1
View File
@@ -104,7 +104,7 @@ static const AirportTileSpec _origin_airporttile_specs[] = {
AT(3, 1), // APT_GRASS_FENCE_NE_FLAG_2
};
assert_compile(NEW_AIRPORTTILE_OFFSET == lengthof(_origin_airporttile_specs));
static_assert(NEW_AIRPORTTILE_OFFSET == lengthof(_origin_airporttile_specs));
#undef AT_NOANIM
#undef AT
+76 -142
View File
@@ -7,157 +7,91 @@
/** @file cargo_const.h Table of all default cargo types */
/** Construction macro for a #CargoSpec structure. */
#define MK(bt, label, c, e, f, g, h, fr, te, ks1, ks2, ks3, ks4, ks5, l, m, cmult) \
{bt, label, c, c, e, cmult, f, {g, h}, fr, te, 0, 0, ks1, ks2, ks3, ks4, ks5, l, m, nullptr, nullptr, 0}
/** Construction macros for the #CargoSpec StringID entries. */
#define MK_STR_CARGO_PLURAL(label_plural) STR_CARGO_PLURAL_ ## label_plural
#define MK_STR_CARGO_SINGULAR(label_singular) STR_CARGO_SINGULAR_ ## label_singular
#define MK_STR_QUANTITY(label_plural) STR_QUANTITY_ ## label_plural
#define MK_STR_ABBREV(label_plural) STR_ABBREV_ ## label_plural
/** Construction macros for the #CargoSpec SpriteID entry. */
#define MK_SPRITE(label_plural) SPR_CARGO_ ## label_plural
/**
* Construction macro for a #CargoSpec structure.
* The order of arguments matches the order in which they are defined in #CargoSpec.
* Some macros are used to automatically expand to the correct StringID consts, this
* means that adding/changing a cargo spec requires updating of the following strings:
* - STR_CARGO_PLURAL_<str_plural>
* - STR_CARGO_SINGULAR_<str_singular>
* - STR_QUANTITY_<str_plural>
* - STR_ABBREV_<str_plural>
* And the following sprite:
* - SPR_CARGO_<str_plural>
*
* @param bt Cargo bit number, is #INVALID_CARGO for a non-used spec.
* @param label Unique label of the cargo type.
* @param colour CargoSpec->legend_colour and CargoSpec->rating_colour.
* @param weight Weight of a single unit of this cargo type in 1/16 ton (62.5 kg).
* @param mult Capacity multiplier for vehicles. (8 fractional bits).
* @param ip CargoSpec->initial_payment.
* @param td1 CargoSpec->transit_days[0].
* @param td2 CargoSpec->transit_days[1].
* @param freight Cargo type is considered to be freight (affects train freight multiplier).
* @param te The effect that delivering this cargo type has on towns. Also affects destination of subsidies.
* @param str_plural The name suffix used to populate CargoSpec->name, CargoSpec->quantifier,
* CargoSpec->abbrev and CargoSpec->sprite. See above for more detailed information.
* @param str_singular The name suffix used to populate CargoSpec->name_single. See above for more information.
* @param str_volume Name of a single unit of cargo of this type.
* @param classes Classes of this cargo type. @see CargoClass
*/
#define MK(bt, label, colour, weight, mult, ip, td1, td2, freight, te, str_plural, str_singular, str_volume, classes) \
{bt, label, colour, colour, weight, mult, ip, {td1, td2}, freight, te, 0, 0, \
MK_STR_CARGO_PLURAL(str_plural), MK_STR_CARGO_SINGULAR(str_singular), str_volume, MK_STR_QUANTITY(str_plural), MK_STR_ABBREV(str_plural), \
MK_SPRITE(str_plural), classes, nullptr, nullptr, 0}
/** Cargo types available by default. */
static const CargoSpec _default_cargo[] = {
MK( 0, 'PASS', 152, 1, 3185, 0, 24, false, TE_PASSENGERS,
STR_CARGO_PLURAL_PASSENGERS, STR_CARGO_SINGULAR_PASSENGER, STR_PASSENGERS, STR_QUANTITY_PASSENGERS, STR_ABBREV_PASSENGERS,
SPR_CARGO_PASSENGER, CC_PASSENGERS, 0x400),
MK( 1, 'COAL', 6, 16, 5916, 7, 255, true, TE_NONE,
STR_CARGO_PLURAL_COAL, STR_CARGO_SINGULAR_COAL, STR_TONS, STR_QUANTITY_COAL, STR_ABBREV_COAL,
SPR_CARGO_COAL, CC_BULK, 0x100),
MK( 2, 'MAIL', 15, 4, 4550, 20, 90, false, TE_MAIL,
STR_CARGO_PLURAL_MAIL, STR_CARGO_SINGULAR_MAIL, STR_BAGS, STR_QUANTITY_MAIL, STR_ABBREV_MAIL,
SPR_CARGO_MAIL, CC_MAIL, 0x200),
MK( 0, 'PASS', 152, 1, 0x400, 3185, 0, 24, false, TE_PASSENGERS, PASSENGERS, PASSENGER, STR_PASSENGERS, CC_PASSENGERS),
MK( 1, 'COAL', 6, 16, 0x100, 5916, 7, 255, true, TE_NONE, COAL, COAL, STR_TONS, CC_BULK),
MK( 2, 'MAIL', 15, 4, 0x200, 4550, 20, 90, false, TE_MAIL, MAIL, MAIL, STR_BAGS, CC_MAIL),
/* Oil in temperate and arctic */
MK( 3, 'OIL_', 174, 16, 4437, 25, 255, true, TE_NONE,
STR_CARGO_PLURAL_OIL, STR_CARGO_SINGULAR_OIL, STR_LITERS, STR_QUANTITY_OIL, STR_ABBREV_OIL,
SPR_CARGO_OIL, CC_LIQUID, 0x100),
MK( 3, 'OIL_', 174, 16, 0x100, 4437, 25, 255, true, TE_NONE, OIL, OIL, STR_LITERS, CC_LIQUID),
/* Oil in subtropic */
MK( 3, 'OIL_', 174, 16, 4892, 25, 255, true, TE_NONE,
STR_CARGO_PLURAL_OIL, STR_CARGO_SINGULAR_OIL, STR_LITERS, STR_QUANTITY_OIL, STR_ABBREV_OIL,
SPR_CARGO_OIL, CC_LIQUID, 0x100),
MK( 4, 'LVST', 208, 3, 4322, 4, 18, true, TE_NONE,
STR_CARGO_PLURAL_LIVESTOCK, STR_CARGO_SINGULAR_LIVESTOCK, STR_ITEMS, STR_QUANTITY_LIVESTOCK, STR_ABBREV_LIVESTOCK,
SPR_CARGO_LIVESTOCK, CC_PIECE_GOODS, 0x100),
MK( 5, 'GOOD', 194, 8, 6144, 5, 28, true, TE_GOODS,
STR_CARGO_PLURAL_GOODS, STR_CARGO_SINGULAR_GOODS, STR_CRATES, STR_QUANTITY_GOODS, STR_ABBREV_GOODS,
SPR_CARGO_GOODS, CC_EXPRESS, 0x200),
MK( 6, 'GRAI', 191, 16, 4778, 4, 40, true, TE_NONE,
STR_CARGO_PLURAL_GRAIN, STR_CARGO_SINGULAR_GRAIN, STR_TONS, STR_QUANTITY_GRAIN, STR_ABBREV_GRAIN,
SPR_CARGO_GRAIN, CC_BULK, 0x100),
MK( 6, 'WHEA', 191, 16, 4778, 4, 40, true, TE_NONE,
STR_CARGO_PLURAL_WHEAT, STR_CARGO_SINGULAR_WHEAT, STR_TONS, STR_QUANTITY_WHEAT, STR_ABBREV_WHEAT,
SPR_CARGO_GRAIN, CC_BULK, 0x100),
MK( 6, 'MAIZ', 191, 16, 4322, 4, 40, true, TE_NONE,
STR_CARGO_PLURAL_MAIZE, STR_CARGO_SINGULAR_MAIZE, STR_TONS, STR_QUANTITY_MAIZE, STR_ABBREV_MAIZE,
SPR_CARGO_GRAIN, CC_BULK, 0x100),
MK( 3, 'OIL_', 174, 16, 0x100, 4892, 25, 255, true, TE_NONE, OIL, OIL, STR_LITERS, CC_LIQUID),
MK( 4, 'LVST', 208, 3, 0x100, 4322, 4, 18, true, TE_NONE, LIVESTOCK, LIVESTOCK, STR_ITEMS, CC_PIECE_GOODS),
MK( 5, 'GOOD', 194, 8, 0x200, 6144, 5, 28, true, TE_GOODS, GOODS, GOODS, STR_CRATES, CC_EXPRESS),
MK( 6, 'GRAI', 191, 16, 0x100, 4778, 4, 40, true, TE_NONE, GRAIN, GRAIN, STR_TONS, CC_BULK),
MK( 6, 'WHEA', 191, 16, 0x100, 4778, 4, 40, true, TE_NONE, WHEAT, WHEAT, STR_TONS, CC_BULK),
MK( 6, 'MAIZ', 191, 16, 0x100, 4322, 4, 40, true, TE_NONE, MAIZE, MAIZE, STR_TONS, CC_BULK),
/* Wood in temperate and arctic */
MK( 7, 'WOOD', 84, 16, 5005, 15, 255, true, TE_NONE,
STR_CARGO_PLURAL_WOOD, STR_CARGO_SINGULAR_WOOD, STR_TONS, STR_QUANTITY_WOOD, STR_ABBREV_WOOD,
SPR_CARGO_WOOD, CC_PIECE_GOODS, 0x100),
MK( 7, 'WOOD', 84, 16, 0x100, 5005, 15, 255, true, TE_NONE, WOOD, WOOD, STR_TONS, CC_PIECE_GOODS),
/* Wood in subtropic */
MK( 7, 'WOOD', 84, 16, 7964, 15, 255, true, TE_NONE,
STR_CARGO_PLURAL_WOOD, STR_CARGO_SINGULAR_WOOD, STR_TONS, STR_QUANTITY_WOOD, STR_ABBREV_WOOD,
SPR_CARGO_WOOD, CC_PIECE_GOODS, 0x100),
MK( 8, 'IORE', 184, 16, 5120, 9, 255, true, TE_NONE,
STR_CARGO_PLURAL_IRON_ORE, STR_CARGO_SINGULAR_IRON_ORE, STR_TONS, STR_QUANTITY_IRON_ORE, STR_ABBREV_IRON_ORE,
SPR_CARGO_IRON_ORE, CC_BULK, 0x100),
MK( 9, 'STEL', 10, 16, 5688, 7, 255, true, TE_NONE,
STR_CARGO_PLURAL_STEEL, STR_CARGO_SINGULAR_STEEL, STR_TONS, STR_QUANTITY_STEEL, STR_ABBREV_STEEL,
SPR_CARGO_STEEL, CC_PIECE_GOODS, 0x100),
MK( 10, 'VALU', 202, 2, 7509, 1, 32, true, TE_NONE,
STR_CARGO_PLURAL_VALUABLES, STR_CARGO_SINGULAR_VALUABLES, STR_BAGS, STR_QUANTITY_VALUABLES, STR_ABBREV_VALUABLES,
SPR_CARGO_VALUES_GOLD, CC_ARMOURED, 0x100),
MK( 10, 'GOLD', 202, 8, 5802, 10, 40, true, TE_NONE,
STR_CARGO_PLURAL_GOLD, STR_CARGO_SINGULAR_GOLD, STR_BAGS, STR_QUANTITY_GOLD, STR_ABBREV_GOLD,
SPR_CARGO_VALUES_GOLD, CC_ARMOURED, 0x100),
MK( 10, 'DIAM', 202, 2, 5802, 10, 255, true, TE_NONE,
STR_CARGO_PLURAL_DIAMONDS, STR_CARGO_SINGULAR_DIAMOND, STR_BAGS, STR_QUANTITY_DIAMONDS, STR_ABBREV_DIAMONDS,
SPR_CARGO_DIAMONDS, CC_ARMOURED, 0x100),
MK( 11, 'PAPR', 10, 16, 5461, 7, 60, true, TE_NONE,
STR_CARGO_PLURAL_PAPER, STR_CARGO_SINGULAR_PAPER, STR_TONS, STR_QUANTITY_PAPER, STR_ABBREV_PAPER,
SPR_CARGO_PAPER, CC_PIECE_GOODS, 0x100),
MK( 12, 'FOOD', 48, 16, 5688, 0, 30, true, TE_FOOD,
STR_CARGO_PLURAL_FOOD, STR_CARGO_SINGULAR_FOOD, STR_TONS, STR_QUANTITY_FOOD, STR_ABBREV_FOOD,
SPR_CARGO_FOOD, CC_EXPRESS | CC_REFRIGERATED, 0x100),
MK( 13, 'FRUT', 208, 16, 4209, 0, 15, true, TE_NONE,
STR_CARGO_PLURAL_FRUIT, STR_CARGO_SINGULAR_FRUIT, STR_TONS, STR_QUANTITY_FRUIT, STR_ABBREV_FRUIT,
SPR_CARGO_FRUIT, CC_BULK | CC_REFRIGERATED, 0x100),
MK( 14, 'CORE', 184, 16, 4892, 12, 255, true, TE_NONE,
STR_CARGO_PLURAL_COPPER_ORE, STR_CARGO_SINGULAR_COPPER_ORE, STR_TONS, STR_QUANTITY_COPPER_ORE, STR_ABBREV_COPPER_ORE,
SPR_CARGO_COPPER_ORE, CC_BULK, 0x100),
MK( 15, 'WATR', 10, 16, 4664, 20, 80, true, TE_WATER,
STR_CARGO_PLURAL_WATER, STR_CARGO_SINGULAR_WATER, STR_LITERS, STR_QUANTITY_WATER, STR_ABBREV_WATER,
SPR_CARGO_WATERCOLA, CC_LIQUID, 0x100),
MK( 16, 'RUBR', 6, 16, 4437, 2, 20, true, TE_NONE,
STR_CARGO_PLURAL_RUBBER, STR_CARGO_SINGULAR_RUBBER, STR_LITERS, STR_QUANTITY_RUBBER, STR_ABBREV_RUBBER,
SPR_CARGO_RUBBER, CC_LIQUID, 0x100),
MK( 17, 'SUGR', 6, 16, 4437, 20, 255, true, TE_NONE,
STR_CARGO_PLURAL_SUGAR, STR_CARGO_SINGULAR_SUGAR, STR_TONS, STR_QUANTITY_SUGAR, STR_ABBREV_SUGAR,
SPR_CARGO_SUGAR, CC_BULK, 0x100),
MK( 18, 'TOYS', 174, 2, 5574, 25, 255, true, TE_NONE,
STR_CARGO_PLURAL_TOYS, STR_CARGO_SINGULAR_TOY, STR_ITEMS, STR_QUANTITY_TOYS, STR_ABBREV_TOYS,
SPR_CARGO_TOYS, CC_PIECE_GOODS, 0x100),
MK( 19, 'BATT', 208, 4, 4322, 2, 30, true, TE_NONE,
STR_CARGO_PLURAL_BATTERIES, STR_CARGO_SINGULAR_BATTERY, STR_ITEMS, STR_QUANTITY_BATTERIES, STR_ABBREV_BATTERIES,
SPR_CARGO_BATTERIES, CC_PIECE_GOODS, 0x100),
MK( 20, 'SWET', 194, 5, 6144, 8, 40, true, TE_GOODS,
STR_CARGO_PLURAL_CANDY, STR_CARGO_SINGULAR_CANDY, STR_BAGS, STR_QUANTITY_SWEETS, STR_ABBREV_SWEETS,
SPR_CARGO_CANDY, CC_EXPRESS, 0x200),
MK( 21, 'TOFF', 191, 16, 4778, 14, 60, true, TE_NONE,
STR_CARGO_PLURAL_TOFFEE, STR_CARGO_SINGULAR_TOFFEE, STR_TONS, STR_QUANTITY_TOFFEE, STR_ABBREV_TOFFEE,
SPR_CARGO_TOFFEE, CC_BULK, 0x100),
MK( 22, 'COLA', 84, 16, 4892, 5, 75, true, TE_NONE,
STR_CARGO_PLURAL_COLA, STR_CARGO_SINGULAR_COLA, STR_LITERS, STR_QUANTITY_COLA, STR_ABBREV_COLA,
SPR_CARGO_WATERCOLA, CC_LIQUID, 0x100),
MK( 23, 'CTCD', 184, 16, 5005, 10, 25, true, TE_NONE,
STR_CARGO_PLURAL_COTTON_CANDY, STR_CARGO_SINGULAR_COTTON_CANDY, STR_TONS, STR_QUANTITY_CANDYFLOSS, STR_ABBREV_CANDYFLOSS,
SPR_CARGO_COTTONCANDY, CC_BULK, 0x100),
MK( 24, 'BUBL', 10, 1, 5077, 20, 80, true, TE_NONE,
STR_CARGO_PLURAL_BUBBLES, STR_CARGO_SINGULAR_BUBBLE, STR_ITEMS, STR_QUANTITY_BUBBLES, STR_ABBREV_BUBBLES,
SPR_CARGO_BUBBLES, CC_PIECE_GOODS, 0x100),
MK( 25, 'PLST', 202, 16, 4664, 30, 255, true, TE_NONE,
STR_CARGO_PLURAL_PLASTIC, STR_CARGO_SINGULAR_PLASTIC, STR_LITERS, STR_QUANTITY_PLASTIC, STR_ABBREV_PLASTIC,
SPR_CARGO_PLASTIC, CC_LIQUID, 0x100),
MK( 26, 'FZDR', 48, 2, 6250, 30, 50, true, TE_FOOD,
STR_CARGO_PLURAL_FIZZY_DRINKS, STR_CARGO_SINGULAR_FIZZY_DRINK, STR_ITEMS, STR_QUANTITY_FIZZY_DRINKS, STR_ABBREV_FIZZY_DRINKS,
SPR_CARGO_FIZZYDRINK, CC_PIECE_GOODS, 0x100),
MK( 7, 'WOOD', 84, 16, 0x100, 7964, 15, 255, true, TE_NONE, WOOD, WOOD, STR_TONS, CC_PIECE_GOODS),
MK( 8, 'IORE', 184, 16, 0x100, 5120, 9, 255, true, TE_NONE, IRON_ORE, IRON_ORE, STR_TONS, CC_BULK),
MK( 9, 'STEL', 10, 16, 0x100, 5688, 7, 255, true, TE_NONE, STEEL, STEEL, STR_TONS, CC_PIECE_GOODS),
MK( 10, 'VALU', 202, 2, 0x100, 7509, 1, 32, true, TE_NONE, VALUABLES, VALUABLES, STR_BAGS, CC_ARMOURED),
MK( 10, 'GOLD', 202, 8, 0x100, 5802, 10, 40, true, TE_NONE, GOLD, GOLD, STR_BAGS, CC_ARMOURED),
MK( 10, 'DIAM', 202, 2, 0x100, 5802, 10, 255, true, TE_NONE, DIAMONDS, DIAMOND, STR_BAGS, CC_ARMOURED),
MK( 11, 'PAPR', 10, 16, 0x100, 5461, 7, 60, true, TE_NONE, PAPER, PAPER, STR_TONS, CC_PIECE_GOODS),
MK( 12, 'FOOD', 48, 16, 0x100, 5688, 0, 30, true, TE_FOOD, FOOD, FOOD, STR_TONS, CC_EXPRESS | CC_REFRIGERATED),
MK( 13, 'FRUT', 208, 16, 0x100, 4209, 0, 15, true, TE_NONE, FRUIT, FRUIT, STR_TONS, CC_BULK | CC_REFRIGERATED),
MK( 14, 'CORE', 184, 16, 0x100, 4892, 12, 255, true, TE_NONE, COPPER_ORE, COPPER_ORE, STR_TONS, CC_BULK),
MK( 15, 'WATR', 10, 16, 0x100, 4664, 20, 80, true, TE_WATER, WATER, WATER, STR_LITERS, CC_LIQUID),
MK( 16, 'RUBR', 6, 16, 0x100, 4437, 2, 20, true, TE_NONE, RUBBER, RUBBER, STR_LITERS, CC_LIQUID),
MK( 17, 'SUGR', 6, 16, 0x100, 4437, 20, 255, true, TE_NONE, SUGAR, SUGAR, STR_TONS, CC_BULK),
MK( 18, 'TOYS', 174, 2, 0x100, 5574, 25, 255, true, TE_NONE, TOYS, TOY, STR_ITEMS, CC_PIECE_GOODS),
MK( 19, 'BATT', 208, 4, 0x100, 4322, 2, 30, true, TE_NONE, BATTERIES, BATTERY, STR_ITEMS, CC_PIECE_GOODS),
MK( 20, 'SWET', 194, 5, 0x200, 6144, 8, 40, true, TE_GOODS, SWEETS, SWEETS, STR_BAGS, CC_EXPRESS),
MK( 21, 'TOFF', 191, 16, 0x100, 4778, 14, 60, true, TE_NONE, TOFFEE, TOFFEE, STR_TONS, CC_BULK),
MK( 22, 'COLA', 84, 16, 0x100, 4892, 5, 75, true, TE_NONE, COLA, COLA, STR_LITERS, CC_LIQUID),
MK( 23, 'CTCD', 184, 16, 0x100, 5005, 10, 25, true, TE_NONE, CANDYFLOSS, CANDYFLOSS, STR_TONS, CC_BULK),
MK( 24, 'BUBL', 10, 1, 0x100, 5077, 20, 80, true, TE_NONE, BUBBLES, BUBBLE, STR_ITEMS, CC_PIECE_GOODS),
MK( 25, 'PLST', 202, 16, 0x100, 4664, 30, 255, true, TE_NONE, PLASTIC, PLASTIC, STR_LITERS, CC_LIQUID),
MK( 26, 'FZDR', 48, 2, 0x100, 6250, 30, 50, true, TE_FOOD, FIZZY_DRINKS, FIZZY_DRINK, STR_ITEMS, CC_PIECE_GOODS),
/* Void slot in temperate */
MK( 0xFF, 0, 1, 0, 5688, 0, 30, true, TE_NONE,
STR_CARGO_PLURAL_NOTHING, STR_CARGO_SINGULAR_NOTHING, STR_TONS, STR_QUANTITY_NOTHING, STR_ABBREV_NOTHING,
SPR_ASCII_SPACE, CC_NOAVAILABLE, 0x100),
MK(0xFF, 0, 1, 0, 0x100, 5688, 0, 30, true, TE_NONE, NOTHING, NOTHING, STR_TONS, CC_NOAVAILABLE),
/* Void slot in arctic */
MK( 0xFF, 0, 184, 0, 5120, 9, 255, true, TE_NONE,
STR_CARGO_PLURAL_NOTHING, STR_CARGO_SINGULAR_NOTHING, STR_TONS, STR_QUANTITY_NOTHING, STR_ABBREV_NOTHING,
SPR_ASCII_SPACE, CC_NOAVAILABLE, 0x100),
MK(0xFF, 0, 184, 0, 0x100, 5120, 9, 255, true, TE_NONE, NOTHING, NOTHING, STR_TONS, CC_NOAVAILABLE),
};
+1 -1
View File
@@ -38,7 +38,7 @@ cat = SC_ADVANCED
[SDT_BOOL]
base = CompanySettings
var = engine_renew
def = false
def = true
str = STR_CONFIG_SETTING_AUTORENEW_VEHICLE
strhelp = STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT
cat = SC_BASIC
+1 -1
View File
@@ -13,7 +13,7 @@ uint8 _old_units; ///< Old units from old s
/* Most of these strings are used both for gameopt-backward compatibility
* and the settings tables. The rest is here for consistency. */
static const char *_locale_currencies = "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|RON|RUR|SIT|SEK|YTL|SKK|BRL|EEK|custom";
static const char *_locale_units = "imperial|metric|si";
static const char *_locale_units = "imperial|metric|si|gameunits";
static const char *_town_names = "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovak|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan";
static const char *_climates = "temperate|arctic|tropic|toyland";
static const char *_autosave_interval = "off|monthly|quarterly|half year|yearly";
+11 -10
View File
@@ -5,7 +5,7 @@
;
[pre-amble]
extern char _config_language_file[MAX_PATH];
extern std::string _config_language_file;
static const char *_support8bppmodes = "no|system|hardware";
@@ -17,6 +17,7 @@ SDTG_LIST = SDTG_LIST($name, $type, $length, $flags, $guiflags, $var, $def,
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $guiflags, $var, $def, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_STR = SDTG_STR($name, $type, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDTG_END = SDTG_END()
@@ -58,57 +59,57 @@ max = 2
full = _support8bppmodes
cat = SC_BASIC
[SDTG_STR]
[SDTG_SSTR]
name = ""graphicsset""
type = SLE_STRQ
var = BaseGraphics::ini_set
def = nullptr
cat = SC_BASIC
[SDTG_STR]
[SDTG_SSTR]
name = ""soundsset""
type = SLE_STRQ
var = BaseSounds::ini_set
def = nullptr
cat = SC_BASIC
[SDTG_STR]
[SDTG_SSTR]
name = ""musicset""
type = SLE_STRQ
var = BaseMusic::ini_set
def = nullptr
cat = SC_BASIC
[SDTG_STR]
[SDTG_SSTR]
name = ""videodriver""
type = SLE_STRQ
var = _ini_videodriver
def = nullptr
cat = SC_EXPERT
[SDTG_STR]
[SDTG_SSTR]
name = ""musicdriver""
type = SLE_STRQ
var = _ini_musicdriver
def = nullptr
cat = SC_EXPERT
[SDTG_STR]
[SDTG_SSTR]
name = ""sounddriver""
type = SLE_STRQ
var = _ini_sounddriver
def = nullptr
cat = SC_EXPERT
[SDTG_STR]
[SDTG_SSTR]
name = ""blitter""
type = SLE_STRQ
var = _ini_blitter
def = nullptr
[SDTG_STR]
[SDTG_SSTR]
name = ""language""
type = SLE_STRB
type = SLE_STR
var = _config_language_file
def = nullptr
cat = SC_BASIC
+12 -2
View File
@@ -63,7 +63,8 @@ static const NIVariable _niv_vehicles[] = {
NIV(0x4D, "position in articulated vehicle"),
NIV(0x60, "count vehicle id occurrences"),
// 0x61 not useful, since it requires register 0x10F
NIV(0x62, "Curvature/position difference to other vehicle"),
NIV(0x62, "curvature/position difference to other vehicle"),
NIV(0x63, "tile compatibility wrt. track-type"),
NIV_END()
};
@@ -342,6 +343,15 @@ static const NIVariable _niv_industries[] = {
NIV(0x66, "get square of Euclidean distance of closes town"),
NIV(0x67, "count of industry and distance of closest instance"),
NIV(0x68, "count of industry and distance of closest instance with layout filter"),
NIV(0x69, "produced cargo waiting"),
NIV(0x6A, "cargo produced this month"),
NIV(0x6B, "cargo transported this month"),
NIV(0x6C, "cargo produced last month"),
NIV(0x6D, "cargo transported last month"),
NIV(0x6E, "date since cargo was delivered"),
NIV(0x6F, "waiting input cargo"),
NIV(0x70, "production rate"),
NIV(0x71, "percentage of cargo transported last month"),
NIV_END()
};
@@ -620,4 +630,4 @@ static const NIFeature * const _nifeatures[] = {
&_nif_tramtype, // GSF_TRAMTYPES
&_nif_town, // GSF_FAKE_TOWNS
};
assert_compile(lengthof(_nifeatures) == GSF_FAKE_END);
static_assert(lengthof(_nifeatures) == GSF_FAKE_END);
+1 -1
View File
@@ -80,4 +80,4 @@ extern const PriceBaseSpec _price_base_specs[] = {
{ 100, PCAT_RUNNING, GSF_END, PR_STATION_VALUE }, ///< PR_INFRASTRUCTURE_STATION
{ 5000, PCAT_RUNNING, GSF_END, PR_BUILD_STATION_AIRPORT}, ///< PR_INFRASTRUCTURE_AIRPORT
};
assert_compile(lengthof(_price_base_specs) == PR_END);
static_assert(lengthof(_price_base_specs) == PR_END);
+7 -2
View File
@@ -13,7 +13,9 @@ static size_t ConvertLandscape(const char *value);
/****************************
* OTTD specific INI stuff
****************************/
****************************
* DO NOT edit this file. This file is automatically generated from the contents of /src/table/
*/
/**
* Settings-macro usage:
@@ -28,7 +30,7 @@ static size_t ConvertLandscape(const char *value);
* These are for client-only variables. Here the 'var' refers to an
* entry inside _settings_client.
* 3. SDT_something
* Thse are for members in the struct described by the current
* These are for members in the struct described by the current
* #SettingDesc list / .ini file. Here, 'base' specifies type of the
* struct while 'var' points out the member of the struct (the actual
* struct to store it in is implicitly defined by the #SettingDesc
@@ -74,6 +76,9 @@ static size_t ConvertLandscape(const char *value);
#define SDTG_STR(name, type, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\
SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, sizeof(var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, from, to, cat)
#define SDTG_SSTR(name, type, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\
SDTG_GENERAL(name, SDT_STDSTRING, SL_STDSTR, type, flags, guiflags, var, sizeof(var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, from, to, cat)
#define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, strhelp, strval, proc, from, to, cat)\
SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat)
+34 -46
View File
@@ -48,8 +48,6 @@ static bool UpdateServerPassword(int32 p1);
static bool UpdateRconPassword(int32 p1);
static bool UpdateClientConfigValues(int32 p1);
extern int32 _old_ending_year_slv_105;
/* End - Callback Functions for the various settings */
/* Some settings do not need to be synchronised when playing in multiplayer.
@@ -149,8 +147,8 @@ type = SLE_UINT32
from = SLV_97
guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_CURRENCY
def = 300000
min = 100000
max = 500000
min = 0
max = 2000000000
interval = 50000
str = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN
strhelp = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT
@@ -1182,7 +1180,7 @@ cat = SC_EXPERT
var = gui.sg_new_nonstop
from = SLV_22
to = SLV_93
def = false
def = true
; station.nonuniform_stations
[SDT_NULL]
@@ -1284,7 +1282,8 @@ proc = DeleteSelectStationWindow
[SDT_BOOL]
base = GameSettings
var = economy.inflation
def = true
guiflags = SGF_NO_NETWORK
def = false
str = STR_CONFIG_SETTING_INFLATION
strhelp = STR_CONFIG_SETTING_INFLATION_HELPTEXT
cat = SC_BASIC
@@ -1405,15 +1404,9 @@ str = STR_CONFIG_SETTING_STARTING_YEAR
strval = STR_JUST_INT
cat = SC_BASIC
[SDTG_VAR]
name = ""old_ending_year_slv_105""
var = _old_ending_year_slv_105
flags = SLF_NOT_IN_CONFIG
type = SLE_INT32
[SDT_NULL]
length = 4
to = SLV_105
def = DEF_END_YEAR
min = MIN_YEAR
max = MAX_YEAR
[SDT_VAR]
base = GameSettings
@@ -1423,19 +1416,24 @@ from = SLV_ENDING_YEAR
guiflags = SGF_0ISDISABLED
def = DEF_END_YEAR
min = MIN_YEAR
max = MAX_YEAR
max = MAX_YEAR - 1
interval = 1
str = STR_CONFIG_SETTING_ENDING_YEAR
strhelp = STR_CONFIG_SETTING_ENDING_YEAR_HELPTEXT
strval = STR_CONFIG_SETTING_ENDING_YEAR_VALUE
cat = SC_ADVANCED
[SDT_BOOL]
[SDT_VAR]
base = GameSettings
var = economy.smooth_economy
def = true
str = STR_CONFIG_SETTING_SMOOTH_ECONOMY
strhelp = STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT
var = economy.type
type = SLE_UINT8
guiflags = SGF_MULTISTRING
def = ET_SMOOTH
min = ET_BEGIN
max = ET_END - 1
str = STR_CONFIG_SETTING_ECONOMY_TYPE
strhelp = STR_CONFIG_SETTING_ECONOMY_TYPE_HELPTEXT
strval = STR_CONFIG_SETTING_ECONOMY_TYPE_ORIGINAL
proc = InvalidateIndustryViewWindow
cat = SC_BASIC
@@ -2251,7 +2249,7 @@ type = SLE_UINT8
from = SLV_30
def = 32
min = 12
max = 48
max = 128
str = STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE
strval = STR_CONFIG_SETTING_TILE_LENGTH
strhelp = STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT
@@ -2387,10 +2385,10 @@ from = SLV_132
guiflags = SGF_MULTISTRING
def = 2
min = 0
max = 2
max = 3
str = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT
strhelp = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT
strval = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NONE
strval = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NO_SPREAD
cat = SC_BASIC
[SDT_VAR]
@@ -2471,7 +2469,7 @@ from = SLV_184
flags = SLF_NO_NETWORK_SYNC
guiflags = SGF_MULTISTRING
def = 1
max = 2
max = 3
full = _locale_units
proc = RedrawScreen
cat = SC_BASIC
@@ -2626,7 +2624,7 @@ var = gui.date_format_in_default_names
type = SLE_UINT8
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_MULTISTRING
def = 0
def = 2
max = 2
full = _savegame_date
str = STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES
@@ -2903,6 +2901,14 @@ str = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR
strhelp = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT
strval = STR_COLOUR_DARK_BLUE
[SDTC_BOOL]
var = gui.auto_remove_signals
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
str = STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS
strhelp = STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS_HELPTEXT
cat = SC_ADVANCED
[SDTC_BOOL]
var = gui.prefer_teamchat
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
@@ -2977,7 +2983,7 @@ proc = InvalidateVehTimetableWindow
[SDTC_BOOL]
var = gui.quick_goto
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
def = true
str = STR_CONFIG_SETTING_QUICKGOTO
strhelp = STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT
cat = SC_BASIC
@@ -3093,15 +3099,6 @@ def = true
str = STR_CONFIG_SETTING_WARN_LOST_VEHICLE
strhelp = STR_CONFIG_SETTING_WARN_LOST_VEHICLE_HELPTEXT
[SDTC_BOOL]
var = gui.disable_unsuitable_building
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = true
str = STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING
strhelp = STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING_HELPTEXT
proc = RedrawScreen
cat = SC_EXPERT
[SDTC_BOOL]
var = gui.new_nonstop
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
@@ -3165,7 +3162,7 @@ max = 255
[SDTC_BOOL]
var = gui.show_track_reservation
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
def = true
str = STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION
strhelp = STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT
proc = RedrawScreen
@@ -3238,7 +3235,7 @@ cat = SC_BASIC
[SDTC_BOOL]
var = gui.expenses_layout
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
def = true
str = STR_CONFIG_SETTING_EXPENSES_LAYOUT
strhelp = STR_CONFIG_SETTING_EXPENSES_LAYOUT_HELPTEXT
proc = RedrawScreen
@@ -3847,15 +3844,6 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NETWORK_ONLY
def = true
[SDTC_VAR]
var = network.lan_internet
type = SLE_UINT8
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NETWORK_ONLY
def = 1
min = 0
max = 1
[SDTC_STR]
var = network.client_name
type = SLE_STRB
+20 -13
View File
@@ -54,7 +54,7 @@ static const SpriteID SPR_LARGE_SMALL_WINDOW = 682;
/** Extra graphic spritenumbers */
static const SpriteID SPR_OPENTTD_BASE = 4896;
static const uint16 OPENTTD_SPRITE_COUNT = 184;
static const uint16 OPENTTD_SPRITE_COUNT = 186;
/* Halftile-selection sprites */
static const SpriteID SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE;
@@ -163,6 +163,8 @@ static const SpriteID SPR_IMG_DELETE_LEFT = SPR_OPENTTD_BASE + 166;
static const SpriteID SPR_IMG_DELETE_RIGHT = SPR_OPENTTD_BASE + 167;
static const SpriteID SPR_WINDOW_DEFSIZE = SPR_OPENTTD_BASE + 168;
static const SpriteID SPR_RENAME = SPR_OPENTTD_BASE + 184;
static const SpriteID SPR_GOTO_LOCATION = SPR_OPENTTD_BASE + 185;
static const SpriteID SPR_IMG_CARGOFLOW = SPR_OPENTTD_BASE + 174;
@@ -1139,33 +1141,38 @@ static const SpriteID SPR_IT_TOY_FACTORY_ROBOT = 4720;
static const SpriteID SPR_IT_POWER_PLANT_TRANSFORMERS = 2054;
/* small icons of cargo available in station waiting*/
static const SpriteID SPR_CARGO_PASSENGER = 4297;
static const SpriteID SPR_CARGO_PASSENGERS = 4297;
static const SpriteID SPR_CARGO_COAL = 4298;
static const SpriteID SPR_CARGO_MAIL = 4299;
static const SpriteID SPR_CARGO_OIL = 4300;
static const SpriteID SPR_CARGO_LIVESTOCK = 4301;
static const SpriteID SPR_CARGO_GOODS = 4302;
static const SpriteID SPR_CARGO_GRAIN = 4303;
static const SpriteID SPR_CARGO_GRAIN = 4303; // shared sprite with SPR_CARGO_WHEAT, SPR_CARGO_MAIZE
static const SpriteID SPR_CARGO_WHEAT = 4303; // shared sprite with SPR_CARGO_GRAIN, SPR_CARGO_MAIZE
static const SpriteID SPR_CARGO_MAIZE = 4303; // shared sprite with SPR_CARGO_GRAIN, SPR_CARGO_WHEAT
static const SpriteID SPR_CARGO_WOOD = 4304;
static const SpriteID SPR_CARGO_IRON_ORE = 4305;
static const SpriteID SPR_CARGO_STEEL = 4306;
static const SpriteID SPR_CARGO_VALUES_GOLD = 4307; // shared between temperate and arctic
static const SpriteID SPR_CARGO_VALUABLES = 4307; // shared between temperate and arctic ( SPR_CARGO_GOLD )
static const SpriteID SPR_CARGO_GOLD = 4307; // shared between temperate and arctic ( SPR_CARGO_VALUABLES )
static const SpriteID SPR_CARGO_FRUIT = 4308;
static const SpriteID SPR_CARGO_COPPER_ORE = 4309;
static const SpriteID SPR_CARGO_WATERCOLA = 4310; // shared between desert and toyland
static const SpriteID SPR_CARGO_WATER = 4310; // shared between desert and toyland ( SPR_CARGO_COLA )
static const SpriteID SPR_CARGO_COLA = 4310; // shared between desert and toyland ( SPR_CARGO_WATER )
static const SpriteID SPR_CARGO_DIAMONDS = 4311;
static const SpriteID SPR_CARGO_FOOD = 4312;
static const SpriteID SPR_CARGO_PAPER = 4313;
static const SpriteID SPR_CARGO_RUBBER = 4314;
static const SpriteID SPR_CARGO_CANDY = 4315;
static const SpriteID SPR_CARGO_SWEETS = 4315;
static const SpriteID SPR_CARGO_SUGAR = 4316;
static const SpriteID SPR_CARGO_TOYS = 4317;
static const SpriteID SPR_CARGO_COTTONCANDY = 4318;
static const SpriteID SPR_CARGO_FIZZYDRINK = 4319;
static const SpriteID SPR_CARGO_CANDYFLOSS = 4318;
static const SpriteID SPR_CARGO_FIZZY_DRINKS = 4319;
static const SpriteID SPR_CARGO_TOFFEE = 4320;
static const SpriteID SPR_CARGO_BUBBLES = 4321;
static const SpriteID SPR_CARGO_PLASTIC = 4322;
static const SpriteID SPR_CARGO_BATTERIES = 4323;
static const SpriteID SPR_CARGO_NOTHING = SPR_ASCII_SPACE; // Placeholder for void cargo slots.
/* Effect vehicles */
static const SpriteID SPR_BULLDOZER_NE = 1416;
@@ -1540,11 +1547,11 @@ enum SpriteMasks {
PALETTE_MASK = MAX_PALETTES - 1, ///< The mask for the auxiliary sprite (the one that takes care of recolouring)
};
assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
assert_compile( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
assert_compile( TRANSPARENT_BIT != RECOLOUR_BIT );
assert_compile( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0);
assert_compile( (1 << RECOLOUR_BIT & PALETTE_MASK) == 0 );
static_assert( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
static_assert( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
static_assert( TRANSPARENT_BIT != RECOLOUR_BIT );
static_assert( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0);
static_assert( (1 << RECOLOUR_BIT & PALETTE_MASK) == 0 );
static const PaletteID PAL_NONE = 0;
+1 -1
View File
@@ -988,7 +988,7 @@ static const DrawTileSprites _station_display_datas_waypoint[] = {
/* Default waypoint is also drawn as fallback for NewGRF waypoints.
* As these are drawn/build like stations, they may use the same number of layouts. */
assert_compile(lengthof(_station_display_datas_rail) == lengthof(_station_display_datas_waypoint));
static_assert(lengthof(_station_display_datas_rail) == lengthof(_station_display_datas_waypoint));
static const DrawTileSprites * const _station_display_datas[] = {
_station_display_datas_rail,
+2 -2
View File
@@ -1788,7 +1788,7 @@ static const DrawBuildingsTileStruct _town_draw_tile_data[] = {
};
#undef M
/** Make sure we have the right number of elements: 4 variants * 4 build stages for each house */
assert_compile(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4);
static_assert(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4);
/**
* Describes the data that defines each house in the game
@@ -2276,4 +2276,4 @@ static const HouseSpec _original_house_specs[] = {
#undef MS
/** Make sure we have the right number of elements: one entry for each house */
assert_compile(lengthof(_original_house_specs) == NEW_HOUSE_OFFSET);
static_assert(lengthof(_original_house_specs) == NEW_HOUSE_OFFSET);
+575 -575
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -63,6 +63,6 @@ static const byte _wagon_full_adder[] = {
32, 32
};
assert_compile(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_and));
assert_compile(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_add));
assert_compile(lengthof(_engine_sprite_base) == lengthof(_wagon_full_adder));
static_assert(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_and));
static_assert(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_add));
static_assert(lengthof(_engine_sprite_base) == lengthof(_wagon_full_adder));