Merge branch 'master' into infrastructure_sharing
Conflicts: src/aircraft_cmd.cpp src/economy.cpp src/lang/english.txt src/order_gui.cpp src/roadveh_cmd.cpp src/saveload/saveload.cpp src/settings.cpp src/settings_gui.cpp src/train_cmd.cpp
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0)
|
||||
|
||||
/**
|
||||
* Animated cursor elements for demolishion
|
||||
* Animated cursor elements for demolition
|
||||
*/
|
||||
static const AnimCursor _demolish_animcursor[] = {
|
||||
ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_FIRST, 8)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* <ul><li>_bridge_sprite_table_n_m. Defines all the sprites of a bridge besides the pylons.
|
||||
* n defines the number of the bridge type, m the number of the section. the highest m for
|
||||
* each bridge set defines the heads.<br>
|
||||
* Sprites for middle secionts are arranged in groups of four, the elements are:
|
||||
* Sprites for middle sections are arranged in groups of four, the elements are:
|
||||
* <ol><li>Element containing the track. This element is logically behind the vehicle.</li>
|
||||
* <li>Element containing the structure that is logically between the vehicle and the camera</li>
|
||||
* <li>Element containing the pylons.</li></ol>
|
||||
@@ -729,7 +729,7 @@ static const PalSpriteID * const * const _bridge_sprite_table[MAX_BRIDGES] = {
|
||||
|
||||
/**
|
||||
* Describes the data that defines each bridge in the game
|
||||
* @param y year of availablity
|
||||
* @param y year of availability
|
||||
* @param mnl minimum length (not counting bridge heads)
|
||||
* @param mxl maximum length (not counting bridge heads)
|
||||
* @param p price multiplier
|
||||
@@ -745,7 +745,7 @@ static const PalSpriteID * const * const _bridge_sprite_table[MAX_BRIDGES] = {
|
||||
|
||||
const BridgeSpec _orig_bridge[] = {
|
||||
/*
|
||||
year of availablity
|
||||
year of availability
|
||||
| minimum length
|
||||
| | maximum length
|
||||
| | | price multiplier
|
||||
|
||||
@@ -254,7 +254,6 @@ static const IndustryTileTable _tile_table_oil_rig_0[] = {
|
||||
MK(1, 0, 26),
|
||||
MK(1, 1, 27),
|
||||
MK(1, 2, 28),
|
||||
MK(-4, -5, 255),
|
||||
MK(-4, -4, 255),
|
||||
MK(-4, -3, 255),
|
||||
MK(-4, -2, 255),
|
||||
@@ -265,9 +264,10 @@ static const IndustryTileTable _tile_table_oil_rig_0[] = {
|
||||
MK(-4, 3, 255),
|
||||
MK(-4, 4, 255),
|
||||
MK(-4, 5, 255),
|
||||
MK(-3, 5, 255),
|
||||
MK(-2, 5, 255),
|
||||
MK(-1, 5, 255),
|
||||
MK(-4, 6, 255),
|
||||
MK(-3, 6, 255),
|
||||
MK(-2, 6, 255),
|
||||
MK(-1, 6, 255),
|
||||
MK(0, 6, 255),
|
||||
MK(1, 6, 255),
|
||||
MK(2, 6, 255),
|
||||
@@ -289,9 +289,9 @@ static const IndustryTileTable _tile_table_oil_rig_0[] = {
|
||||
MK(2, -4, 255),
|
||||
MK(1, -4, 255),
|
||||
MK(0, -4, 255),
|
||||
MK(-1, -5, 255),
|
||||
MK(-2, -5, 255),
|
||||
MK(-3, -5, 255),
|
||||
MK(-1, -4, 255),
|
||||
MK(-2, -4, 255),
|
||||
MK(-3, -4, 255),
|
||||
MK(2, 0, 255),
|
||||
MKEND
|
||||
};
|
||||
@@ -1171,7 +1171,7 @@ enum IndustryTypes {
|
||||
* @param a3 accepted cargo 3
|
||||
* @param im3 input multiplier for cargo 3
|
||||
* @param pr industry life (actually, the same as extractive, organic, processing in ttdpatch's specs)
|
||||
* @param clim climate availaility
|
||||
* @param clim climate availability
|
||||
* @param bev industry behaviour
|
||||
* @param in name
|
||||
* @param intx text while building
|
||||
|
||||
@@ -9,13 +9,17 @@
|
||||
[pre-amble]
|
||||
static bool CheckInterval(int32 p1);
|
||||
static bool InvalidateDetailsWindow(int32 p1);
|
||||
static bool UpdateIntervalTrains(int32 p1);
|
||||
static bool UpdateIntervalRoadVeh(int32 p1);
|
||||
static bool UpdateIntervalShips(int32 p1);
|
||||
static bool UpdateIntervalAircraft(int32 p1);
|
||||
|
||||
static const SettingDesc _company_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strval, $proc, $from, $to),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strval, $proc, $from, $to),
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -23,11 +27,13 @@ flags = 0
|
||||
guiflags = SGF_PER_COMPANY
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
@@ -36,15 +42,19 @@ base = CompanySettings
|
||||
var = engine_renew
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_AUTORENEW_VEHICLE
|
||||
strhelp = STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT
|
||||
|
||||
[SDT_VAR]
|
||||
base = CompanySettings
|
||||
var = engine_renew_months
|
||||
type = SLE_INT16
|
||||
guiflags = SGF_PER_COMPANY | SGF_DISPLAY_ABS
|
||||
def = 6
|
||||
min = -12
|
||||
max = 12
|
||||
str = STR_CONFIG_SETTING_AUTORENEW_MONTHS
|
||||
strhelp = STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE
|
||||
|
||||
[SDT_VAR]
|
||||
base = CompanySettings
|
||||
@@ -55,6 +65,8 @@ def = 100000
|
||||
min = 0
|
||||
max = 2000000
|
||||
str = STR_CONFIG_SETTING_AUTORENEW_MONEY
|
||||
strhelp = STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT
|
||||
strval = STR_JUST_CURRENCY_LONG
|
||||
|
||||
[SDT_BOOL]
|
||||
base = CompanySettings
|
||||
@@ -66,6 +78,7 @@ base = CompanySettings
|
||||
var = vehicle.servint_ispercent
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_SERVINT_ISPERCENT
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT
|
||||
proc = CheckInterval
|
||||
|
||||
[SDT_VAR]
|
||||
@@ -77,7 +90,9 @@ def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
str = STR_CONFIG_SETTING_SERVINT_TRAINS
|
||||
proc = InvalidateDetailsWindow
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
proc = UpdateIntervalTrains
|
||||
|
||||
[SDT_VAR]
|
||||
base = CompanySettings
|
||||
@@ -88,7 +103,9 @@ def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
str = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES
|
||||
proc = InvalidateDetailsWindow
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
proc = UpdateIntervalRoadVeh
|
||||
|
||||
[SDT_VAR]
|
||||
base = CompanySettings
|
||||
@@ -99,7 +116,9 @@ def = 360
|
||||
min = 5
|
||||
max = 800
|
||||
str = STR_CONFIG_SETTING_SERVINT_SHIPS
|
||||
proc = InvalidateDetailsWindow
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
proc = UpdateIntervalShips
|
||||
|
||||
[SDT_VAR]
|
||||
base = CompanySettings
|
||||
@@ -110,7 +129,9 @@ def = 100
|
||||
min = 5
|
||||
max = 800
|
||||
str = STR_CONFIG_SETTING_SERVINT_AIRCRAFT
|
||||
proc = InvalidateDetailsWindow
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
proc = UpdateIntervalAircraft
|
||||
|
||||
[SDT_END]
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@ enum StringControlCode {
|
||||
SCC_ENCODED = SCC_CONTROL_START,
|
||||
|
||||
/* Display control codes */
|
||||
SCC_SETX,
|
||||
SCC_SETXY,
|
||||
SCC_TINYFONT, ///< Switch to small font
|
||||
SCC_BIGFONT, ///< Switch to large font
|
||||
|
||||
@@ -87,7 +85,6 @@ enum StringControlCode {
|
||||
SCC_HEX,
|
||||
SCC_BYTES,
|
||||
|
||||
SCC_STRING_ID,
|
||||
SCC_RAW_STRING_POINTER,
|
||||
SCC_PLURAL_LIST,
|
||||
SCC_GENDER_LIST,
|
||||
@@ -143,6 +140,9 @@ enum StringControlCode {
|
||||
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
|
||||
|
||||
@@ -11,9 +11,9 @@ static const SettingDesc _currency_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strval, $proc, $from, $to),
|
||||
SDT_CHR = SDT_CHR($base, $var, $flags, $guiflags, $def, $str, $strval, $proc, $from, $to),
|
||||
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strval, $proc, $from, $to),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_CHR = SDT_CHR($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -21,11 +21,13 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +43,7 @@ max = UINT16_MAX
|
||||
base = CurrencySpec
|
||||
var = separator
|
||||
def = "".""
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
base = CurrencySpec
|
||||
|
||||
@@ -117,7 +117,7 @@ static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
|
||||
#define NUM_IGNORE_GROUPS 3
|
||||
#define IGNORE_NONE 0xFF
|
||||
/**
|
||||
* In case we have a staight line, we place pylon only every two tiles,
|
||||
* In case we have a straight line, we place pylon only every two tiles,
|
||||
* so there are certain tiles which we ignore. A straight line is found if
|
||||
* we have exactly two PPPs.
|
||||
*/
|
||||
@@ -195,7 +195,7 @@ static const byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = {
|
||||
|
||||
#undef NO_IGNORE
|
||||
|
||||
/** Which pylons can definately NOT be built */
|
||||
/** Which pylons can definitely NOT be built */
|
||||
static const byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
|
||||
{1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, // X
|
||||
{0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, // Y
|
||||
|
||||
@@ -580,8 +580,8 @@ static const ShipVehicleInfo _orig_ship_vehicle_info[] = {
|
||||
* @param c running_Cost
|
||||
* @param d subtype (bit 0 - plane, bit 1 - large plane)
|
||||
* @param e sound effect
|
||||
* @param f acceleration
|
||||
* @param g max_speed (1 unit = 8 mph = 12.8 km-ish/h)
|
||||
* @param f acceleration (1 unit = 3/8 mph/tick = 3/5 km-ish/h/tick) (stays the same in the variable)
|
||||
* @param g max_speed (1 unit = 8 mph = 12.8 km-ish/h) (is converted to km-ish/h by the macro)
|
||||
* @param h mail_capacity (bags)
|
||||
* @param i passenger_capacity (persons)
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
[pre-amble]
|
||||
static const uint GAME_DIFFICULTY_NUM = 18;
|
||||
static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8 _old_diff_level; ///< Old difficulty level from old savegames
|
||||
uint8 _old_units; ///< Old units from old savegames
|
||||
|
||||
/* Most of these strings are used both for gameopt-backward compatability
|
||||
* and the settings tables. The rest is here for consistency. */
|
||||
@@ -22,25 +24,30 @@ static const char *_savegame_date = "long|short|iso";
|
||||
#ifdef ENABLE_NETWORK
|
||||
static const char *_server_langs = "ANY|ENGLISH|GERMAN|FRENCH|BRAZILIAN|BULGARIAN|CHINESE|CZECH|DANISH|DUTCH|ESPERANTO|FINNISH|HUNGARIAN|ICELANDIC|ITALIAN|JAPANESE|KOREAN|LITHUANIAN|NORWEGIAN|POLISH|PORTUGUESE|ROMANIAN|RUSSIAN|SLOVAK|SLOVENIAN|SPANISH|SWEDISH|TURKISH|UKRAINIAN|AFRIKAANS|CROATIAN|CATALAN|ESTONIAN|GALICIAN|GREEK|LATVIAN";
|
||||
#endif /* ENABLE_NETWORK */
|
||||
static const char *_osk_activation = "disabled|double|single|immediately";
|
||||
static const char *_settings_profiles = "easy|medium|hard";
|
||||
static const char *_news_display = "off|summarized|full";
|
||||
|
||||
static const SettingDesc _gameopt_settings[] = {
|
||||
/* In version 4 a new difficulty setting has been added to the difficulty settings,
|
||||
* town attitude towards demolishing. Needs special handling because some dimwit thought
|
||||
* it funny to have the GameDifficulty struct be an array while it is a struct of
|
||||
* same-sized members
|
||||
* XXX - To save file-space and since values are never bigger than about 10? only
|
||||
* save the first 16 bits in the savegame. Question is why the values are still int32
|
||||
* and why not byte for example?
|
||||
* 'SLE_FILE_I16 | SLE_VAR_U16' in "diff_custom" is needed to get around SlArray() hack
|
||||
* for savegames version 0 - though it is an array, it has to go through the byteswap process */
|
||||
/* In version 4 a new difficulty setting has been added to the difficulty settings,
|
||||
* town attitude towards demolishing. Needs special handling because some dimwit thought
|
||||
* it funny to have the GameDifficulty struct be an array while it is a struct of
|
||||
* same-sized members
|
||||
* XXX - To save file-space and since values are never bigger than about 10? only
|
||||
* save the first 16 bits in the savegame. Question is why the values are still int32
|
||||
* and why not byte for example?
|
||||
* 'SLE_FILE_I16 | SLE_VAR_U16' in "diff_custom" is needed to get around SlArray() hack
|
||||
* for savegames version 0 - though it is an array, it has to go through the byteswap process */
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_GENERAL = SDTG_GENERAL($name, $sdt_cmd, $sle_cmd, $type, $flags, $guiflags, $var, $length, $def, $min, $max, $interval, $full, $str, $strval, $proc, $from, $to),
|
||||
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),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_NULL = SDT_NULL($length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strval, $proc, $from, $to),
|
||||
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strval, $proc, $from, $to, $load),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strval, $proc, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $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),
|
||||
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
@@ -48,11 +55,13 @@ flags = 0
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
@@ -85,13 +94,15 @@ full = NULL
|
||||
from = 4
|
||||
|
||||
##
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
var = difficulty.diff_level
|
||||
[SDTG_VAR]
|
||||
name = ""diff_level""
|
||||
var = _old_diff_level
|
||||
type = SLE_UINT8
|
||||
def = 3
|
||||
min = 0
|
||||
max = 3
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
def = SP_CUSTOM
|
||||
min = SP_EASY
|
||||
max = SP_CUSTOM
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
@@ -99,17 +110,19 @@ var = locale.currency
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
def = 0
|
||||
max = CUSTOM_CURRENCY_ID
|
||||
max = CURRENCY_END - 1
|
||||
full = _locale_currencies
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units
|
||||
[SDTG_OMANY]
|
||||
name = ""units""
|
||||
var = _old_units
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
cat = SC_BASIC
|
||||
|
||||
# There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow
|
||||
# these bigger values (21-255). Invalid values will fallback to english on use and (undefined string) in GUI.
|
||||
@@ -120,6 +133,7 @@ type = SLE_UINT8
|
||||
def = 0
|
||||
max = 255
|
||||
full = _town_names
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
@@ -129,6 +143,7 @@ def = 0
|
||||
max = 3
|
||||
full = _climates
|
||||
load = ConvertLandscape
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
@@ -156,6 +171,7 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
def = 1
|
||||
max = 4
|
||||
full = _autosave_interval
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
@@ -164,6 +180,7 @@ type = SLE_UINT8
|
||||
def = 1
|
||||
max = 1
|
||||
full = _roadsides
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_END]
|
||||
|
||||
|
||||
344
src/table/heightmap_colours.h
Normal file
344
src/table/heightmap_colours.h
Normal file
@@ -0,0 +1,344 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file heightmap_colours.h The colour tables for heightmaps.
|
||||
*/
|
||||
|
||||
/** Height map colours for the green colour scheme, ordered by height. */
|
||||
static const uint32 _green_map_heights[] = {
|
||||
MKCOLOUR(0x59595958),
|
||||
MKCOLOUR(0x59595958),
|
||||
MKCOLOUR(0x59595959),
|
||||
MKCOLOUR(0x5959595A),
|
||||
MKCOLOUR(0x59595A59),
|
||||
MKCOLOUR(0x59595A5A),
|
||||
MKCOLOUR(0x595A5959),
|
||||
MKCOLOUR(0x595A595A),
|
||||
MKCOLOUR(0x595A5A59),
|
||||
MKCOLOUR(0x595A5A5A),
|
||||
MKCOLOUR(0x5A595959),
|
||||
MKCOLOUR(0x5A59595A),
|
||||
MKCOLOUR(0x5A595A59),
|
||||
MKCOLOUR(0x5A595A5A),
|
||||
MKCOLOUR(0x5A5A5959),
|
||||
MKCOLOUR(0x5A5A595A),
|
||||
MKCOLOUR(0x5A5A5A59),
|
||||
MKCOLOUR(0x5A5A5A5A),
|
||||
MKCOLOUR(0x5A5A5A5B),
|
||||
MKCOLOUR(0x5A5A5B5A),
|
||||
MKCOLOUR(0x5A5A5B5B),
|
||||
MKCOLOUR(0x5A5B5A5A),
|
||||
MKCOLOUR(0x5A5B5A5B),
|
||||
MKCOLOUR(0x5A5B5B5A),
|
||||
MKCOLOUR(0x5A5B5B5B),
|
||||
MKCOLOUR(0x5B5A5A5A),
|
||||
MKCOLOUR(0x5B5A5A5B),
|
||||
MKCOLOUR(0x5B5A5B5A),
|
||||
MKCOLOUR(0x5B5A5B5B),
|
||||
MKCOLOUR(0x5B5B5A5A),
|
||||
MKCOLOUR(0x5B5B5A5B),
|
||||
MKCOLOUR(0x5B5B5B5B),
|
||||
MKCOLOUR(0x5B5B5B5C),
|
||||
MKCOLOUR(0x5B5B5C5B),
|
||||
MKCOLOUR(0x5B5B5C5C),
|
||||
MKCOLOUR(0x5B5C5B5B),
|
||||
MKCOLOUR(0x5B5C5B5C),
|
||||
MKCOLOUR(0x5B5C5C5B),
|
||||
MKCOLOUR(0x5B5C5C5C),
|
||||
MKCOLOUR(0x5C5B5B5B),
|
||||
MKCOLOUR(0x5C5B5B5C),
|
||||
MKCOLOUR(0x5C5B5C5B),
|
||||
MKCOLOUR(0x5C5B5C5C),
|
||||
MKCOLOUR(0x5C5C5B5B),
|
||||
MKCOLOUR(0x5C5C5B5C),
|
||||
MKCOLOUR(0x5C5C5C5C),
|
||||
MKCOLOUR(0x5C5C5C5D),
|
||||
MKCOLOUR(0x5C5C5D5C),
|
||||
MKCOLOUR(0x5C5C5D5D),
|
||||
MKCOLOUR(0x5C5D5C5C),
|
||||
MKCOLOUR(0x5C5D5C5D),
|
||||
MKCOLOUR(0x5C5D5D5C),
|
||||
MKCOLOUR(0x5C5D5D5D),
|
||||
MKCOLOUR(0x5D5C5C5C),
|
||||
MKCOLOUR(0x5D5C5C5D),
|
||||
MKCOLOUR(0x5D5C5D5C),
|
||||
MKCOLOUR(0x5D5C5D5D),
|
||||
MKCOLOUR(0x5D5D5C5C),
|
||||
MKCOLOUR(0x5D5D5C5D),
|
||||
MKCOLOUR(0x5D5D5D5D),
|
||||
MKCOLOUR(0x5D5D5D5E),
|
||||
MKCOLOUR(0x5D5D5E5D),
|
||||
MKCOLOUR(0x5D5D5E5E),
|
||||
MKCOLOUR(0x5D5E5D5D),
|
||||
MKCOLOUR(0x5D5E5D5E),
|
||||
MKCOLOUR(0x5D5E5E5D),
|
||||
MKCOLOUR(0x5D5E5E5E),
|
||||
MKCOLOUR(0x5E5D5D5D),
|
||||
MKCOLOUR(0x5E5D5D5E),
|
||||
MKCOLOUR(0x5E5D5E5D),
|
||||
MKCOLOUR(0x5E5D5E5E),
|
||||
MKCOLOUR(0x5E5D5D5D),
|
||||
MKCOLOUR(0x5E5D5D5E),
|
||||
MKCOLOUR(0x5E5E5E5E),
|
||||
MKCOLOUR(0x5E5E5E5F),
|
||||
MKCOLOUR(0x5E5E5F5E),
|
||||
MKCOLOUR(0x5E5E5F5F),
|
||||
MKCOLOUR(0x5E5F5E5E),
|
||||
MKCOLOUR(0x5E5F5E5F),
|
||||
MKCOLOUR(0x5E5F5F5E),
|
||||
MKCOLOUR(0x5E5F5F5F),
|
||||
MKCOLOUR(0x5F5E5E5E),
|
||||
MKCOLOUR(0x5F5E5E5F),
|
||||
MKCOLOUR(0x5F5E5F5E),
|
||||
MKCOLOUR(0x5F5E5F5F),
|
||||
MKCOLOUR(0x5F5F5E5E),
|
||||
MKCOLOUR(0x5F5F5E5F),
|
||||
MKCOLOUR(0x5F5F5F5F),
|
||||
MKCOLOUR(0x5F5F5F1F),
|
||||
MKCOLOUR(0x5F5F1F5F),
|
||||
MKCOLOUR(0x5F5F1F1F),
|
||||
MKCOLOUR(0x5F1F5F1F),
|
||||
MKCOLOUR(0x5F1F1F1F),
|
||||
MKCOLOUR(0x1F5F5F5F),
|
||||
MKCOLOUR(0x1F5F5F1F),
|
||||
MKCOLOUR(0x1F5F1F5F),
|
||||
MKCOLOUR(0x1F5F1F1F),
|
||||
MKCOLOUR(0x1F1F5F5F),
|
||||
MKCOLOUR(0x1F1F5F1F),
|
||||
MKCOLOUR(0x1F1F1F5F),
|
||||
MKCOLOUR(0x1F1F1F1F),
|
||||
MKCOLOUR(0x1F1F1F27),
|
||||
MKCOLOUR(0x1F1F271F),
|
||||
MKCOLOUR(0x1F1F2727),
|
||||
MKCOLOUR(0x1F271F1F),
|
||||
MKCOLOUR(0x1F271F27),
|
||||
MKCOLOUR(0x1F272727),
|
||||
MKCOLOUR(0x271F1F1F),
|
||||
MKCOLOUR(0x271F1F27),
|
||||
MKCOLOUR(0x271F271F),
|
||||
MKCOLOUR(0x271F2727),
|
||||
MKCOLOUR(0x27271F1F),
|
||||
MKCOLOUR(0x27271F27),
|
||||
MKCOLOUR(0x2727271F),
|
||||
MKCOLOUR(0x27272727),
|
||||
};
|
||||
|
||||
/** Height map colours for the dark green colour scheme, ordered by height. */
|
||||
static const uint32 _dark_green_map_heights[] = {
|
||||
MKCOLOUR(0x60606060),
|
||||
MKCOLOUR(0x60606061),
|
||||
MKCOLOUR(0x60606160),
|
||||
MKCOLOUR(0x60606161),
|
||||
MKCOLOUR(0x60616060),
|
||||
MKCOLOUR(0x60616061),
|
||||
MKCOLOUR(0x60616160),
|
||||
MKCOLOUR(0x60616161),
|
||||
MKCOLOUR(0x61606060),
|
||||
MKCOLOUR(0x61606061),
|
||||
MKCOLOUR(0x61606160),
|
||||
MKCOLOUR(0x61606161),
|
||||
MKCOLOUR(0x61616060),
|
||||
MKCOLOUR(0x61616061),
|
||||
MKCOLOUR(0x61616160),
|
||||
MKCOLOUR(0x61616161),
|
||||
MKCOLOUR(0x61616162),
|
||||
MKCOLOUR(0x61616261),
|
||||
MKCOLOUR(0x61616262),
|
||||
MKCOLOUR(0x61626161),
|
||||
MKCOLOUR(0x61626162),
|
||||
MKCOLOUR(0x61626261),
|
||||
MKCOLOUR(0x61626262),
|
||||
MKCOLOUR(0x62616161),
|
||||
MKCOLOUR(0x62616162),
|
||||
MKCOLOUR(0x62616261),
|
||||
MKCOLOUR(0x62616262),
|
||||
MKCOLOUR(0x62626161),
|
||||
MKCOLOUR(0x62626162),
|
||||
MKCOLOUR(0x62626261),
|
||||
MKCOLOUR(0x62626262),
|
||||
MKCOLOUR(0x62626263),
|
||||
MKCOLOUR(0x62626362),
|
||||
MKCOLOUR(0x62626363),
|
||||
MKCOLOUR(0x62636262),
|
||||
MKCOLOUR(0x62636263),
|
||||
MKCOLOUR(0x62636362),
|
||||
MKCOLOUR(0x62636363),
|
||||
MKCOLOUR(0x63626262),
|
||||
MKCOLOUR(0x63626263),
|
||||
MKCOLOUR(0x63626362),
|
||||
MKCOLOUR(0x63626363),
|
||||
MKCOLOUR(0x63636262),
|
||||
MKCOLOUR(0x63636263),
|
||||
MKCOLOUR(0x63636362),
|
||||
MKCOLOUR(0x63636363),
|
||||
MKCOLOUR(0x63636364),
|
||||
MKCOLOUR(0x63636463),
|
||||
MKCOLOUR(0x63636464),
|
||||
MKCOLOUR(0x63646363),
|
||||
MKCOLOUR(0x63646364),
|
||||
MKCOLOUR(0x63646463),
|
||||
MKCOLOUR(0x63646464),
|
||||
MKCOLOUR(0x64636363),
|
||||
MKCOLOUR(0x64636364),
|
||||
MKCOLOUR(0x64636463),
|
||||
MKCOLOUR(0x64636464),
|
||||
MKCOLOUR(0x64646363),
|
||||
MKCOLOUR(0x64646364),
|
||||
MKCOLOUR(0x64646463),
|
||||
MKCOLOUR(0x64646464),
|
||||
MKCOLOUR(0x64646465),
|
||||
MKCOLOUR(0x64646564),
|
||||
MKCOLOUR(0x64646565),
|
||||
MKCOLOUR(0x64656464),
|
||||
MKCOLOUR(0x64656465),
|
||||
MKCOLOUR(0x64656564),
|
||||
MKCOLOUR(0x64656565),
|
||||
MKCOLOUR(0x65646464),
|
||||
MKCOLOUR(0x65646465),
|
||||
MKCOLOUR(0x65646564),
|
||||
MKCOLOUR(0x65646565),
|
||||
MKCOLOUR(0x65656464),
|
||||
MKCOLOUR(0x65656465),
|
||||
MKCOLOUR(0x65656564),
|
||||
MKCOLOUR(0x65656565),
|
||||
MKCOLOUR(0x65656566),
|
||||
MKCOLOUR(0x65656665),
|
||||
MKCOLOUR(0x65656666),
|
||||
MKCOLOUR(0x65666565),
|
||||
MKCOLOUR(0x65666566),
|
||||
MKCOLOUR(0x65666665),
|
||||
MKCOLOUR(0x65666666),
|
||||
MKCOLOUR(0x66656565),
|
||||
MKCOLOUR(0x66656566),
|
||||
MKCOLOUR(0x66656665),
|
||||
MKCOLOUR(0x66656666),
|
||||
MKCOLOUR(0x66666565),
|
||||
MKCOLOUR(0x66666566),
|
||||
MKCOLOUR(0x66666665),
|
||||
MKCOLOUR(0x66666666),
|
||||
MKCOLOUR(0x66666667),
|
||||
MKCOLOUR(0x66666766),
|
||||
MKCOLOUR(0x66666767),
|
||||
MKCOLOUR(0x66676666),
|
||||
MKCOLOUR(0x66676667),
|
||||
MKCOLOUR(0x66676766),
|
||||
MKCOLOUR(0x66676767),
|
||||
MKCOLOUR(0x67676767),
|
||||
};
|
||||
|
||||
/** Height map colours for the violet colour scheme, ordered by height. */
|
||||
static const uint32 _violet_map_heights[] = {
|
||||
MKCOLOUR(0x80808080),
|
||||
MKCOLOUR(0x80808081),
|
||||
MKCOLOUR(0x80808180),
|
||||
MKCOLOUR(0x80808181),
|
||||
MKCOLOUR(0x80818080),
|
||||
MKCOLOUR(0x80818081),
|
||||
MKCOLOUR(0x80818180),
|
||||
MKCOLOUR(0x80818181),
|
||||
MKCOLOUR(0x81808080),
|
||||
MKCOLOUR(0x81808081),
|
||||
MKCOLOUR(0x81808180),
|
||||
MKCOLOUR(0x81808181),
|
||||
MKCOLOUR(0x81818080),
|
||||
MKCOLOUR(0x81818081),
|
||||
MKCOLOUR(0x81818180),
|
||||
MKCOLOUR(0x81818181),
|
||||
MKCOLOUR(0x81818182),
|
||||
MKCOLOUR(0x81818281),
|
||||
MKCOLOUR(0x81818282),
|
||||
MKCOLOUR(0x81828181),
|
||||
MKCOLOUR(0x81828182),
|
||||
MKCOLOUR(0x81828281),
|
||||
MKCOLOUR(0x81828282),
|
||||
MKCOLOUR(0x82818181),
|
||||
MKCOLOUR(0x82818182),
|
||||
MKCOLOUR(0x82818281),
|
||||
MKCOLOUR(0x82818282),
|
||||
MKCOLOUR(0x82828181),
|
||||
MKCOLOUR(0x82828182),
|
||||
MKCOLOUR(0x82828281),
|
||||
MKCOLOUR(0x82828282),
|
||||
MKCOLOUR(0x82828283),
|
||||
MKCOLOUR(0x82828382),
|
||||
MKCOLOUR(0x82828383),
|
||||
MKCOLOUR(0x82838282),
|
||||
MKCOLOUR(0x82838283),
|
||||
MKCOLOUR(0x82838382),
|
||||
MKCOLOUR(0x82838383),
|
||||
MKCOLOUR(0x83828282),
|
||||
MKCOLOUR(0x83828283),
|
||||
MKCOLOUR(0x83828382),
|
||||
MKCOLOUR(0x83828383),
|
||||
MKCOLOUR(0x83838282),
|
||||
MKCOLOUR(0x83838283),
|
||||
MKCOLOUR(0x83838382),
|
||||
MKCOLOUR(0x83838383),
|
||||
MKCOLOUR(0x83838384),
|
||||
MKCOLOUR(0x83838483),
|
||||
MKCOLOUR(0x83838484),
|
||||
MKCOLOUR(0x83848383),
|
||||
MKCOLOUR(0x83848384),
|
||||
MKCOLOUR(0x83848483),
|
||||
MKCOLOUR(0x83848484),
|
||||
MKCOLOUR(0x84838383),
|
||||
MKCOLOUR(0x84838384),
|
||||
MKCOLOUR(0x84838483),
|
||||
MKCOLOUR(0x84838484),
|
||||
MKCOLOUR(0x84848383),
|
||||
MKCOLOUR(0x84848384),
|
||||
MKCOLOUR(0x84848483),
|
||||
MKCOLOUR(0x84848484),
|
||||
MKCOLOUR(0x84848485),
|
||||
MKCOLOUR(0x84848584),
|
||||
MKCOLOUR(0x84848585),
|
||||
MKCOLOUR(0x84858484),
|
||||
MKCOLOUR(0x84858485),
|
||||
MKCOLOUR(0x84858584),
|
||||
MKCOLOUR(0x84858585),
|
||||
MKCOLOUR(0x85848484),
|
||||
MKCOLOUR(0x85848485),
|
||||
MKCOLOUR(0x85848584),
|
||||
MKCOLOUR(0x85848585),
|
||||
MKCOLOUR(0x85858484),
|
||||
MKCOLOUR(0x85858485),
|
||||
MKCOLOUR(0x85858584),
|
||||
MKCOLOUR(0x85858585),
|
||||
MKCOLOUR(0x85858586),
|
||||
MKCOLOUR(0x85858685),
|
||||
MKCOLOUR(0x85858686),
|
||||
MKCOLOUR(0x85868585),
|
||||
MKCOLOUR(0x85868586),
|
||||
MKCOLOUR(0x85868685),
|
||||
MKCOLOUR(0x85868686),
|
||||
MKCOLOUR(0x85868585),
|
||||
MKCOLOUR(0x85868586),
|
||||
MKCOLOUR(0x85868685),
|
||||
MKCOLOUR(0x85868686),
|
||||
MKCOLOUR(0x86868585),
|
||||
MKCOLOUR(0x86868586),
|
||||
MKCOLOUR(0x86868685),
|
||||
MKCOLOUR(0x86868686),
|
||||
MKCOLOUR(0x86868687),
|
||||
MKCOLOUR(0x86868786),
|
||||
MKCOLOUR(0x86868787),
|
||||
MKCOLOUR(0x86878686),
|
||||
MKCOLOUR(0x86878687),
|
||||
MKCOLOUR(0x86878786),
|
||||
MKCOLOUR(0x86878787),
|
||||
MKCOLOUR(0x87868686),
|
||||
MKCOLOUR(0x87868687),
|
||||
MKCOLOUR(0x87868786),
|
||||
MKCOLOUR(0x87868787),
|
||||
MKCOLOUR(0x87878686),
|
||||
MKCOLOUR(0x87878687),
|
||||
MKCOLOUR(0x87878786),
|
||||
MKCOLOUR(0x87878787),
|
||||
};
|
||||
@@ -12,134 +12,134 @@
|
||||
static const SpriteID END = 0xFFFF;
|
||||
|
||||
static const SpriteID _landscape_spriteindexes_arctic[] = {
|
||||
0xF67, 0xF9F,
|
||||
0xAAD, 0xAB0,
|
||||
0x83A, 0x845,
|
||||
0xFA0, 0xFC9,
|
||||
0x43F, 0x45E,
|
||||
0x566, 0x56D,
|
||||
0x945, 0x94C,
|
||||
0x3ED, 0x40C,
|
||||
0x515, 0x51C,
|
||||
0x55A, 0x561,
|
||||
0x534, 0x546,
|
||||
0x93D, 0x944,
|
||||
0x955, 0x95C,
|
||||
0xFDD, 0xFEC,
|
||||
0x87D, 0x883,
|
||||
0xA2B, 0xA39,
|
||||
0x497, 0x4B0,
|
||||
0x572, 0x575,
|
||||
0x94D, 0x954,
|
||||
0x818, 0x81D,
|
||||
0x3DE, 0x3EB,
|
||||
0x1212, 0x1212,
|
||||
END
|
||||
0xF67, 0xF9F,
|
||||
0xAAD, 0xAB0,
|
||||
0x83A, 0x845,
|
||||
0xFA0, 0xFC9,
|
||||
0x43F, 0x45E,
|
||||
0x566, 0x56D,
|
||||
0x945, 0x94C,
|
||||
0x3ED, 0x40C,
|
||||
0x515, 0x51C,
|
||||
0x55A, 0x561,
|
||||
0x534, 0x546,
|
||||
0x93D, 0x944,
|
||||
0x955, 0x95C,
|
||||
0xFDD, 0xFEC,
|
||||
0x87D, 0x883,
|
||||
0xA2B, 0xA39,
|
||||
0x497, 0x4B0,
|
||||
0x572, 0x575,
|
||||
0x94D, 0x954,
|
||||
0x818, 0x81D,
|
||||
0x3DE, 0x3EB,
|
||||
0x1212, 0x1212,
|
||||
END
|
||||
};
|
||||
|
||||
static const SpriteID _landscape_spriteindexes_tropic[] = {
|
||||
0xF67, 0xF9F,
|
||||
0xAAD, 0xAB0,
|
||||
0xFA0, 0xFC9,
|
||||
0x43F, 0x45E,
|
||||
0x566, 0x56D,
|
||||
0x945, 0x94C,
|
||||
0x3ED, 0x40C,
|
||||
0x515, 0x51C,
|
||||
0x55A, 0x561,
|
||||
0x547, 0x559,
|
||||
0x93D, 0x944,
|
||||
0x955, 0x95C,
|
||||
0xFDD, 0xFEC,
|
||||
0x87D, 0x883,
|
||||
0xA2B, 0xA39,
|
||||
0x497, 0x4B0,
|
||||
0x572, 0x575,
|
||||
0x94D, 0x954,
|
||||
0x5AE, 0x5AF,
|
||||
0x118D, 0x11D8,
|
||||
0x534, 0x546,
|
||||
0x40D, 0x426,
|
||||
0x45F, 0x478,
|
||||
0x4B1, 0x4CA,
|
||||
0x95D, 0x97C,
|
||||
0x3DE, 0x3EB,
|
||||
0x562, 0x565,
|
||||
0x56E, 0x571,
|
||||
0x57A, 0x57D,
|
||||
0x83A, 0x845,
|
||||
0xFF5, 0xFF5,
|
||||
0xFF8, 0xFF8,
|
||||
0x1212, 0x1212,
|
||||
END
|
||||
0xF67, 0xF9F,
|
||||
0xAAD, 0xAB0,
|
||||
0xFA0, 0xFC9,
|
||||
0x43F, 0x45E,
|
||||
0x566, 0x56D,
|
||||
0x945, 0x94C,
|
||||
0x3ED, 0x40C,
|
||||
0x515, 0x51C,
|
||||
0x55A, 0x561,
|
||||
0x547, 0x559,
|
||||
0x93D, 0x944,
|
||||
0x955, 0x95C,
|
||||
0xFDD, 0xFEC,
|
||||
0x87D, 0x883,
|
||||
0xA2B, 0xA39,
|
||||
0x497, 0x4B0,
|
||||
0x572, 0x575,
|
||||
0x94D, 0x954,
|
||||
0x5AE, 0x5AF,
|
||||
0x118D, 0x11D8,
|
||||
0x534, 0x546,
|
||||
0x40D, 0x426,
|
||||
0x45F, 0x478,
|
||||
0x4B1, 0x4CA,
|
||||
0x95D, 0x97C,
|
||||
0x3DE, 0x3EB,
|
||||
0x562, 0x565,
|
||||
0x56E, 0x571,
|
||||
0x57A, 0x57D,
|
||||
0x83A, 0x845,
|
||||
0xFF5, 0xFF5,
|
||||
0xFF8, 0xFF8,
|
||||
0x1212, 0x1212,
|
||||
END
|
||||
};
|
||||
|
||||
static const SpriteID _landscape_spriteindexes_toyland[] = {
|
||||
0xF54, 0xF9F,
|
||||
0xFDD, 0xFE5,
|
||||
0xFEC, 0xFEC,
|
||||
0xFA0, 0xFC9,
|
||||
0x818, 0x81D,
|
||||
0x521, 0x546,
|
||||
0x57E, 0x57F,
|
||||
0x3ED, 0x40C,
|
||||
0x43F, 0x45E,
|
||||
0x491, 0x4B0,
|
||||
0xA48, 0xA48,
|
||||
0x4FB, 0x50A,
|
||||
0x55A, 0x561,
|
||||
0x566, 0x56D,
|
||||
0x572, 0x579,
|
||||
0x427, 0x42C,
|
||||
0x479, 0x47E,
|
||||
0x4CB, 0x4D0,
|
||||
0x4EF, 0x4FA,
|
||||
0xE9D, 0xECC,
|
||||
0xF3D, 0xF40,
|
||||
0xB59, 0xB60,
|
||||
0xE5D, 0xE6C,
|
||||
0xA49, 0xA59,
|
||||
0xA63, 0xA68,
|
||||
0xA5A, 0xA62,
|
||||
0xA78, 0xA83,
|
||||
0xA69, 0xA77,
|
||||
0xA84, 0xAA3,
|
||||
0xAA7, 0xAAC,
|
||||
0xA2B, 0xA47,
|
||||
0x3DE, 0x3EB,
|
||||
0x47F, 0x488,
|
||||
0x4D1, 0x4DA,
|
||||
0x42D, 0x436,
|
||||
0x515, 0x51C,
|
||||
0x580, 0x585,
|
||||
0xC14, 0xCB3,
|
||||
0xAAD, 0xAB0,
|
||||
0xAB5, 0xB00,
|
||||
0xB69, 0xB70,
|
||||
0xB61, 0xB68,
|
||||
0xBC9, 0xBD0,
|
||||
0xBD9, 0xBE0,
|
||||
0xBA9, 0xBB0,
|
||||
0xBC1, 0xBC4,
|
||||
0x2D0, 0x2D0,
|
||||
0xAA5, 0xAA6,
|
||||
0x50F, 0x50F,
|
||||
0x2EA, 0x2EA,
|
||||
0x2ED, 0x2EE,
|
||||
0x512, 0x513,
|
||||
0x4EB, 0x4EE,
|
||||
0x4E7, 0x4EA,
|
||||
0x985, 0xA28,
|
||||
0x10E4, 0x1133,
|
||||
0x93D, 0x95C,
|
||||
0x97D, 0x984,
|
||||
0x7DA, 0x7DA,
|
||||
0x2E6, 0x2E6,
|
||||
0x1, 0x1,
|
||||
0xE54, 0xE54,
|
||||
0x51F, 0x520,
|
||||
0x514, 0x514,
|
||||
0x511, 0x511,
|
||||
0x322, 0x322,
|
||||
END
|
||||
0xF54, 0xF9F,
|
||||
0xFDD, 0xFE5,
|
||||
0xFEC, 0xFEC,
|
||||
0xFA0, 0xFC9,
|
||||
0x818, 0x81D,
|
||||
0x521, 0x546,
|
||||
0x57E, 0x57F,
|
||||
0x3ED, 0x40C,
|
||||
0x43F, 0x45E,
|
||||
0x491, 0x4B0,
|
||||
0xA48, 0xA48,
|
||||
0x4FB, 0x50A,
|
||||
0x55A, 0x561,
|
||||
0x566, 0x56D,
|
||||
0x572, 0x579,
|
||||
0x427, 0x42C,
|
||||
0x479, 0x47E,
|
||||
0x4CB, 0x4D0,
|
||||
0x4EF, 0x4FA,
|
||||
0xE9D, 0xECC,
|
||||
0xF3D, 0xF40,
|
||||
0xB59, 0xB60,
|
||||
0xE5D, 0xE6C,
|
||||
0xA49, 0xA59,
|
||||
0xA63, 0xA68,
|
||||
0xA5A, 0xA62,
|
||||
0xA78, 0xA83,
|
||||
0xA69, 0xA77,
|
||||
0xA84, 0xAA3,
|
||||
0xAA7, 0xAAC,
|
||||
0xA2B, 0xA47,
|
||||
0x3DE, 0x3EB,
|
||||
0x47F, 0x488,
|
||||
0x4D1, 0x4DA,
|
||||
0x42D, 0x436,
|
||||
0x515, 0x51C,
|
||||
0x580, 0x585,
|
||||
0xC14, 0xCB3,
|
||||
0xAAD, 0xAB0,
|
||||
0xAB5, 0xB00,
|
||||
0xB69, 0xB70,
|
||||
0xB61, 0xB68,
|
||||
0xBC9, 0xBD0,
|
||||
0xBD9, 0xBE0,
|
||||
0xBA9, 0xBB0,
|
||||
0xBC1, 0xBC4,
|
||||
0x2D0, 0x2D0,
|
||||
0xAA5, 0xAA6,
|
||||
0x50F, 0x50F,
|
||||
0x2EA, 0x2EA,
|
||||
0x2ED, 0x2EE,
|
||||
0x512, 0x513,
|
||||
0x4EB, 0x4EE,
|
||||
0x4E7, 0x4EA,
|
||||
0x985, 0xA28,
|
||||
0x10E4, 0x1133,
|
||||
0x93D, 0x95C,
|
||||
0x97D, 0x984,
|
||||
0x7DA, 0x7DA,
|
||||
0x2E6, 0x2E6,
|
||||
0x1, 0x1,
|
||||
0xE54, 0xE54,
|
||||
0x51F, 0x520,
|
||||
0x514, 0x514,
|
||||
0x511, 0x511,
|
||||
0x322, 0x322,
|
||||
END
|
||||
};
|
||||
|
||||
@@ -9,15 +9,18 @@
|
||||
[pre-amble]
|
||||
extern char _config_language_file[MAX_PATH];
|
||||
|
||||
static const char *_support8bppmodes = "no|system|hardware";
|
||||
|
||||
static const SettingDescGlobVarList _misc_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $length, $flags, $guiflags, $var, $def, $str, $strval, $proc, $from, $to),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $guiflags, $var, $def, $full, $str, $strval, $proc, $from, $to),
|
||||
SDTG_STR = SDTG_STR($name, $type, $flags, $guiflags, $var, $def, $str, $strval, $proc, $from, $to),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strval, $proc, $from, $to),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strval, $proc, $from, $to),
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $length, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
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_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()
|
||||
|
||||
[defaults]
|
||||
@@ -25,11 +28,13 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
@@ -40,51 +45,62 @@ var = _display_opt
|
||||
def = (1 << DO_SHOW_TOWN_NAMES | 1 << DO_SHOW_STATION_NAMES | 1 << DO_SHOW_SIGNS | 1 << DO_FULL_ANIMATION | 1 << DO_FULL_DETAIL | 1 << DO_SHOW_WAYPOINT_NAMES | 1 << DO_SHOW_COMPETITOR_SIGNS)
|
||||
full = ""SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION||FULL_DETAIL|WAYPOINTS|SHOW_COMPETITOR_SIGNS""
|
||||
|
||||
[SDTG_BOOL]
|
||||
name = ""news_ticker_sound""
|
||||
var = _news_ticker_sound
|
||||
def = true
|
||||
|
||||
[SDTG_BOOL]
|
||||
name = ""fullscreen""
|
||||
var = _fullscreen
|
||||
def = false
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_OMANY]
|
||||
name = ""support8bpp""
|
||||
type = SLE_UINT8
|
||||
var = _support8bpp
|
||||
def = 0
|
||||
max = 2
|
||||
full = _support8bppmodes
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""graphicsset""
|
||||
type = SLE_STRQ
|
||||
var = BaseGraphics::ini_set
|
||||
def = NULL
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""soundsset""
|
||||
type = SLE_STRQ
|
||||
var = BaseSounds::ini_set
|
||||
def = NULL
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""musicset""
|
||||
type = SLE_STRQ
|
||||
var = BaseMusic::ini_set
|
||||
def = NULL
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""videodriver""
|
||||
type = SLE_STRQ
|
||||
var = _ini_videodriver
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""musicdriver""
|
||||
type = SLE_STRQ
|
||||
var = _ini_musicdriver
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""sounddriver""
|
||||
type = SLE_STRQ
|
||||
var = _ini_sounddriver
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""blitter""
|
||||
@@ -97,6 +113,7 @@ name = ""language""
|
||||
type = SLE_STRB
|
||||
var = _config_language_file
|
||||
def = NULL
|
||||
cat = SC_BASIC
|
||||
|
||||
; workaround for implicit lengthof() in SDTG_LIST
|
||||
[SDTG_LIST]
|
||||
@@ -105,18 +122,21 @@ type = SLE_INT
|
||||
length = 2
|
||||
var = _cur_resolution
|
||||
def = ""640,480""
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""screenshot_format""
|
||||
type = SLE_STRB
|
||||
var = _screenshot_format_name
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""savegame_format""
|
||||
type = SLE_STRB
|
||||
var = _savegame_format
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_BOOL]
|
||||
name = ""rightclick_emulate""
|
||||
@@ -127,36 +147,36 @@ def = false
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""small_font""
|
||||
type = SLE_STRB
|
||||
var = _freetype.small_font
|
||||
var = _freetype.small.font
|
||||
def = NULL
|
||||
|
||||
[SDTG_STR]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""medium_font""
|
||||
type = SLE_STRB
|
||||
var = _freetype.medium_font
|
||||
var = _freetype.medium.font
|
||||
def = NULL
|
||||
|
||||
[SDTG_STR]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""large_font""
|
||||
type = SLE_STRB
|
||||
var = _freetype.large_font
|
||||
var = _freetype.large.font
|
||||
def = NULL
|
||||
|
||||
[SDTG_STR]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""mono_font""
|
||||
type = SLE_STRB
|
||||
var = _freetype.mono_font
|
||||
var = _freetype.mono.font
|
||||
def = NULL
|
||||
|
||||
[SDTG_VAR]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""small_size""
|
||||
type = SLE_UINT
|
||||
var = _freetype.small_size
|
||||
def = 8
|
||||
var = _freetype.small.size
|
||||
def = 0
|
||||
min = 0
|
||||
max = 72
|
||||
|
||||
@@ -164,8 +184,8 @@ max = 72
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""medium_size""
|
||||
type = SLE_UINT
|
||||
var = _freetype.medium_size
|
||||
def = 10
|
||||
var = _freetype.medium.size
|
||||
def = 0
|
||||
min = 0
|
||||
max = 72
|
||||
|
||||
@@ -173,8 +193,8 @@ max = 72
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""large_size""
|
||||
type = SLE_UINT
|
||||
var = _freetype.large_size
|
||||
def = 16
|
||||
var = _freetype.large.size
|
||||
def = 0
|
||||
min = 0
|
||||
max = 72
|
||||
|
||||
@@ -182,42 +202,43 @@ max = 72
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""mono_size""
|
||||
type = SLE_UINT
|
||||
var = _freetype.mono_size
|
||||
def = 10
|
||||
var = _freetype.mono.size
|
||||
def = 0
|
||||
min = 0
|
||||
max = 72
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""small_aa""
|
||||
var = _freetype.small_aa
|
||||
var = _freetype.small.aa
|
||||
def = false
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""medium_aa""
|
||||
var = _freetype.medium_aa
|
||||
var = _freetype.medium.aa
|
||||
def = false
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""large_aa""
|
||||
var = _freetype.large_aa
|
||||
var = _freetype.large.aa
|
||||
def = false
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = WITH_FREETYPE
|
||||
name = ""mono_aa""
|
||||
var = _freetype.mono_aa
|
||||
var = _freetype.mono.aa
|
||||
def = false
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""max_sprite_cache_size""
|
||||
name = ""sprite_cache_size_px""
|
||||
type = SLE_UINT
|
||||
var = _sprite_cache_size
|
||||
def = 64
|
||||
def = 128
|
||||
min = 1
|
||||
max = 512
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""player_face""
|
||||
@@ -226,6 +247,7 @@ var = _company_manager_face
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0xFFFFFFFF
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""transparency_options""
|
||||
@@ -234,6 +256,7 @@ var = _transparency_opt
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0x1FF
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""transparency_locks""
|
||||
@@ -242,6 +265,7 @@ var = _transparency_lock
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0x1FF
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""invisibility_options""
|
||||
@@ -250,18 +274,21 @@ var = _invisibility_opt
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0xFF
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""keyboard""
|
||||
type = SLE_STRB
|
||||
var = _keyboard_opt[0]
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_STR]
|
||||
name = ""keyboard_caps""
|
||||
type = SLE_STRB
|
||||
var = _keyboard_opt[1]
|
||||
def = NULL
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""last_newgrf_count""
|
||||
@@ -270,6 +297,16 @@ var = _settings_client.gui.last_newgrf_count
|
||||
def = 100
|
||||
min = 0
|
||||
max = UINT32_MAX
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""gui_zoom""
|
||||
type = SLE_UINT8
|
||||
var = _gui_zoom
|
||||
def = ZOOM_LVL_OUT_4X
|
||||
min = ZOOM_LVL_MIN
|
||||
max = ZOOM_LVL_OUT_4X
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_END]
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
/** @file newgrf_debug_data.h Data 'tables' for NewGRF debugging. */
|
||||
|
||||
#include "../newgrf_house.h"
|
||||
#include "../newgrf_engine.h"
|
||||
|
||||
/* Helper for filling property tables */
|
||||
#define NIP(prop, base, variable, type, name) { name, cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
|
||||
#define NIP_END() { NULL, 0, 0, 0, 0 }
|
||||
@@ -56,7 +59,12 @@ static const NIVariable _niv_vehicles[] = {
|
||||
NIV(0x48, "vehicle type info"),
|
||||
NIV(0x49, "year of construction"),
|
||||
NIV(0x4A, "current rail type info"),
|
||||
NIV(0x4B, "long date of last service"),
|
||||
NIV(0x4C, "current max speed"),
|
||||
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_END()
|
||||
};
|
||||
|
||||
@@ -67,7 +75,13 @@ class NIHVehicle : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return Vehicle::Get(index)->GetEngine(); }
|
||||
void SetStringParameters(uint index) const { this->SetSimpleStringParameters(STR_VEHICLE_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const { return Vehicle::Get(index)->GetGRFID(); }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetVehicleResolver(ResolverObject *ro, uint index); GetVehicleResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
Vehicle *v = Vehicle::Get(index);
|
||||
VehicleResolverObject ro(v->engine_type, v, VehicleResolverObject::WO_CACHED);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_vehicle = {
|
||||
@@ -83,8 +97,8 @@ static const NIFeature _nif_vehicle = {
|
||||
#define NICS(cb_id, bit) NIC(cb_id, StationSpec, callback_mask, bit)
|
||||
static const NICallback _nic_stations[] = {
|
||||
NICS(CBID_STATION_AVAILABILITY, CBM_STATION_AVAIL),
|
||||
NICS(CBID_STATION_SPRITE_LAYOUT, CBM_NO_BIT),
|
||||
NICS(CBID_STATION_TILE_LAYOUT, CBM_STATION_SPRITE_LAYOUT),
|
||||
NICS(CBID_STATION_SPRITE_LAYOUT, CBM_STATION_SPRITE_LAYOUT),
|
||||
NICS(CBID_STATION_TILE_LAYOUT, CBM_NO_BIT),
|
||||
NICS(CBID_STATION_ANIM_START_STOP, CBM_NO_BIT),
|
||||
NICS(CBID_STATION_ANIM_NEXT_FRAME, CBM_STATION_ANIMATION_NEXT_FRAME),
|
||||
NICS(CBID_STATION_ANIMATION_SPEED, CBM_STATION_ANIMATION_SPEED),
|
||||
@@ -124,7 +138,12 @@ class NIHStation : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return GetStationSpec(index); }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? GetStationSpec(index)->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetStationResolver(ResolverObject *ro, uint index); GetStationResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
StationResolverObject ro(GetStationSpec(index), Station::GetByTile(index), index);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_station = {
|
||||
@@ -184,7 +203,12 @@ class NIHHouse : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return HouseSpec::Get(GetHouseType(index)); }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_TOWN_NAME, GetTownIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? HouseSpec::Get(GetHouseType(index))->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetHouseResolver(ResolverObject *ro, uint index); GetHouseResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
HouseResolverObject ro(GetHouseType(index), index, Town::GetByTile(index));
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_house = {
|
||||
@@ -229,7 +253,12 @@ class NIHIndustryTile : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return GetIndustryTileSpec(GetIndustryGfx(index)); }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_INDUSTRY_NAME, GetIndustryIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? GetIndustryTileSpec(GetIndustryGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetIndustryTileResolver(ResolverObject *ro, uint index); GetIndustryTileResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
IndustryTileResolverObject ro(GetIndustryGfx(index), index, Industry::GetByTile(index));
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_industrytile = {
|
||||
@@ -265,6 +294,7 @@ static const NICallback _nic_industries[] = {
|
||||
NICI(CBID_INDUSTRY_DECIDE_COLOUR, CBM_IND_DECIDE_COLOUR),
|
||||
NICI(CBID_INDUSTRY_INPUT_CARGO_TYPES, CBM_IND_INPUT_CARGO_TYPES),
|
||||
NICI(CBID_INDUSTRY_OUTPUT_CARGO_TYPES, CBM_IND_OUTPUT_CARGO_TYPES),
|
||||
NICI(CBID_INDUSTRY_PROD_CHANGE_BUILD, CBM_IND_PROD_CHANGE_BUILD),
|
||||
NIC_END()
|
||||
};
|
||||
|
||||
@@ -295,7 +325,14 @@ class NIHIndustry : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return GetIndustrySpec(Industry::Get(index)->type); }
|
||||
void SetStringParameters(uint index) const { this->SetSimpleStringParameters(STR_INDUSTRY_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetIndustryResolver(ResolverObject *ro, uint index); GetIndustryResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
Industry *i = Industry::Get(index);
|
||||
IndustriesResolverObject ro(i->location.tile, i, i->type);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
|
||||
uint GetPSASize(uint index, uint32 grfid) const { return cpp_lengthof(PersistentStorage, storage); }
|
||||
|
||||
const int32 *GetPSAFirstPosition(uint index, uint32 grfid) const
|
||||
@@ -353,7 +390,12 @@ class NIHObject : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return ObjectSpec::GetByTile(index); }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT, INVALID_STRING_ID, index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetObjectResolver(ResolverObject *ro, uint index); GetObjectResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
ObjectResolverObject ro(ObjectSpec::GetByTile(index), Object::GetByTile(index), index);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_object = {
|
||||
@@ -370,6 +412,8 @@ static const NIVariable _niv_railtypes[] = {
|
||||
NIV(0x40, "terrain type"),
|
||||
NIV(0x41, "enhanced tunnels"),
|
||||
NIV(0x42, "level crossing status"),
|
||||
NIV(0x43, "construction date"),
|
||||
NIV(0x44, "town zone"),
|
||||
NIV_END()
|
||||
};
|
||||
|
||||
@@ -380,7 +424,14 @@ class NIHRailType : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return NULL; }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE, INVALID_STRING_ID, index); }
|
||||
uint32 GetGRFID(uint index) const { return 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetRailTypeResolver(ResolverObject *ro, uint index); GetRailTypeResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
/* There is no unique GRFFile for the tile. Multiple GRFs can define different parts of the railtype.
|
||||
* However, currently the NewGRF Debug GUI does not display variables depending on the GRF (like 0x7F) anyway. */
|
||||
RailTypeResolverObject ro(NULL, index, TCX_NORMAL, RTSG_END);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_railtype = {
|
||||
@@ -409,7 +460,12 @@ class NIHAirportTile : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return AirportTileSpec::Get(GetAirportGfx(index)); }
|
||||
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? AirportTileSpec::Get(GetAirportGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetAirportTileTypeResolver(ResolverObject *ro, uint index); GetAirportTileTypeResolver(ro, index); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
AirportTileResolverObject ro(AirportTileSpec::GetByTile(index), index, Station::GetByTile(index));
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
};
|
||||
|
||||
static const NIFeature _nif_airporttile = {
|
||||
@@ -442,10 +498,15 @@ class NIHTown : public NIHelper {
|
||||
const void *GetSpec(uint index) const { return NULL; }
|
||||
void SetStringParameters(uint index) const { this->SetSimpleStringParameters(STR_TOWN_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const { return 0; }
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const { return TownGetVariable(var, param, avail, Town::Get(index), NULL); }
|
||||
bool PSAWithParameter() const { return true; }
|
||||
uint GetPSASize(uint index, uint32 grfid) const { return cpp_lengthof(PersistentStorage, storage); }
|
||||
|
||||
/* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
|
||||
{
|
||||
TownResolverObject ro(NULL, Town::Get(index), true);
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
|
||||
const int32 *GetPSAFirstPosition(uint index, uint32 grfid) const
|
||||
{
|
||||
Town *t = Town::Get(index);
|
||||
|
||||
@@ -123,15 +123,28 @@ static const DrawTileSprites _object_hq[] = {
|
||||
|
||||
#undef TILE_SPRITE_LINE
|
||||
|
||||
#define M(name, size, build_cost_multiplier, clear_cost_multiplier, height, flags) { GRFFilePropsBase<2>(), INVALID_OBJECT_CLASS, name, 0xF, size, 0, 0, build_cost_multiplier, clear_cost_multiplier, flags, {0, 0, 0, 0}, 0, height, 1, true }
|
||||
#define M(name, size, build_cost_multiplier, clear_cost_multiplier, height, climate, gen_amount, flags) { GRFFilePropsBase<2>(), INVALID_OBJECT_CLASS, name, climate, size, build_cost_multiplier, clear_cost_multiplier, 0, MAX_DAY + 1, flags, {0, 0, 0, 0}, 0, height, 1, gen_amount, true }
|
||||
|
||||
/* Climates
|
||||
* T = Temperate
|
||||
* A = Sub-Arctic
|
||||
* S = Sub-Tropic
|
||||
* Y = Toyland */
|
||||
#define T 1
|
||||
#define A 2
|
||||
#define S 4
|
||||
#define Y 8
|
||||
/** Specification of the original object structures. */
|
||||
extern const ObjectSpec _original_objects[] = {
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER, 0x11, 0, 0, 10, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE, 0x11, 0, 0, 8, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
|
||||
M(STR_TOWN_BUILDING_NAME_STATUE_1, 0x11, 0, 0, 5, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_ONLY_IN_SCENEDIT), // Yes, we disallow building this everywhere. Happens in "special" case!
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND, 0x11, 10, 10, 0, OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_CLEAR_INCOME | OBJECT_FLAG_HAS_NO_FOUNDATION | OBJECT_FLAG_ALLOW_UNDER_BRIDGE),
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22, 0, 0, 7, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME),
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER, 0x11, 0, 0, 10, T|A|S , 15, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE, 0x11, 0, 0, 8, T|A , 8, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT | OBJECT_FLAG_SCALE_BY_WATER),
|
||||
M(STR_TOWN_BUILDING_NAME_STATUE_1, 0x11, 0, 0, 5, T|S|A|Y, 0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_ONLY_IN_SCENEDIT), // Yes, we disallow building this everywhere. Happens in "special" case!
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND, 0x11, 10, 10, 0, T|S|A|Y, 0, OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_CLEAR_INCOME | OBJECT_FLAG_HAS_NO_FOUNDATION ), // Only non-silly use case is to use it when you cannot build a station, so disallow bridges
|
||||
M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22, 0, 0, 7, T|S|A|Y, 0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME),
|
||||
};
|
||||
|
||||
#undef M
|
||||
#undef Y
|
||||
#undef S
|
||||
#undef A
|
||||
#undef T
|
||||
|
||||
@@ -147,24 +147,3 @@ static const ExtraPaletteValues _extra_palette_values = {
|
||||
M(116, 180, 196), M(148, 200, 216), M(180, 220, 232) }
|
||||
};
|
||||
#undef M
|
||||
|
||||
/** Colour mapping for the TextColours. */
|
||||
static const byte _string_colourmap[17] = {
|
||||
150, // TC_BLUE
|
||||
12, // TC_SILVER
|
||||
189, // TC_GOLD
|
||||
184, // TC_RED
|
||||
174, // TC_PURPLE
|
||||
30, // TC_LIGHT_BROWN
|
||||
195, // TC_ORANGE
|
||||
209, // TC_GREEN
|
||||
68, // TC_YELLOW
|
||||
95, // TC_DARK_GREEN
|
||||
79, // TC_CREAM
|
||||
116, // TC_BROWN
|
||||
15, // TC_WHITE
|
||||
152, // TC_LIGHT_BLUE
|
||||
6, // TC_GREY
|
||||
133, // TC_DARK_BLUE
|
||||
1, // TC_BLACK
|
||||
};
|
||||
|
||||
@@ -33,7 +33,8 @@ static const RailtypeInfo _original_railtypes[] = {
|
||||
SPR_IMG_AUTORAIL,
|
||||
SPR_IMG_DEPOT_RAIL,
|
||||
SPR_IMG_TUNNEL_RAIL,
|
||||
SPR_IMG_CONVERT_RAIL
|
||||
SPR_IMG_CONVERT_RAIL,
|
||||
{}
|
||||
},
|
||||
|
||||
{
|
||||
@@ -133,7 +134,8 @@ static const RailtypeInfo _original_railtypes[] = {
|
||||
SPR_IMG_AUTOELRAIL,
|
||||
SPR_IMG_DEPOT_ELRAIL,
|
||||
SPR_BUILD_TUNNEL_ELRAIL,
|
||||
SPR_IMG_CONVERT_ELRAIL
|
||||
SPR_IMG_CONVERT_ELRAIL,
|
||||
{}
|
||||
},
|
||||
|
||||
{
|
||||
@@ -229,7 +231,8 @@ static const RailtypeInfo _original_railtypes[] = {
|
||||
SPR_IMG_AUTOMONO,
|
||||
SPR_IMG_DEPOT_MONO,
|
||||
SPR_IMG_TUNNEL_MONO,
|
||||
SPR_IMG_CONVERT_MONO
|
||||
SPR_IMG_CONVERT_MONO,
|
||||
{}
|
||||
},
|
||||
|
||||
{
|
||||
@@ -325,7 +328,8 @@ static const RailtypeInfo _original_railtypes[] = {
|
||||
SPR_IMG_AUTOMAGLEV,
|
||||
SPR_IMG_DEPOT_MAGLEV,
|
||||
SPR_IMG_TUNNEL_MAGLEV,
|
||||
SPR_IMG_CONVERT_MAGLEV
|
||||
SPR_IMG_CONVERT_MAGLEV,
|
||||
{}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -20,14 +20,24 @@ static size_t ConvertLandscape(const char *value);
|
||||
/**
|
||||
* Settings-macro usage:
|
||||
* The list might look daunting at first, but is in general easy to understand.
|
||||
* We have two types of list:
|
||||
* The macros can be grouped depending on where the config variable is
|
||||
* stored:
|
||||
* 1. SDTG_something
|
||||
* 2. SDT_something
|
||||
* The 'G' stands for global, so this is the one you will use for a
|
||||
* SettingDescGlobVarList section meaning global variables. The other uses a
|
||||
* Base/Offset and runtime variable selection mechanism, known from the saveload
|
||||
* convention (it also has global so it should not be hard).
|
||||
* Now there are a lot of types. Easy ones are:
|
||||
* These are for global variables, so this is the one you will use
|
||||
* for a #SettingDescGlobVarList section. Here 'var' refers to a
|
||||
* global variable.
|
||||
* 2. SDTC_something
|
||||
* 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
|
||||
* #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 implicitely defined by the #SettingDesc
|
||||
* list / .ini file preamble the entry is in).
|
||||
*
|
||||
* The something part defines the type of variable to store. There are a
|
||||
* lot of types. Easy ones are:
|
||||
* - VAR: any number type, 'type' field specifies what number. eg int8 or uint32
|
||||
* - BOOL: a boolean number type
|
||||
* - STR: a string or character. 'type' field specifies what string. Normal, string, or quoted
|
||||
@@ -46,81 +56,81 @@ static size_t ConvertLandscape(const char *value);
|
||||
* on the appropriate macro.
|
||||
*/
|
||||
|
||||
#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, strval, proc, load)\
|
||||
{name, (const void*)(size_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, strval, proc, load}
|
||||
#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, strhelp, strval, proc, load, cat)\
|
||||
{name, (const void*)(size_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, strhelp, strval, proc, load, cat}
|
||||
|
||||
/* 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, strval, proc, from, to)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strval, proc, NULL), SLEG_GENERAL(sle_cmd, var, type | flags, length, from, to)}
|
||||
#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)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, NULL, cat), SLEG_GENERAL(sle_cmd, var, type | flags, length, from, to)}
|
||||
|
||||
#define SDTG_VAR(name, type, flags, guiflags, var, def, min, max, interval, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, strval, proc, from, to)
|
||||
#define SDTG_VAR(name, type, flags, guiflags, var, def, min, max, interval, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDTG_GENERAL(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTG_BOOL(name, flags, guiflags, var, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, var, 0, def, 0, 1, 0, NULL, str, strval, proc, from, to)
|
||||
#define SDTG_BOOL(name, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDTG_LIST(name, type, length, flags, guiflags, var, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_INTLIST, SL_ARR, type, flags, guiflags, var, length, def, 0, 0, 0, NULL, str, strval, proc, from, to)
|
||||
#define SDTG_LIST(name, type, length, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDTG_GENERAL(name, SDT_INTLIST, SL_ARR, type, flags, guiflags, var, length, def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTG_STR(name, type, flags, guiflags, var, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, lengthof(var), def, 0, 0, 0, NULL, str, strval, proc, from, to)
|
||||
#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, lengthof(var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, strval, proc, from, to)
|
||||
#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)
|
||||
|
||||
#define SDTG_MMANY(name, type, flags, guiflags, var, def, full, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, strval, proc, from, to)
|
||||
#define SDTG_MMANY(name, type, flags, guiflags, var, def, full, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTG_NULL(length, from, to)\
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, NULL, NULL}, SLEG_NULL(length, from, to)}
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_NULL(length, from, to)}
|
||||
|
||||
#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, NULL, NULL}, SLEG_END()}
|
||||
#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLEG_END()}
|
||||
|
||||
/* 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, strval, proc, load, from, to)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strval, proc, load), SLE_GENERAL(sle_cmd, base, var, type | flags, length, from, to)}
|
||||
#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)\
|
||||
{NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, strhelp, strval, proc, load, cat), SLE_GENERAL(sle_cmd, base, var, type | flags, length, from, to)}
|
||||
|
||||
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, strval, proc, from, to)\
|
||||
SDT_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, strval, proc, NULL, from, to)
|
||||
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDT_BOOL(base, var, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDT_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, base, var, 1, def, 0, 1, 0, NULL, str, strval, proc, NULL, from, to)
|
||||
#define SDT_BOOL(base, var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDT_LIST(base, var, type, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strval, proc, NULL, from, to)
|
||||
#define SDT_LIST(base, var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat)
|
||||
|
||||
#define SDT_STR(base, var, type, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strval, proc, NULL, from, to)
|
||||
#define SDT_STR(base, var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat)
|
||||
|
||||
#define SDT_CHR(base, var, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, strval, proc, NULL, from, to)
|
||||
#define SDT_CHR(base, var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, strhelp, strval, proc, NULL, from, to, cat)
|
||||
|
||||
#define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, strval, proc, from, to, load)\
|
||||
SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, strval, proc, load, from, to)
|
||||
#define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, load, cat)\
|
||||
SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, load, from, to, cat)
|
||||
|
||||
#define SDT_MMANY(base, var, type, flags, guiflags, def, full, str, proc, strval, from, to)\
|
||||
SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, strval, proc, NULL, from, to)
|
||||
#define SDT_MMANY(base, var, type, flags, guiflags, def, full, str, proc, strhelp, strval, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDT_NULL(length, from, to)\
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, NULL, NULL}, SLE_CONDNULL(length, from, to)}
|
||||
{{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_CONDNULL(length, from, to)}
|
||||
|
||||
|
||||
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, min, max, interval, NULL, str, strval, proc, from, to)
|
||||
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDTC_BOOL(var, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, _settings_client.var, 1, def, 0, 1, 0, NULL, str, strval, proc, from, to)
|
||||
#define SDTC_BOOL(var, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDTC_LIST(var, type, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strval, proc, from, to)
|
||||
#define SDTC_LIST(var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDTG_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTC_STR(var, type, flags, guiflags, def, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strval, proc, from, to)
|
||||
#define SDTC_STR(var, type, flags, guiflags, def, str, strhelp, strval, proc, from, to, cat)\
|
||||
SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, strhelp, strval, proc, from, to, cat)
|
||||
|
||||
#define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strval, proc, from, to)\
|
||||
SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, strval, proc, from, to)
|
||||
#define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, cat)\
|
||||
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)
|
||||
|
||||
#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, NULL, NULL}, SLE_END()}
|
||||
#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, STR_NULL, STR_NULL, NULL, NULL, SC_NONE}, SLE_END()}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
||||
|
||||
/**
|
||||
* @file sprites.h
|
||||
* This file contails all sprite-related enums and defines. These consist mainly of
|
||||
* This file contains all sprite-related enums and defines. These consist mainly of
|
||||
* the sprite numbers and a bunch of masks and macros to handle sprites and to get
|
||||
* rid of all the magic numbers in the code.
|
||||
*
|
||||
@@ -26,7 +26,7 @@
|
||||
*
|
||||
* All sprites which are described here are referenced only one to a handful of times
|
||||
* throughout the code. When introducing new sprite enums, use meaningful names.
|
||||
* Don't be lazy and typing, and only use abbrevations when their meaning is clear or
|
||||
* Don't be lazy and typing, and only use abbreviations when their meaning is clear or
|
||||
* the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVATION
|
||||
* IN THIS FILE, and perhaps add some comments in the code where it is used.
|
||||
* Now, don't whine about this being too much typing work if the enums are like
|
||||
@@ -56,7 +56,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 = 162;
|
||||
static const uint16 OPENTTD_SPRITE_COUNT = 175;
|
||||
|
||||
/* Halftile-selection sprites */
|
||||
static const SpriteID SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE;
|
||||
@@ -85,6 +85,8 @@ static const SpriteID SPR_SHARED_ORDERS_ICON = SPR_OPENTTD_BASE + 50;
|
||||
static const SpriteID SPR_PIN_UP = SPR_OPENTTD_BASE + 51; // pin icon
|
||||
static const SpriteID SPR_PIN_DOWN = SPR_OPENTTD_BASE + 52;
|
||||
|
||||
static const SpriteID SPR_CLOSEBOX = 143;
|
||||
|
||||
static const SpriteID SPR_CIRCLE_FOLDED = SPR_OPENTTD_BASE + 147; // (+) icon
|
||||
static const SpriteID SPR_CIRCLE_UNFOLDED = SPR_OPENTTD_BASE + 148; // (-) icon
|
||||
|
||||
@@ -147,8 +149,20 @@ static const SpriteID SPR_GROUP_REPLACE_OFF_ROADVEH = SPR_OPENTTD_BASE + 131;
|
||||
static const SpriteID SPR_GROUP_REPLACE_OFF_SHIP = SPR_OPENTTD_BASE + 132;
|
||||
static const SpriteID SPR_GROUP_REPLACE_OFF_AIRCRAFT = SPR_OPENTTD_BASE + 133;
|
||||
|
||||
static const SpriteID SPR_TOWN_RATING_NA = SPR_OPENTTD_BASE + 162;
|
||||
static const SpriteID SPR_TOWN_RATING_APALLING = SPR_OPENTTD_BASE + 163;
|
||||
static const SpriteID SPR_TOWN_RATING_MEDIOCRE = SPR_OPENTTD_BASE + 164;
|
||||
static const SpriteID SPR_TOWN_RATING_GOOD = SPR_OPENTTD_BASE + 165;
|
||||
|
||||
static const SpriteID SPR_IMG_SWITCH_TOOLBAR = SPR_OPENTTD_BASE + 144;
|
||||
|
||||
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_IMG_CARGOFLOW = SPR_OPENTTD_BASE + 174;
|
||||
|
||||
static const SpriteID SPR_SIGNALS_BASE = SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
||||
static const uint16 PRESIGNAL_SPRITE_COUNT = 48;
|
||||
static const uint16 PRESIGNAL_AND_SEMAPHORE_SPRITE_COUNT = 112;
|
||||
@@ -278,8 +292,12 @@ static const uint16 RAILTYPE_TUNNEL_BASE_COUNT = 16;
|
||||
static const SpriteID SPR_EMPTY_BOUNDING_BOX = SPR_RAILTYPE_TUNNEL_BASE + RAILTYPE_TUNNEL_BASE_COUNT;
|
||||
static const uint16 EMPTY_BOUNDING_BOX_SPRITE_COUNT = 1;
|
||||
|
||||
/* Black palette sprite, needed for painting (fictive) tiles outside map */
|
||||
static const SpriteID SPR_PALETTE_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT;
|
||||
static const uint16 PALETTE_SPRITE_COUNT = 1;
|
||||
|
||||
/* From where can we start putting NewGRFs? */
|
||||
static const SpriteID SPR_NEWGRFS_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT;
|
||||
static const SpriteID SPR_NEWGRFS_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT;
|
||||
|
||||
/* Manager face sprites */
|
||||
static const SpriteID SPR_GRADIENT = 874; // background gradient behind manager face
|
||||
@@ -701,14 +719,14 @@ static const SpriteID SPR_BTSGA_MGLV_Y_REAR = 4365;
|
||||
* TILE_* denotes the different tiles a suspension bridge
|
||||
* can have
|
||||
* TILE_A and TILE_B are the "beginnings" and "ends" of the
|
||||
* suspension system. they have small rectangluar endcaps
|
||||
* suspension system. They have small rectangular endcaps
|
||||
* TILE_C and TILE_D look almost identical to TILE_A and
|
||||
* TILE_B, but they do not have the "endcaps". They form the
|
||||
* middle part
|
||||
* TILE_E is a condensed configuration of two pillars. while they
|
||||
* are usually 2 pillars apart, they only have 1 pillar separation
|
||||
* here
|
||||
* TILE_F is an extended configuration of pillars. they are
|
||||
* TILE_F is an extended configuration of pillars. They are
|
||||
* plugged in when pillars should be 3 tiles apart
|
||||
*/
|
||||
static const SpriteID SPR_BTSUS_ROAD_Y_REAR_TILE_A = 2453;
|
||||
@@ -852,7 +870,7 @@ static const SpriteID SPR_BTGIR_MGLV_Y = 4403;
|
||||
* tubular bridges have 3 kinds of tiles:
|
||||
* a start tile (with only half a tube on the far side, marked _BEG
|
||||
* a middle tile (full tunnel), marked _MID
|
||||
* and an end tile (half a tube on the near side, maked _END
|
||||
* and an end tile (half a tube on the near side, marked _END
|
||||
*/
|
||||
static const SpriteID SPR_BTTUB_X_FRONT_BEG = 2559;
|
||||
static const SpriteID SPR_BTTUB_X_FRONT_MID = 2560;
|
||||
@@ -981,10 +999,10 @@ static const SpriteID SPR_CNST1_TOWNHOUSE_06_V1 = 1444;
|
||||
static const SpriteID SPR_CNST2_TOWNHOUSE_06_V1 = 1445;
|
||||
static const SpriteID SPR_BUILD_TOWNHOUSE_06_V1 = 1446; // 1st variation
|
||||
static const SpriteID SPR_GRND_TOWNHOUSE_06_V1 = 1447;
|
||||
static const SpriteID SPR_GRND_STADIUM_N = 1479; //stadium ground at north
|
||||
static const SpriteID SPR_GRND_STADIUM_E = 1480; //stadium ground at east
|
||||
static const SpriteID SPR_GRND_STADIUM_W = 1481; //stadium ground at west
|
||||
static const SpriteID SPR_GRND_STADIUM_S = 1482; //stadium ground at south
|
||||
static const SpriteID SPR_GRND_STADIUM_N = 1479; // stadium ground at north
|
||||
static const SpriteID SPR_GRND_STADIUM_E = 1480; // stadium ground at east
|
||||
static const SpriteID SPR_GRND_STADIUM_W = 1481; // stadium ground at west
|
||||
static const SpriteID SPR_GRND_STADIUM_S = 1482; // stadium ground at south
|
||||
static const SpriteID SPR_CNST1_TOWNHOUSE_06_V2 = 1501; // used as ground, but is stage1
|
||||
static const SpriteID SPR_CNST1_TOWNHOUSE_06_V2_P = 1502; // pipes extensions for previous
|
||||
static const SpriteID SPR_CNST2_TOWNHOUSE_06_V2_G = 1503; // Ground of cnst stage 2
|
||||
@@ -1078,6 +1096,7 @@ static const SpriteID SPR_IMG_MESSAGES = 680;
|
||||
static const SpriteID SPR_IMG_QUERY = 723;
|
||||
static const SpriteID SPR_IMG_SIGN = 4082;
|
||||
static const SpriteID SPR_IMG_BUY_LAND = 4791;
|
||||
static const SpriteID SPR_IMG_STORY_BOOK = SPR_OPENTTD_BASE + 169;
|
||||
|
||||
/* OpenTTD in gamescreen */
|
||||
static const SpriteID SPR_OTTD_O = 4842;
|
||||
@@ -1307,6 +1326,12 @@ static const SpriteID SPR_IMG_CONVERT_ELRAIL = SPR_OPENTTD_BASE + 59;
|
||||
static const SpriteID SPR_IMG_CONVERT_MONO = SPR_OPENTTD_BASE + 65;
|
||||
static const SpriteID SPR_IMG_CONVERT_MAGLEV = SPR_OPENTTD_BASE + 71;
|
||||
|
||||
/* story_gui.cpp */
|
||||
static const SpriteID SPR_IMG_VIEW_LOCATION = SPR_OPENTTD_BASE + 170;
|
||||
static const SpriteID SPR_IMG_GOAL = SPR_OPENTTD_BASE + 171;
|
||||
static const SpriteID SPR_IMG_GOAL_COMPLETED = SPR_OPENTTD_BASE + 172;
|
||||
static const SpriteID SPR_IMG_GOAL_BROKEN_REF= SPR_OPENTTD_BASE + 173;
|
||||
|
||||
/* intro_gui.cpp, genworld_gui.cpp */
|
||||
static const SpriteID SPR_SELECT_TEMPERATE = 4882;
|
||||
static const SpriteID SPR_SELECT_TEMPERATE_PUSHED = 4883;
|
||||
@@ -1456,11 +1481,15 @@ static const CursorID ANIMCURSOR_BUILDSIGNALS = ANIMCURSOR_FLAG | 4; ///< 1292 -
|
||||
* bits used for the recolouring process. For transparency, it must be 0x322.</li></ul>
|
||||
*/
|
||||
enum SpriteSetup {
|
||||
/* These bits are applied to sprite ID */
|
||||
TRANSPARENT_BIT = 31, ///< toggles transparency in the sprite
|
||||
RECOLOUR_BIT = 30, ///< toggles recolouring in the sprite
|
||||
CUSTOM_BIT = 29,
|
||||
OPAQUE_BIT = 28,
|
||||
|
||||
/* This bit is applied to palette ID */
|
||||
PALETTE_TEXT_RECOLOUR = 31, ///< Set if palette is actually a magic text recolour
|
||||
|
||||
PALETTE_WIDTH = 24, ///< number of bits of the sprite containing the recolour palette
|
||||
SPRITE_WIDTH = 24, ///< number of bits for the sprite number
|
||||
};
|
||||
@@ -1543,4 +1572,6 @@ static const PaletteID PALETTE_CRASH = 804; ///< Recolour sprite
|
||||
static const PaletteID PALETTE_CHURCH_RED = 1438; ///< Recolour sprite for reddish churches
|
||||
static const PaletteID PALETTE_CHURCH_CREAM = 1439; ///< Recolour sprite for white churches
|
||||
|
||||
static const PaletteID PALETTE_ALL_BLACK = SPR_PALETTE_BASE; ///< Exchange any color by black, needed for painting fictive tiles outside map
|
||||
|
||||
#endif /* SPRITES_H */
|
||||
|
||||
@@ -27,6 +27,7 @@ struct CmdStruct {
|
||||
ParseCmdProc proc;
|
||||
long value;
|
||||
uint8 consumes;
|
||||
int8 default_plural_offset;
|
||||
CmdFlags flags;
|
||||
};
|
||||
|
||||
@@ -36,143 +37,143 @@ extern void EmitGender(Buffer *buffer, char *buf, int value);
|
||||
|
||||
static const CmdStruct _cmd_structs[] = {
|
||||
/* Font size */
|
||||
{"TINY_FONT", EmitSingleChar, SCC_TINYFONT, 0, C_NONE},
|
||||
{"BIG_FONT", EmitSingleChar, SCC_BIGFONT, 0, C_NONE},
|
||||
{"TINY_FONT", EmitSingleChar, SCC_TINYFONT, 0, -1, C_NONE},
|
||||
{"BIG_FONT", EmitSingleChar, SCC_BIGFONT, 0, -1, C_NONE},
|
||||
|
||||
/* Colours */
|
||||
{"BLUE", EmitSingleChar, SCC_BLUE, 0, C_NONE},
|
||||
{"SILVER", EmitSingleChar, SCC_SILVER, 0, C_NONE},
|
||||
{"GOLD", EmitSingleChar, SCC_GOLD, 0, C_NONE},
|
||||
{"RED", EmitSingleChar, SCC_RED, 0, C_NONE},
|
||||
{"PURPLE", EmitSingleChar, SCC_PURPLE, 0, C_NONE},
|
||||
{"LTBROWN", EmitSingleChar, SCC_LTBROWN, 0, C_NONE},
|
||||
{"ORANGE", EmitSingleChar, SCC_ORANGE, 0, C_NONE},
|
||||
{"GREEN", EmitSingleChar, SCC_GREEN, 0, C_NONE},
|
||||
{"YELLOW", EmitSingleChar, SCC_YELLOW, 0, C_NONE},
|
||||
{"DKGREEN", EmitSingleChar, SCC_DKGREEN, 0, C_NONE},
|
||||
{"CREAM", EmitSingleChar, SCC_CREAM, 0, C_NONE},
|
||||
{"BROWN", EmitSingleChar, SCC_BROWN, 0, C_NONE},
|
||||
{"WHITE", EmitSingleChar, SCC_WHITE, 0, C_NONE},
|
||||
{"LTBLUE", EmitSingleChar, SCC_LTBLUE, 0, C_NONE},
|
||||
{"GRAY", EmitSingleChar, SCC_GRAY, 0, C_NONE},
|
||||
{"DKBLUE", EmitSingleChar, SCC_DKBLUE, 0, C_NONE},
|
||||
{"BLACK", EmitSingleChar, SCC_BLACK, 0, C_NONE},
|
||||
{"BLUE", EmitSingleChar, SCC_BLUE, 0, -1, C_DONTCOUNT},
|
||||
{"SILVER", EmitSingleChar, SCC_SILVER, 0, -1, C_DONTCOUNT},
|
||||
{"GOLD", EmitSingleChar, SCC_GOLD, 0, -1, C_DONTCOUNT},
|
||||
{"RED", EmitSingleChar, SCC_RED, 0, -1, C_DONTCOUNT},
|
||||
{"PURPLE", EmitSingleChar, SCC_PURPLE, 0, -1, C_DONTCOUNT},
|
||||
{"LTBROWN", EmitSingleChar, SCC_LTBROWN, 0, -1, C_DONTCOUNT},
|
||||
{"ORANGE", EmitSingleChar, SCC_ORANGE, 0, -1, C_DONTCOUNT},
|
||||
{"GREEN", EmitSingleChar, SCC_GREEN, 0, -1, C_DONTCOUNT},
|
||||
{"YELLOW", EmitSingleChar, SCC_YELLOW, 0, -1, C_DONTCOUNT},
|
||||
{"DKGREEN", EmitSingleChar, SCC_DKGREEN, 0, -1, C_DONTCOUNT},
|
||||
{"CREAM", EmitSingleChar, SCC_CREAM, 0, -1, C_DONTCOUNT},
|
||||
{"BROWN", EmitSingleChar, SCC_BROWN, 0, -1, C_DONTCOUNT},
|
||||
{"WHITE", EmitSingleChar, SCC_WHITE, 0, -1, C_DONTCOUNT},
|
||||
{"LTBLUE", EmitSingleChar, SCC_LTBLUE, 0, -1, C_DONTCOUNT},
|
||||
{"GRAY", EmitSingleChar, SCC_GRAY, 0, -1, C_DONTCOUNT},
|
||||
{"DKBLUE", EmitSingleChar, SCC_DKBLUE, 0, -1, C_DONTCOUNT},
|
||||
{"BLACK", EmitSingleChar, SCC_BLACK, 0, -1, C_DONTCOUNT},
|
||||
|
||||
{"REV", EmitSingleChar, SCC_REVISION, 0, C_NONE}, // openttd revision string
|
||||
{"REV", EmitSingleChar, SCC_REVISION, 0, -1, C_NONE}, // openttd revision string
|
||||
|
||||
{"STRING1", EmitSingleChar, SCC_STRING1, 2, C_CASE | C_GENDER}, // included string that consumes the string id and ONE argument
|
||||
{"STRING2", EmitSingleChar, SCC_STRING2, 3, C_CASE | C_GENDER}, // included string that consumes the string id and TWO arguments
|
||||
{"STRING3", EmitSingleChar, SCC_STRING3, 4, C_CASE | C_GENDER}, // included string that consumes the string id and THREE arguments
|
||||
{"STRING4", EmitSingleChar, SCC_STRING4, 5, C_CASE | C_GENDER}, // included string that consumes the string id and FOUR arguments
|
||||
{"STRING5", EmitSingleChar, SCC_STRING5, 6, C_CASE | C_GENDER}, // included string that consumes the string id and FIVE arguments
|
||||
{"STRING6", EmitSingleChar, SCC_STRING6, 7, C_CASE | C_GENDER}, // included string that consumes the string id and SIX arguments
|
||||
{"STRING7", EmitSingleChar, SCC_STRING7, 8, C_CASE | C_GENDER}, // included string that consumes the string id and SEVEN arguments
|
||||
{"STRING1", EmitSingleChar, SCC_STRING1, 2, -1, C_CASE | C_GENDER}, // included string that consumes the string id and ONE argument
|
||||
{"STRING2", EmitSingleChar, SCC_STRING2, 3, -1, C_CASE | C_GENDER}, // included string that consumes the string id and TWO arguments
|
||||
{"STRING3", EmitSingleChar, SCC_STRING3, 4, -1, C_CASE | C_GENDER}, // included string that consumes the string id and THREE arguments
|
||||
{"STRING4", EmitSingleChar, SCC_STRING4, 5, -1, C_CASE | C_GENDER}, // included string that consumes the string id and FOUR arguments
|
||||
{"STRING5", EmitSingleChar, SCC_STRING5, 6, -1, C_CASE | C_GENDER}, // included string that consumes the string id and FIVE arguments
|
||||
{"STRING6", EmitSingleChar, SCC_STRING6, 7, -1, C_CASE | C_GENDER}, // included string that consumes the string id and SIX arguments
|
||||
{"STRING7", EmitSingleChar, SCC_STRING7, 8, -1, C_CASE | C_GENDER}, // included string that consumes the string id and SEVEN arguments
|
||||
|
||||
{"STATION_FEATURES", EmitSingleChar, SCC_STATION_FEATURES, 1, C_NONE}, // station features string, icons of the features
|
||||
{"INDUSTRY", EmitSingleChar, SCC_INDUSTRY_NAME, 1, C_CASE | C_GENDER}, // industry, takes an industry #, can have cases
|
||||
{"CARGO_LONG", EmitSingleChar, SCC_CARGO_LONG, 2, C_NONE | C_GENDER},
|
||||
{"CARGO_SHORT", EmitSingleChar, SCC_CARGO_SHORT, 2, C_NONE}, // short cargo description, only ### tons, or ### litres
|
||||
{"CARGO_TINY", EmitSingleChar, SCC_CARGO_TINY, 2, C_NONE}, // tiny cargo description with only the amount, not a specifier for the amount or the actual cargo name
|
||||
{"CARGO_LIST", EmitSingleChar, SCC_CARGO_LIST, 1, C_CASE},
|
||||
{"POWER", EmitSingleChar, SCC_POWER, 1, C_NONE},
|
||||
{"VOLUME_LONG", EmitSingleChar, SCC_VOLUME_LONG, 1, C_NONE},
|
||||
{"VOLUME_SHORT", EmitSingleChar, SCC_VOLUME_SHORT, 1, C_NONE},
|
||||
{"WEIGHT_LONG", EmitSingleChar, SCC_WEIGHT_LONG, 1, C_NONE},
|
||||
{"WEIGHT_SHORT", EmitSingleChar, SCC_WEIGHT_SHORT, 1, C_NONE},
|
||||
{"FORCE", EmitSingleChar, SCC_FORCE, 1, C_NONE},
|
||||
{"VELOCITY", EmitSingleChar, SCC_VELOCITY, 1, C_NONE},
|
||||
{"HEIGHT", EmitSingleChar, SCC_HEIGHT, 1, C_NONE},
|
||||
{"STATION_FEATURES", EmitSingleChar, SCC_STATION_FEATURES, 1, -1, C_NONE}, // station features string, icons of the features
|
||||
{"INDUSTRY", EmitSingleChar, SCC_INDUSTRY_NAME, 1, -1, C_CASE | C_GENDER}, // industry, takes an industry #, can have cases
|
||||
{"CARGO_LONG", EmitSingleChar, SCC_CARGO_LONG, 2, 1, C_NONE | C_GENDER},
|
||||
{"CARGO_SHORT", EmitSingleChar, SCC_CARGO_SHORT, 2, 1, C_NONE}, // short cargo description, only ### tons, or ### litres
|
||||
{"CARGO_TINY", EmitSingleChar, SCC_CARGO_TINY, 2, 1, C_NONE}, // tiny cargo description with only the amount, not a specifier for the amount or the actual cargo name
|
||||
{"CARGO_LIST", EmitSingleChar, SCC_CARGO_LIST, 1, -1, C_CASE},
|
||||
{"POWER", EmitSingleChar, SCC_POWER, 1, 0, C_NONE},
|
||||
{"VOLUME_LONG", EmitSingleChar, SCC_VOLUME_LONG, 1, 0, C_NONE},
|
||||
{"VOLUME_SHORT", EmitSingleChar, SCC_VOLUME_SHORT, 1, 0, C_NONE},
|
||||
{"WEIGHT_LONG", EmitSingleChar, SCC_WEIGHT_LONG, 1, 0, C_NONE},
|
||||
{"WEIGHT_SHORT", EmitSingleChar, SCC_WEIGHT_SHORT, 1, 0, C_NONE},
|
||||
{"FORCE", EmitSingleChar, SCC_FORCE, 1, 0, C_NONE},
|
||||
{"VELOCITY", EmitSingleChar, SCC_VELOCITY, 1, 0, C_NONE},
|
||||
{"HEIGHT", EmitSingleChar, SCC_HEIGHT, 1, 0, C_NONE},
|
||||
|
||||
{"P", EmitPlural, 0, 0, C_DONTCOUNT}, // plural specifier
|
||||
{"G", EmitGender, 0, 0, C_DONTCOUNT}, // gender specifier
|
||||
{"P", EmitPlural, 0, 0, -1, C_DONTCOUNT}, // plural specifier
|
||||
{"G", EmitGender, 0, 0, -1, C_DONTCOUNT}, // gender specifier
|
||||
|
||||
{"DATE_TINY", EmitSingleChar, SCC_DATE_TINY, 1, C_NONE},
|
||||
{"DATE_SHORT", EmitSingleChar, SCC_DATE_SHORT, 1, C_CASE},
|
||||
{"DATE_LONG", EmitSingleChar, SCC_DATE_LONG, 1, C_CASE},
|
||||
{"DATE_ISO", EmitSingleChar, SCC_DATE_ISO, 1, C_NONE},
|
||||
{"DATE_TINY", EmitSingleChar, SCC_DATE_TINY, 1, -1, C_NONE},
|
||||
{"DATE_SHORT", EmitSingleChar, SCC_DATE_SHORT, 1, -1, C_CASE},
|
||||
{"DATE_LONG", EmitSingleChar, SCC_DATE_LONG, 1, -1, C_CASE},
|
||||
{"DATE_ISO", EmitSingleChar, SCC_DATE_ISO, 1, -1, C_NONE},
|
||||
|
||||
{"STRING", EmitSingleChar, SCC_STRING, 1, C_CASE | C_GENDER},
|
||||
{"RAW_STRING", EmitSingleChar, SCC_RAW_STRING_POINTER, 1, C_NONE | C_GENDER},
|
||||
{"STRING", EmitSingleChar, SCC_STRING, 1, -1, C_CASE | C_GENDER},
|
||||
{"RAW_STRING", EmitSingleChar, SCC_RAW_STRING_POINTER, 1, -1, C_NONE | C_GENDER},
|
||||
|
||||
/* Numbers */
|
||||
{"COMMA", EmitSingleChar, SCC_COMMA, 1, C_NONE}, // Number with comma
|
||||
{"DECIMAL", EmitSingleChar, SCC_DECIMAL, 2, C_NONE}, // Number with comma and fractional part. Second parameter is number of fractional digits, first parameter is number times 10**(second parameter).
|
||||
{"NUM", EmitSingleChar, SCC_NUM, 1, C_NONE}, // Signed number
|
||||
{"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, C_NONE}, // Unsigned number with zero fill, e.g. "02". First parameter is number, second minimum length
|
||||
{"BYTES", EmitSingleChar, SCC_BYTES, 1, C_NONE}, // Unsigned number with "bytes", i.e. "1.02 MiB or 123 KiB"
|
||||
{"HEX", EmitSingleChar, SCC_HEX, 1, C_NONE}, // Hexadecimally printed number
|
||||
{"COMMA", EmitSingleChar, SCC_COMMA, 1, 0, C_NONE}, // Number with comma
|
||||
{"DECIMAL", EmitSingleChar, SCC_DECIMAL, 2, 0, C_NONE}, // Number with comma and fractional part. Second parameter is number of fractional digits, first parameter is number times 10**(second parameter).
|
||||
{"NUM", EmitSingleChar, SCC_NUM, 1, 0, C_NONE}, // Signed number
|
||||
{"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, 0, C_NONE}, // Unsigned number with zero fill, e.g. "02". First parameter is number, second minimum length
|
||||
{"BYTES", EmitSingleChar, SCC_BYTES, 1, 0, C_NONE}, // Unsigned number with "bytes", i.e. "1.02 MiB or 123 KiB"
|
||||
{"HEX", EmitSingleChar, SCC_HEX, 1, 0, C_NONE}, // Hexadecimally printed number
|
||||
|
||||
{"CURRENCY_LONG", EmitSingleChar, SCC_CURRENCY_LONG, 1, C_NONE},
|
||||
{"CURRENCY_SHORT", EmitSingleChar, SCC_CURRENCY_SHORT, 1, C_NONE}, // compact currency
|
||||
{"CURRENCY_LONG", EmitSingleChar, SCC_CURRENCY_LONG, 1, 0, C_NONE},
|
||||
{"CURRENCY_SHORT", EmitSingleChar, SCC_CURRENCY_SHORT, 1, 0, C_NONE}, // compact currency
|
||||
|
||||
{"WAYPOINT", EmitSingleChar, SCC_WAYPOINT_NAME, 1, C_NONE | C_GENDER}, // waypoint name
|
||||
{"STATION", EmitSingleChar, SCC_STATION_NAME, 1, C_NONE | C_GENDER},
|
||||
{"DEPOT", EmitSingleChar, SCC_DEPOT_NAME, 2, C_NONE | C_GENDER},
|
||||
{"TOWN", EmitSingleChar, SCC_TOWN_NAME, 1, C_NONE | C_GENDER},
|
||||
{"GROUP", EmitSingleChar, SCC_GROUP_NAME, 1, C_NONE | C_GENDER},
|
||||
{"SIGN", EmitSingleChar, SCC_SIGN_NAME, 1, C_NONE | C_GENDER},
|
||||
{"ENGINE", EmitSingleChar, SCC_ENGINE_NAME, 1, C_NONE | C_GENDER},
|
||||
{"VEHICLE", EmitSingleChar, SCC_VEHICLE_NAME, 1, C_NONE | C_GENDER},
|
||||
{"COMPANY", EmitSingleChar, SCC_COMPANY_NAME, 1, C_NONE | C_GENDER},
|
||||
{"COMPANY_NUM", EmitSingleChar, SCC_COMPANY_NUM, 1, C_NONE},
|
||||
{"PRESIDENT_NAME", EmitSingleChar, SCC_PRESIDENT_NAME, 1, C_NONE | C_GENDER},
|
||||
{"WAYPOINT", EmitSingleChar, SCC_WAYPOINT_NAME, 1, -1, C_NONE | C_GENDER}, // waypoint name
|
||||
{"STATION", EmitSingleChar, SCC_STATION_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"DEPOT", EmitSingleChar, SCC_DEPOT_NAME, 2, -1, C_NONE | C_GENDER},
|
||||
{"TOWN", EmitSingleChar, SCC_TOWN_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"GROUP", EmitSingleChar, SCC_GROUP_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"SIGN", EmitSingleChar, SCC_SIGN_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"ENGINE", EmitSingleChar, SCC_ENGINE_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"VEHICLE", EmitSingleChar, SCC_VEHICLE_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"COMPANY", EmitSingleChar, SCC_COMPANY_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
{"COMPANY_NUM", EmitSingleChar, SCC_COMPANY_NUM, 1, -1, C_NONE},
|
||||
{"PRESIDENT_NAME", EmitSingleChar, SCC_PRESIDENT_NAME, 1, -1, C_NONE | C_GENDER},
|
||||
|
||||
{"", EmitSingleChar, '\n', 0, C_DONTCOUNT},
|
||||
{"{", EmitSingleChar, '{', 0, C_DONTCOUNT},
|
||||
{"UP_ARROW", EmitSingleChar, SCC_UP_ARROW, 0, C_DONTCOUNT},
|
||||
{"SMALL_UP_ARROW", EmitSingleChar, SCC_SMALL_UP_ARROW, 0, C_DONTCOUNT},
|
||||
{"SMALL_DOWN_ARROW", EmitSingleChar, SCC_SMALL_DOWN_ARROW, 0, C_DONTCOUNT},
|
||||
{"TRAIN", EmitSingleChar, SCC_TRAIN, 0, C_DONTCOUNT},
|
||||
{"LORRY", EmitSingleChar, SCC_LORRY, 0, C_DONTCOUNT},
|
||||
{"BUS", EmitSingleChar, SCC_BUS, 0, C_DONTCOUNT},
|
||||
{"PLANE", EmitSingleChar, SCC_PLANE, 0, C_DONTCOUNT},
|
||||
{"SHIP", EmitSingleChar, SCC_SHIP, 0, C_DONTCOUNT},
|
||||
{"NBSP", EmitSingleChar, 0xA0, 0, C_DONTCOUNT},
|
||||
{"CENT", EmitSingleChar, 0xA2, 0, C_DONTCOUNT},
|
||||
{"POUND_SIGN", EmitSingleChar, 0xA3, 0, C_DONTCOUNT},
|
||||
{"EURO", EmitSingleChar, 0x20AC, 0, C_DONTCOUNT},
|
||||
{"YEN_SIGN", EmitSingleChar, 0xA5, 0, C_DONTCOUNT},
|
||||
{"COPYRIGHT", EmitSingleChar, 0xA9, 0, C_DONTCOUNT},
|
||||
{"DOWN_ARROW", EmitSingleChar, SCC_DOWN_ARROW, 0, C_DONTCOUNT},
|
||||
{"CHECKMARK", EmitSingleChar, SCC_CHECKMARK, 0, C_DONTCOUNT},
|
||||
{"CROSS", EmitSingleChar, SCC_CROSS, 0, C_DONTCOUNT},
|
||||
{"REGISTERED", EmitSingleChar, 0xAE, 0, C_DONTCOUNT},
|
||||
{"RIGHT_ARROW", EmitSingleChar, SCC_RIGHT_ARROW, 0, C_DONTCOUNT},
|
||||
{"SMALL_LEFT_ARROW", EmitSingleChar, SCC_LESS_THAN, 0, C_DONTCOUNT},
|
||||
{"SMALL_RIGHT_ARROW", EmitSingleChar, SCC_GREATER_THAN, 0, C_DONTCOUNT},
|
||||
{"", EmitSingleChar, '\n', 0, -1, C_DONTCOUNT},
|
||||
{"{", EmitSingleChar, '{', 0, -1, C_DONTCOUNT},
|
||||
{"UP_ARROW", EmitSingleChar, SCC_UP_ARROW, 0, -1, C_DONTCOUNT},
|
||||
{"SMALL_UP_ARROW", EmitSingleChar, SCC_SMALL_UP_ARROW, 0, -1, C_DONTCOUNT},
|
||||
{"SMALL_DOWN_ARROW", EmitSingleChar, SCC_SMALL_DOWN_ARROW, 0, -1, C_DONTCOUNT},
|
||||
{"TRAIN", EmitSingleChar, SCC_TRAIN, 0, -1, C_DONTCOUNT},
|
||||
{"LORRY", EmitSingleChar, SCC_LORRY, 0, -1, C_DONTCOUNT},
|
||||
{"BUS", EmitSingleChar, SCC_BUS, 0, -1, C_DONTCOUNT},
|
||||
{"PLANE", EmitSingleChar, SCC_PLANE, 0, -1, C_DONTCOUNT},
|
||||
{"SHIP", EmitSingleChar, SCC_SHIP, 0, -1, C_DONTCOUNT},
|
||||
{"NBSP", EmitSingleChar, 0xA0, 0, -1, C_DONTCOUNT},
|
||||
{"COPYRIGHT", EmitSingleChar, 0xA9, 0, -1, C_DONTCOUNT},
|
||||
{"DOWN_ARROW", EmitSingleChar, SCC_DOWN_ARROW, 0, -1, C_DONTCOUNT},
|
||||
{"CHECKMARK", EmitSingleChar, SCC_CHECKMARK, 0, -1, C_DONTCOUNT},
|
||||
{"CROSS", EmitSingleChar, SCC_CROSS, 0, -1, C_DONTCOUNT},
|
||||
{"RIGHT_ARROW", EmitSingleChar, SCC_RIGHT_ARROW, 0, -1, C_DONTCOUNT},
|
||||
{"SMALL_LEFT_ARROW", EmitSingleChar, SCC_LESS_THAN, 0, -1, C_DONTCOUNT},
|
||||
{"SMALL_RIGHT_ARROW", EmitSingleChar, SCC_GREATER_THAN, 0, -1, C_DONTCOUNT},
|
||||
|
||||
/* The following are directional formatting codes used to get the RTL strings right:
|
||||
* http://www.unicode.org/unicode/reports/tr9/#Directional_Formatting_Codes */
|
||||
{"LRM", EmitSingleChar, CHAR_TD_LRM, 0, C_DONTCOUNT},
|
||||
{"RLM", EmitSingleChar, CHAR_TD_RLM, 0, C_DONTCOUNT},
|
||||
{"LRE", EmitSingleChar, CHAR_TD_LRE, 0, C_DONTCOUNT},
|
||||
{"RLE", EmitSingleChar, CHAR_TD_RLE, 0, C_DONTCOUNT},
|
||||
{"LRO", EmitSingleChar, CHAR_TD_LRO, 0, C_DONTCOUNT},
|
||||
{"RLO", EmitSingleChar, CHAR_TD_RLO, 0, C_DONTCOUNT},
|
||||
{"PDF", EmitSingleChar, CHAR_TD_PDF, 0, C_DONTCOUNT},
|
||||
{"LRM", EmitSingleChar, CHAR_TD_LRM, 0, -1, C_DONTCOUNT},
|
||||
{"RLM", EmitSingleChar, CHAR_TD_RLM, 0, -1, C_DONTCOUNT},
|
||||
{"LRE", EmitSingleChar, CHAR_TD_LRE, 0, -1, C_DONTCOUNT},
|
||||
{"RLE", EmitSingleChar, CHAR_TD_RLE, 0, -1, C_DONTCOUNT},
|
||||
{"LRO", EmitSingleChar, CHAR_TD_LRO, 0, -1, C_DONTCOUNT},
|
||||
{"RLO", EmitSingleChar, CHAR_TD_RLO, 0, -1, C_DONTCOUNT},
|
||||
{"PDF", EmitSingleChar, CHAR_TD_PDF, 0, -1, C_DONTCOUNT},
|
||||
};
|
||||
|
||||
/** Description of a plural form */
|
||||
struct PluralForm {
|
||||
int plural_count; ///< The number of plural forms
|
||||
const char *description; ///< Human readable description of the form
|
||||
const char *names; ///< Plural names
|
||||
};
|
||||
|
||||
/** The maximum number of plurals. */
|
||||
static const int MAX_PLURALS = 5;
|
||||
|
||||
/** All plural forms used */
|
||||
static const PluralForm _plural_forms[] = {
|
||||
{ 2, "Two forms, singular used for 1 only" },
|
||||
{ 1, "Only one form" },
|
||||
{ 2, "Two forms, singular used for zero and 1" },
|
||||
{ 3, "Three forms, special case for 0 and ending in 1, except those ending in 11" },
|
||||
{ 5, "Five forms, special case for one, two, 3 to 6 and 7 to 10" },
|
||||
{ 3, "Three forms, special case for numbers ending in 1[2-9]" },
|
||||
{ 3, "Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4]" },
|
||||
{ 3, "Three forms, special case for 1 and some numbers ending in 2, 3, or 4" },
|
||||
{ 4, "Four forms, special case for 1 and all numbers ending in 02, 03, or 04" },
|
||||
{ 2, "Two forms, singular used for everything ending in 1 but not in 11" },
|
||||
{ 3, "Three forms, special case for 1 and 2, 3, or 4" },
|
||||
{ 2, "Two forms, cases for numbers ending with a consonant and with a vowel" },
|
||||
{ 4, "Four forms: one, 0 and everything ending in 02..10, everything ending in 11..19" },
|
||||
{ 2, "Two forms: special case for 1.", "\"1\" \"other\"" },
|
||||
{ 1, "Only one form.", "\"other\"" },
|
||||
{ 2, "Two forms: special case for 0 to 1.", "\"0..1\" \"other\"" },
|
||||
{ 3, "Three forms: special cases for 0, and numbers ending in 1 except when ending in 11.", "\"1,21,31,...\" \"other\" \"0\"" },
|
||||
{ 5, "Five forms: special cases for 1, 2, 3 to 6, and 7 to 10.", "\"1\" \"2\" \"3..6\" \"7..10\" \"other\"" },
|
||||
{ 3, "Three forms: special cases for numbers ending in 1 except when ending in 11, and 2 to 9 except when ending in 12 to 19.", "\"1,21,31,...\" \"2..9,22..29,32..39,...\" \"other\"" },
|
||||
{ 3, "Three forms: special cases for numbers ending in 1 except when ending in 11, and 2 to 4 except when ending in 12 to 14.", "\"1,21,31,...\" \"2..4,22..24,32..34,...\" \"other\"" },
|
||||
{ 3, "Three forms: special cases for 1, and numbers ending in 2 to 4 except when ending in 12 to 14.", "\"1\" \"2..4,22..24,32..34,...\" \"other\"" },
|
||||
{ 4, "Four forms: special cases for numbers ending in 01, 02, and 03 to 04.", "\"1,101,201,...\" \"2,102,202,...\" \"3..4,103..104,203..204,...\" \"other\"" },
|
||||
{ 2, "Two forms: special case for numbers ending in 1 except when ending in 11.", "\"1,21,31,...\" \"other\"" },
|
||||
{ 3, "Three forms: special cases for 1, and 2 to 4.", "\"1\" \"2..4\" \"other\"" },
|
||||
{ 2, "Two forms: cases for numbers ending with a consonant, and with a vowel.", "\"yeong,il,sam,yuk,chil,pal\" \"i,sa,o,gu\"" },
|
||||
{ 4, "Four forms: special cases for 1, 0 and numbers ending in 02 to 10, and numbers ending in 11 to 19.", "\"1\" \"0,2..10,102..110,202..210,...\" \"11..19,111..119,211..219,...\" \"other\"" },
|
||||
{ 4, "Four forms: special cases for 1 and 11, 2 and 12, 3..10 and 13..19.", "\"1,11\" \"2,12\" \"3..10,13..19\" \"other\"" },
|
||||
};
|
||||
|
||||
/* Flags:
|
||||
@@ -196,7 +197,7 @@ static const char * const _pragmas[][4] = {
|
||||
{ "plural", "tp", "0", "Plural form to use" },
|
||||
{ "textdir", "tl", "ltr", "Text direction. Either ltr (left-to-right) or rtl (right-to-left)" },
|
||||
{ "digitsep", "td", ",", "Digit grouping separator for non-currency numbers" },
|
||||
{ "digitsepcur", "td", ",", "Digit grouping seprarator for currency numbers" },
|
||||
{ "digitsepcur", "td", ",", "Digit grouping separator for currency numbers" },
|
||||
{ "decimalsep", "td", ".", "Decimal separator" },
|
||||
{ "winlangid", "x2", "0x0000", "Language ID for Windows" },
|
||||
{ "grflangid", "x1", "0x00", "Language ID for NewGRFs" },
|
||||
|
||||
31
src/table/string_colours.h
Normal file
31
src/table/string_colours.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file string_colours.h The colour translation of GRF's strings. */
|
||||
|
||||
/** Colour mapping for the TextColours. */
|
||||
static const byte _string_colourmap[17] = {
|
||||
150, // TC_BLUE
|
||||
12, // TC_SILVER
|
||||
189, // TC_GOLD
|
||||
184, // TC_RED
|
||||
174, // TC_PURPLE
|
||||
30, // TC_LIGHT_BROWN
|
||||
195, // TC_ORANGE
|
||||
209, // TC_GREEN
|
||||
68, // TC_YELLOW
|
||||
95, // TC_DARK_GREEN
|
||||
79, // TC_CREAM
|
||||
116, // TC_BROWN
|
||||
15, // TC_WHITE
|
||||
152, // TC_LIGHT_BLUE
|
||||
6, // TC_GREY
|
||||
133, // TC_DARK_BLUE
|
||||
1, // TC_BLACK
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -627,9 +627,9 @@ static const char * const _name_spanish_real[] = {
|
||||
"Morrocoy",
|
||||
"Cata",
|
||||
"Cataito",
|
||||
"Ciudad Bolivar",
|
||||
"Ciudad Bol\xC3\xADvar",
|
||||
"Barquisimeto",
|
||||
"Merida",
|
||||
"M\xC3\xA9rida",
|
||||
"Puerto Ordaz",
|
||||
"Santa Elena",
|
||||
"San Juan",
|
||||
@@ -638,12 +638,12 @@ static const char * const _name_spanish_real[] = {
|
||||
"Santiago",
|
||||
"Barcelona",
|
||||
"Barinas",
|
||||
"San Cristobal",
|
||||
"San Crist\xC3\xB3""bal",
|
||||
"San Fransisco",
|
||||
"San Martin",
|
||||
"San Mart\xC3\xADn",
|
||||
"Guayana",
|
||||
"San Carlos",
|
||||
"El Limon",
|
||||
"El Lim\xC3\xB3n",
|
||||
"Coro",
|
||||
"Corocoro",
|
||||
"Puerto Ayacucho",
|
||||
@@ -663,7 +663,7 @@ static const char * const _name_spanish_real[] = {
|
||||
"Quito",
|
||||
"Cuenca",
|
||||
"Huacho",
|
||||
"Tulcan",
|
||||
"Tulc\xC3\xA1n",
|
||||
"Esmeraldas",
|
||||
"Ibarra",
|
||||
"San Lorenzo",
|
||||
@@ -674,20 +674,20 @@ static const char * const _name_spanish_real[] = {
|
||||
"Latacunga",
|
||||
"Tena",
|
||||
"Cochabamba",
|
||||
"Ascension",
|
||||
"Ascensi\xC3\xB3n",
|
||||
"Magdalena",
|
||||
"Santa Ana",
|
||||
"Manoa",
|
||||
"Sucre",
|
||||
"Oruro",
|
||||
"Uyuni",
|
||||
"Potosi",
|
||||
"Potos\xC3\xAD",
|
||||
"Tupiza",
|
||||
"La Quiaca",
|
||||
"Yacuiba",
|
||||
"San Borja",
|
||||
"Fuerte Olimpio",
|
||||
"Fortin Esteros",
|
||||
"Fort\xC3\xADn Esteros",
|
||||
"Campo Grande",
|
||||
"Bogota",
|
||||
"El Banco",
|
||||
@@ -1729,7 +1729,7 @@ static const char * const _name_czech_patmod[][3] = {
|
||||
/* CZG_PNEUT */ { "\xC3\xAD", "\xC3\xA1", "a" }
|
||||
};
|
||||
|
||||
/* This way the substantives can choose only some adjectives/endings:
|
||||
/* This way the substantive can choose only some adjectives/endings:
|
||||
* At least one of these flags must be satisfied: */
|
||||
enum CzechAllow {
|
||||
CZA_SHORT = 1,
|
||||
@@ -2612,7 +2612,7 @@ static const char * const _name_swiss_real[] = {
|
||||
"Sursee",
|
||||
"Schwyz",
|
||||
"Thalwil",
|
||||
"Thônex",
|
||||
"Th\xC3\xB4nex",
|
||||
"Thun",
|
||||
"Uster",
|
||||
"Uzwil",
|
||||
@@ -3149,7 +3149,7 @@ static const char * const _name_italian_river2[] = {
|
||||
|
||||
static const char * const _name_catalan_real[] = {
|
||||
"Barcelona",
|
||||
"Hospitalet",
|
||||
"L'Hospitalet de Llobregat",
|
||||
"Cerdanyola",
|
||||
"Martorell",
|
||||
"Badalona",
|
||||
@@ -3161,7 +3161,7 @@ static const char * const _name_catalan_real[] = {
|
||||
"Reus",
|
||||
"Valls",
|
||||
"Vic",
|
||||
"Vielha",
|
||||
"Vielha e Mijaran",
|
||||
"Amposta",
|
||||
"Tortosa",
|
||||
"Berga",
|
||||
@@ -3171,12 +3171,12 @@ static const char * const _name_catalan_real[] = {
|
||||
"Figueres",
|
||||
"Balaguer",
|
||||
"Vilafranca del Pened\xC3\xA8s",
|
||||
"La seu d'Urgell",
|
||||
"Pont de Suert",
|
||||
"La Seu d'Urgell",
|
||||
"El Pont de Suert",
|
||||
"Igualada",
|
||||
"Manresa",
|
||||
"Solsona",
|
||||
"Les borges blanques",
|
||||
"Les Borges Blanques",
|
||||
"Tremp",
|
||||
"Sort",
|
||||
"Colera",
|
||||
@@ -3194,21 +3194,21 @@ static const char * const _name_catalan_real[] = {
|
||||
"Campdev\xC3\xA0nol",
|
||||
"Cambrils",
|
||||
"Begur",
|
||||
"Set Cases",
|
||||
"Setcases",
|
||||
"Palafrugell",
|
||||
"Begues",
|
||||
"El Bruc",
|
||||
"Cadaqu\xC3\xA9s",
|
||||
"Collbat\xC3\xB3",
|
||||
"Cervell\xC3\xB3",
|
||||
"Esparraguera",
|
||||
"Esparreguera",
|
||||
"Abrera",
|
||||
"Alp",
|
||||
"Das",
|
||||
"Cercs",
|
||||
"Manlleu",
|
||||
"Masnou",
|
||||
"Molins de rei",
|
||||
"El Masnou",
|
||||
"Molins de Rei",
|
||||
"Monistrol",
|
||||
"Rocallaura",
|
||||
"Rub\xC3\xAD",
|
||||
@@ -3218,15 +3218,15 @@ static const char * const _name_catalan_real[] = {
|
||||
};
|
||||
|
||||
static const char * const _name_catalan_pref[] = {
|
||||
"Pont de ",
|
||||
"El Pont de ",
|
||||
"Parets de ",
|
||||
"Canet de ",
|
||||
"Castellar de ",
|
||||
"Corbera de ",
|
||||
"Arenys de ",
|
||||
"Calella de ",
|
||||
"La seu de ",
|
||||
"La bisbal de ",
|
||||
"La Seu de ",
|
||||
"La Bisbal de ",
|
||||
"Torroella de ",
|
||||
"Port de ",
|
||||
"Vilafranca de ",
|
||||
@@ -3262,13 +3262,13 @@ static const char * const _name_catalan_1m[] = {
|
||||
};
|
||||
|
||||
static const char * const _name_catalan_1f[] = {
|
||||
"Aigua",
|
||||
"Selva ",
|
||||
"Pala",
|
||||
"Selva",
|
||||
"Vall",
|
||||
"Serra",
|
||||
"Torre",
|
||||
"Riba",
|
||||
"Vall",
|
||||
"Cova",
|
||||
"Terra",
|
||||
};
|
||||
|
||||
@@ -3280,7 +3280,7 @@ static const char * const _name_catalan_2m[] = {
|
||||
"vent\xC3\xB3s",
|
||||
"negre",
|
||||
"roig",
|
||||
"gris",
|
||||
"gr\xC3\xADs",
|
||||
};
|
||||
|
||||
static const char * const _name_catalan_2f[] = {
|
||||
@@ -3295,16 +3295,16 @@ static const char * const _name_catalan_2f[] = {
|
||||
};
|
||||
|
||||
static const char * const _name_catalan_3[] = {
|
||||
" desp\xC3\xAD",
|
||||
" desvern",
|
||||
" del cam\xC3\xAD",
|
||||
" Desp\xC3\xAD",
|
||||
" Desvern",
|
||||
" del Cam\xC3\xAD",
|
||||
" de Mar",
|
||||
" de Dalt",
|
||||
" de Baix",
|
||||
" del Vall\xC3\xA8s",
|
||||
" de Bergued\xC3\xA0",
|
||||
" de Conflent",
|
||||
" de la plana",
|
||||
" de la Plana",
|
||||
};
|
||||
|
||||
static const char * const _name_catalan_river1[] = {
|
||||
|
||||
@@ -64,3 +64,7 @@ static const byte _wagon_full_adder[] = {
|
||||
0, 0, 24, 24, 24, 24, 0, 0,
|
||||
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));
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
/* win32_v.cpp only settings */
|
||||
#if defined(WIN32) && !defined(DEDICATED)
|
||||
extern bool _force_full_redraw, _window_maximize;
|
||||
extern uint _display_hz, _fullscreen_bpp;
|
||||
extern uint _display_hz;
|
||||
|
||||
static const SettingDescGlobVarList _win32_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
#endif /* WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strval, $proc, $from, $to),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strval, $proc, $from, $to),
|
||||
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()
|
||||
|
||||
[defaults]
|
||||
@@ -26,11 +26,13 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
@@ -41,24 +43,19 @@ var = _display_hz
|
||||
def = 0
|
||||
min = 0
|
||||
max = 120
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_BOOL]
|
||||
name = ""force_full_redraw""
|
||||
var = _force_full_redraw
|
||||
def = false
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""fullscreen_bpp""
|
||||
type = SLE_UINT
|
||||
var = _fullscreen_bpp
|
||||
def = 8
|
||||
min = 8
|
||||
max = 32
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTG_BOOL]
|
||||
name = ""window_maximize""
|
||||
var = _window_maximize
|
||||
def = false
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_END]
|
||||
|
||||
|
||||
55
src/table/window_settings.ini
Normal file
55
src/table/window_settings.ini
Normal file
@@ -0,0 +1,55 @@
|
||||
; $Id$
|
||||
;
|
||||
; This file is part of OpenTTD.
|
||||
; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
; See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
;
|
||||
|
||||
[pre-amble]
|
||||
|
||||
static const SettingDesc _window_settings[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
base = WindowDesc
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
from = 0
|
||||
to = SL_MAX_VERSION
|
||||
cat = SC_ADVANCED
|
||||
|
||||
|
||||
|
||||
[SDT_BOOL]
|
||||
var = pref_sticky
|
||||
def = false
|
||||
|
||||
[SDT_VAR]
|
||||
var = pref_width
|
||||
type = SLE_INT16
|
||||
def = 0
|
||||
min = 0
|
||||
max = 32000
|
||||
|
||||
[SDT_VAR]
|
||||
var = pref_height
|
||||
type = SLE_INT16
|
||||
def = 0
|
||||
min = 0
|
||||
max = 32000
|
||||
|
||||
[SDT_END]
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user