Merge branch 'master' into cpp-11

# Conflicts:
#	config.lib
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	src/saveload/saveload.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-06 21:58:36 +00:00
490 changed files with 13574 additions and 10565 deletions

View File

@@ -293,6 +293,19 @@ static const IndustryTileTable _tile_table_oil_rig_0[] = {
MK(-2, -4, 255),
MK(-3, -4, 255),
MK(2, 0, 255),
MK(2, -1, 255),
MK(1, -1, 255),
MK(0, -1, 255),
MK(-1, -1, 255),
MK(-1, 0, 255),
MK(-1, 1, 255),
MK(-1, 2, 255),
MK(-1, 3, 255),
MK(0, 3, 255),
MK(1, 3, 255),
MK(2, 3, 255),
MK(2, 2, 255),
MK(2, 1, 255),
MKEND
};
@@ -1182,8 +1195,12 @@ enum IndustryTypes {
#define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \
c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \
{tbl, lengthof(tbl), d, 0, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \
{a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
{tbl, lengthof(tbl), d, 0, pc, {c1, c2, c3}, proc, \
{p1, p2, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \
{r1, r2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, m, \
{a1, a2, a3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \
{{im1, 0}, {im2, 0}, {im3, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, \
pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
sndc, snd, 0, 0, true, GRFFileProps(INVALID_INDUSTRYTYPE)}
/* Format:
tile table count and sounds table
@@ -1581,7 +1598,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = {
* @param a2 next frame of animation
* @param a3 chooses between animation or construction state
*/
#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, {0, ANIM_STATUS_NO_ANIMATION, 2, 0}, INDTILE_SPECIAL_NONE, true, GRFFileProps(INVALID_INDUSTRYTILE)}
#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, {0, ANIM_STATUS_NO_ANIMATION, 2, 0}, INDTILE_SPECIAL_NONE, true, GRFFileProps(INVALID_INDUSTRYTILE)}
static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET] = {
/* Coal Mine */
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false),

View File

@@ -272,11 +272,38 @@ static const NIFeature _nif_industrytile = {
/*** NewGRF industries ***/
static const NIProperty _nip_industries[] = {
NIP(0x10, Industry, produced_cargo[0], NIT_CARGO, "produced cargo 0"),
NIP(0x10, Industry, produced_cargo[1], NIT_CARGO, "produced cargo 1"),
NIP(0x11, Industry, accepts_cargo[0], NIT_CARGO, "accepted cargo 0"),
NIP(0x11, Industry, accepts_cargo[1], NIT_CARGO, "accepted cargo 1"),
NIP(0x11, Industry, accepts_cargo[2], NIT_CARGO, "accepted cargo 2"),
NIP(0x25, Industry, produced_cargo[ 0], NIT_CARGO, "produced cargo 0"),
NIP(0x25, Industry, produced_cargo[ 1], NIT_CARGO, "produced cargo 1"),
NIP(0x25, Industry, produced_cargo[ 2], NIT_CARGO, "produced cargo 2"),
NIP(0x25, Industry, produced_cargo[ 3], NIT_CARGO, "produced cargo 3"),
NIP(0x25, Industry, produced_cargo[ 4], NIT_CARGO, "produced cargo 4"),
NIP(0x25, Industry, produced_cargo[ 5], NIT_CARGO, "produced cargo 5"),
NIP(0x25, Industry, produced_cargo[ 6], NIT_CARGO, "produced cargo 6"),
NIP(0x25, Industry, produced_cargo[ 7], NIT_CARGO, "produced cargo 7"),
NIP(0x25, Industry, produced_cargo[ 8], NIT_CARGO, "produced cargo 8"),
NIP(0x25, Industry, produced_cargo[ 9], NIT_CARGO, "produced cargo 9"),
NIP(0x25, Industry, produced_cargo[10], NIT_CARGO, "produced cargo 10"),
NIP(0x25, Industry, produced_cargo[11], NIT_CARGO, "produced cargo 11"),
NIP(0x25, Industry, produced_cargo[12], NIT_CARGO, "produced cargo 12"),
NIP(0x25, Industry, produced_cargo[13], NIT_CARGO, "produced cargo 13"),
NIP(0x25, Industry, produced_cargo[14], NIT_CARGO, "produced cargo 14"),
NIP(0x25, Industry, produced_cargo[15], NIT_CARGO, "produced cargo 15"),
NIP(0x26, Industry, accepts_cargo[ 0], NIT_CARGO, "accepted cargo 0"),
NIP(0x26, Industry, accepts_cargo[ 1], NIT_CARGO, "accepted cargo 1"),
NIP(0x26, Industry, accepts_cargo[ 2], NIT_CARGO, "accepted cargo 2"),
NIP(0x26, Industry, accepts_cargo[ 3], NIT_CARGO, "accepted cargo 3"),
NIP(0x26, Industry, accepts_cargo[ 4], NIT_CARGO, "accepted cargo 4"),
NIP(0x26, Industry, accepts_cargo[ 5], NIT_CARGO, "accepted cargo 5"),
NIP(0x26, Industry, accepts_cargo[ 6], NIT_CARGO, "accepted cargo 6"),
NIP(0x26, Industry, accepts_cargo[ 7], NIT_CARGO, "accepted cargo 7"),
NIP(0x26, Industry, accepts_cargo[ 8], NIT_CARGO, "accepted cargo 8"),
NIP(0x26, Industry, accepts_cargo[ 9], NIT_CARGO, "accepted cargo 9"),
NIP(0x26, Industry, accepts_cargo[10], NIT_CARGO, "accepted cargo 10"),
NIP(0x26, Industry, accepts_cargo[11], NIT_CARGO, "accepted cargo 11"),
NIP(0x26, Industry, accepts_cargo[12], NIT_CARGO, "accepted cargo 12"),
NIP(0x26, Industry, accepts_cargo[13], NIT_CARGO, "accepted cargo 13"),
NIP(0x26, Industry, accepts_cargo[14], NIT_CARGO, "accepted cargo 14"),
NIP(0x26, Industry, accepts_cargo[15], NIT_CARGO, "accepted cargo 15"),
NIP_END()
};

View File

@@ -74,7 +74,7 @@ static size_t ConvertLandscape(const char *value);
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, 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)
SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, sizeof(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, 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)
@@ -102,7 +102,7 @@ static size_t ConvertLandscape(const char *value);
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, 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)
SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, sizeof(((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, 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)
@@ -127,7 +127,7 @@ static size_t ConvertLandscape(const char *value);
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, 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)
SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, sizeof(_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, 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)

View File

@@ -2560,13 +2560,17 @@ strhelp = STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT
strval = STR_CONFIG_SETTING_AUTOSCROLL_DISABLED
cat = SC_BASIC
[SDTC_BOOL]
var = gui.reverse_scroll
[SDTC_VAR]
var = gui.scroll_mode
type = SLE_UINT8
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
str = STR_CONFIG_SETTING_REVERSE_SCROLLING
strhelp = STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT
cat = SC_BASIC
guiflags = SGF_MULTISTRING
def = 0
min = 0
max = 3
str = STR_CONFIG_SETTING_SCROLLMODE
strhelp = STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT
strval = STR_CONFIG_SETTING_SCROLLMODE_DEFAULT
[SDTC_BOOL]
var = gui.smooth_scroll
@@ -2575,14 +2579,6 @@ def = false
str = STR_CONFIG_SETTING_SMOOTH_SCROLLING
strhelp = STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT
[SDTC_BOOL]
var = gui.left_mouse_btn_scrolling
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
str = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING
strhelp = STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT
cat = SC_BASIC
[SDTC_BOOL]
var = gui.right_mouse_wnd_close
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
@@ -2991,6 +2987,12 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
cat = SC_BASIC
[SDTC_BOOL]
var = gui.autosave_on_network_disconnect
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = true
cat = SC_EXPERT
[SDTC_VAR]
var = gui.max_num_autosaves
type = SLE_UINT8

View File

@@ -8,14 +8,14 @@
[pre-amble]
/* win32_v.cpp only settings */
#if defined(WIN32) && !defined(DEDICATED)
#if defined(_WIN32) && !defined(DEDICATED)
extern bool _force_full_redraw, _window_maximize;
extern uint _display_hz;
static const SettingDescGlobVarList _win32_settings[] = {
[post-amble]
};
#endif /* WIN32 */
#endif /* _WIN32 */
[templates]
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),