Jonathan G Rennison
89f66236ff
VarAction2: Fix SHR/SAR mixup in check for merge with prior RST
2 years ago
Jonathan G Rennison
a311f12615
Add signals_style_lookahead_single_signal_only signal style property
2 years ago
Jonathan G Rennison
fcae909839
Add signal style flag for drawing on the opposite side
2 years ago
Jonathan G Rennison
229613b06a
VarAction2: Resolve jumps in advance to avoid needing to track nesting
2 years ago
Jonathan G Rennison
387e646439
VarAction2: Add group flag for whether to run jump insert pass
2 years ago
Jonathan G Rennison
3714fad790
VarAction2: Fix jump insertion using mul with bool as last value
2 years ago
Jonathan G Rennison
4af3022c45
VarAction2: Fix last variable read annotations being incorrect
...
This is because DSE variable substitutions/etc were applied afterwards
This broke jump insertion
2 years ago
Jonathan G Rennison
191f710c40
Add custom signal style properties to set electric/semaphore enabled types
2 years ago
Jonathan G Rennison
175c5d4d50
Add signal style flag to limit lookahead extra aspect
2 years ago
Jonathan G Rennison
bdd73a19a1
Add signal style flag for unconditional reserve through
...
Add map bits for unconditional reserve through
Adjust signal aspect/state handling
2 years ago
Jonathan G Rennison
7ae06124ae
Add signal style flag for no aspect increase behaviour (banner repeater)
2 years ago
Jonathan G Rennison
6e4c4b35e7
Initial implementation of NewGRF custom signal styles
2 years ago
Jonathan G Rennison
4acccc232a
Fix #9925 : Industry tile layout validation for layouts of only one tile
2 years ago
Jonathan G Rennison
098bb74ed2
Fix industry tile layout validation when the layout has only one tile
...
See: https://github.com/OpenTTD/OpenTTD/issues/9925
2 years ago
Jonathan G Rennison
13fcde9ea0
VarAction2: Add a JZ operation, use for ternary style mul masking
2 years ago
Jonathan G Rennison
8687b82dd8
VarAction2: Mark various object variables as expensive
2 years ago
Jonathan G Rennison
c0b1f867a3
VarAction2: Prefer tracking store content as clone of another store
2 years ago
Jonathan G Rennison
315f12f1e4
Fix spelling error in comment
2 years ago
Jonathan G Rennison
7bb0de247d
Add GRF feature: New Landscape
...
Custom graphics using actions 1/2/3.
Currently only for rock tiles
2 years ago
Jonathan G Rennison
5a02a13885
VarAction2: Add abs() detection to bool/mul adjust combining
2 years ago
Jonathan G Rennison
e554d7fdfb
VarAction2: Generalise bool/mul adjust combining
2 years ago
Jonathan G Rennison
3e56837ae6
Fix bec2bf7e: Fix (anti-)commutative store/load re-arrangements
2 years ago
Jonathan G Rennison
34cd547325
Debug: Show if action 2s have been modified by action 6 in debug window
2 years ago
Jonathan G Rennison
6214d0d20d
VarAction2: Add an ABS opcode
2 years ago
Jonathan G Rennison
7f1b3a965f
VarAction2: Allow tracking stores as (inverted) clones of previous store
2 years ago
Jonathan G Rennison
bec2bf7e85
VarAction2: Initial temp store versioning in 1st pass
2 years ago
Jonathan G Rennison
4f3058ee06
VarAction2: Improve handling of variable 7B with a previous constant
2 years ago
Jonathan G Rennison
23e6d861fc
VarAction2: Ensure that store simplification can't break var 7B
2 years ago
Jonathan G Rennison
3bddd55921
VarAction2: Add sprite group flag for if var 1C seen before proc
2 years ago
Jonathan G Rennison
16185e817e
VarAction2: Merge compatible constant operations
2 years ago
Jonathan G Rennison
0343e9d9dd
VarAction2: Replace sequences of the form: (var * flag) + (var * !flag)
2 years ago
Jonathan G Rennison
e5e984d92f
VarAction2: Replace effective SMAX/SMIN sequences in DSE pass
2 years ago
Jonathan G Rennison
0484fbf941
VarAction2: Save/restore inference when going back to previous op with side effects
2 years ago
Jonathan G Rennison
376b434d53
VarAction2: Re-order commutative skip on zero operation sequences
...
Such that less expensive variables can be tested first
2 years ago
Jonathan G Rennison
0409bd88e8
VarAction2: Simplify tracking of sprite group feature
2 years ago
Jonathan G Rennison
caebff85f5
VarAction2: Add helper functions for constant comparison adjust types
2 years ago
Jonathan G Rennison
249a20e47a
VarAction2: Add helper functions for relational comparison ops
2 years ago
Jonathan G Rennison
31e96ff5e7
VarAction2: Add helper functions for anti-commutative ops
2 years ago
Jonathan G Rennison
5db30e559e
VarAction2: Store substitutions can now handle inversions
2 years ago
Jonathan G Rennison
b95116e4fc
VarAction2: Apply XOR bool inversion conversions after DSE
2 years ago
Jonathan G Rennison
2bbfa37730
VarAction2: Replace reversed commutative/sub op via temp storage in DSE pass
2 years ago
Jonathan G Rennison
45ac1a89aa
VarAction2: Apply XOR with 1 bool logic inversion in more cases
...
Fixes case of DSE-delayed var substitutions
2 years ago
Jonathan G Rennison
1c1e6a1042
VarAction2: Prune deterministic sprite group children again after DSE
2 years ago
Jonathan G Rennison
6e398f9cec
VarAction2: DSE now takes into account DSE results from child groups
2 years ago
Jonathan G Rennison
65407210a6
VarAction2: Allow DSGA_OP_STO_NC to be used with DSGA_TYPE_EQ/NEQ
2 years ago
Jonathan G Rennison
d3dce79d73
VarAction2: Substitute single-use vars through temp storage in DSE pass
2 years ago
Jonathan G Rennison
0310692acf
VarAction2: Only substitute cheap vars through temp storage in 1st pass
2 years ago
Jonathan G Rennison
f54530b1b2
VarAction2: Add checks for vars 7B, 7C when getting previous single load
2 years ago
Jonathan G Rennison
a8c0e47dd8
VarAction2: If DSE results in a redundant load, remove it
2 years ago
Jonathan G Rennison
86324e0fda
Debug: Add mode to sprite dump window to show unoptimised
2 years ago
Jonathan G Rennison
74681f70d9
VarAction2: Replace inverted OR of bools with AND where this makes sense
2 years ago
Jonathan G Rennison
e41a5d2f63
VarAction2: Add flags to skip adjust if value is 0 or LSB set
2 years ago
Jonathan G Rennison
236cbc4e83
VarAction2: Optimise SAR same as SHR on unsigned inputs
2 years ago
Jonathan G Rennison
9d04ebcc90
VarAction2: Remove operations which always do nothing when applied to 0
2 years ago
Jonathan G Rennison
26dd84f931
VarAction2: Optimise OR followed by XOR of same constant
2 years ago
Jonathan G Rennison
3aa0ccb97b
VarAction2: Optimise OR which always produces 1
2 years ago
Jonathan G Rennison
4b7288902d
VarAction2: Consider industry tile vars 0x60 to 0x62 to be expensive
2 years ago
Jonathan G Rennison
3a5902ff77
VarAction2: Reduce cost of RecursiveDisallowDSEForProcedure
...
Fix disallowing DSE also disallowing store simplification
2 years ago
Jonathan G Rennison
c342b4219b
NewGRF: Use per-GRF text ID map in GetGRFStringID
2 years ago
Jonathan G Rennison
3ea1e27fdd
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/german.txt
# src/lang/korean.txt
# src/lang/spanish_MX.txt
# src/lang/traditional_chinese.txt
# src/script/api/script_airport.cpp
# src/script/api/script_rail.cpp
2 years ago
Jonathan G Rennison
f05b5163f7
Fix narrowing converison warning
2 years ago
Jonathan G Rennison
bbc1e28b24
VarAction2: Re-use allocated callback result sprite groups
2 years ago
Jonathan G Rennison
e5ef888e80
VarAction2: Add variable/constant copy store simplifification
2 years ago
Jonathan G Rennison
a93b3948b5
VarAction2: Don't change variable masks when disabling procedure DSE
2 years ago
Jonathan G Rennison
3d42e36f89
VarAction2: Avoid pessimising DSE when a procedure returns a callback result
2 years ago
Jonathan G Rennison
9e414a1eab
VarAction2: Move optimiser flags to a separate setting
2 years ago
Jonathan G Rennison
6ff8066d34
VarAction2: Ensure that a temp store var can't reference a clobbered var
2 years ago
Jonathan G Rennison
fe6ab0f19f
VarAction2: Don't track var copies through temporary storage for stations
...
Except for copies of other temporary storage vars
2 years ago
Jonathan G Rennison
db7f29b07c
VarAction2: Deduplicate loads from expensive uncached variables
...
Currently only some vehicle variables
2 years ago
Jonathan G Rennison
6a17f00a27
VarAction2: Ensure dead store elimination doesn't break variable 0x7B
2 years ago
Jonathan G Rennison
813146a78f
VarAction2: Track value inferences through temp storage in more cases
2 years ago
Jonathan G Rennison
ccef3646db
VarAction2: Set value inferences for operations with eq/neq adjust types
2 years ago
Jonathan G Rennison
04a9c73ec2
VarAction2: Combine RST, UMIN sequence to load with neq 0 adjust
2 years ago
Jonathan G Rennison
9116ca6bb0
VarAction2: Track copies of variables through temporary storage
2 years ago
Jonathan G Rennison
263a87f5da
VarAction2: Add adjust types for combined (in)equality with constant
2 years ago
Jonathan G Rennison
1e52e51ce1
VarAction2: Add bounds checks to previous adjust accesses
2 years ago
Jonathan G Rennison
c2fde53495
VarAction2: Remove redundant variable loads
2 years ago
Jonathan G Rennison
30f74c5b74
Sprite group: Add getter function for sprite groups
2 years ago
Jonathan G Rennison
d8f9641dc9
VarAction2: Remove redundant UMIN operation on already boolean values
2 years ago
Jonathan G Rennison
3c9201ebd5
VarAction2: Fix dead store elimination through randomised sprite groups
2 years ago
Jonathan G Rennison
e0581db2a1
VarAction2: Remove dead stores and redundant adjusts in more cases
2 years ago
Jonathan G Rennison
d71e38446e
Improve performance of string lookup in AddGRFString
2 years ago
Jonathan G Rennison
994dc683a2
VarAction2: Fix calculated result groups being incorrectly pruned
2 years ago
Jonathan G Rennison
b102e912b3
VarAction2: Allow temp store dead store elmination with industries
2 years ago
Jonathan G Rennison
4687a8c2a4
VarAction2: Prune group ranges for constant values
...
Add chicken bit to control pruning
2 years ago
Jonathan G Rennison
c894d5a86d
VarAction2: Add temp store dead store elimination
2 years ago
Niels Martin Hansen
5587e439a9
Fix: Industry layouts with zero regular tiles should be invalid
2 years ago
Jonathan G Rennison
a8eb52f061
VarAction2: Simplify handling of first adjustment
2 years ago
Jonathan G Rennison
a5f5be2dff
VarAction2: Detect ops on previous constants which become loads
2 years ago
Jonathan G Rennison
1fec7d6ddb
VarAction2: Detect and replace reversed commutative op via temp storage
2 years ago
Jonathan G Rennison
762cfb3df7
VarAction2: Track temp store loads with respect to stores
2 years ago
Jonathan G Rennison
6953150898
VarAction2: Move optimisation pass to separate function
...
Simplify logic slightly
2 years ago
Jonathan G Rennison
145536e1fd
VarAction2: Detect and replace reverse subtract via temp storage
2 years ago
Jonathan G Rennison
dd2e1fe956
Add chicken bit to disable varact2 optimisation
2 years ago
Jonathan G Rennison
f0a0b2e200
VarAction2: Flatten constant operations on constants in more cases
2 years ago
Jonathan G Rennison
2360b3e93e
VarAction2: Detect and replace scaled reads of train/RV/ship current speed
2 years ago
Jonathan G Rennison
13cdef2a2d
VarAction2: Remove redundant and with 1 when value is already bool
2 years ago
Jonathan G Rennison
2f09eff404
VarAction2: Convert boolean, invert sequence to ternary
2 years ago
Jonathan G Rennison
90a2aa57fc
VarAction2: Detect and replace signed relational comparisons
2 years ago
Jonathan G Rennison
e732042785
VarAction2: Remove redundant constant loads
2 years ago
Jonathan G Rennison
74e1a40f7c
VarAction2: Remove trivially resolvable deterministic sprite groups
2 years ago
Jonathan G Rennison
3b5eede3fc
VarAction2: Detect and replace operations which always produce 0
2 years ago
Jonathan G Rennison
a21ae12c90
VarAction2: Remove redundant temp store loads after stores
2 years ago
Jonathan G Rennison
db5be4f92e
VarAction2: Remove constant parameter redirection via variable 7B
2 years ago
Jonathan G Rennison
da629e4cfa
VarAction2: Replace divs of powers of 2 with shifts where possible
2 years ago
Jonathan G Rennison
fad5973161
VarAction2: Reduce shift right and mask ops into adjust shift/mask
2 years ago
Jonathan G Rennison
012d73ef34
VarAction2: Detect equality comparisons
...
Remove redundant equality with 0 comparison before ternary
2 years ago
Jonathan G Rennison
7283825638
VarAction2: Detect and replace ternary operator pattern
2 years ago
Jonathan G Rennison
e3df522111
VarAction2: Delete provably zero adjustment operations
2 years ago
Jonathan G Rennison
a54416afbc
Add GRF variable to use extra station names even when default names remain
2 years ago
Jonathan G Rennison
34af4844d1
Merge branch 'master' into jgrpp
3 years ago
Michael Lutz
08a5478a93
Add: [NewGRF] Map seed as global variable.
...
This is useful to provide a feature-agnostic, stable random value that differs between games.
One of the possible uses is to e.g. use it to create pseudo-random regions for towns or industries.
3 years ago
Jonathan G Rennison
cb573a1523
Add road stop property to set cost multipliers
3 years ago
Jonathan G Rennison
5a2cc24190
Fix initialisation of new road stop specs
3 years ago
Jonathan G Rennison
2cbbae16da
Add roadstop GRF properties to set bridge heights and disallowed pillars
3 years ago
Jonathan G Rennison
23c472d2a0
Add support for road stop animation, availability callback
...
Add animation, callback mask, general flags properties
Add animation frame variables
3 years ago
Jonathan G Rennison
67d967befb
Add road stop support for Action 3 cargo type groups
3 years ago
Jonathan G Rennison
a69eba31fe
Implement NewGRF road stop root sprite group selection
3 years ago
Jonathan G Rennison
1084bb8566
Initial support for NewGRF road stops (bus and lorry stops)
3 years ago
Jonathan G Rennison
a3c003546b
Implement extended NewGRF variable parameter support
3 years ago
Jonathan G Rennison
d4f11eca42
Add NewGRF object properties to set viewport map mode/smallmap tile type
3 years ago
Jonathan G Rennison
a03453da49
Add properties to set lighthouse and transmitter generation amounts
3 years ago
Jonathan G Rennison
eeef6c485a
Initial implementation of NewGRF feature ID mapping
3 years ago
Jonathan G Rennison
ef3916928c
Initial abstraction around NewGRF feature ID bytes
3 years ago
Jonathan G Rennison
bb848331b6
Fix narrowing conversion warning
3 years ago
Jonathan G Rennison
33dc6c9688
Add NewGRF VarAction2 variable remapping infrastructure
3 years ago
Jonathan G Rennison
1a4b0d6ecf
Prevent NewGRFs from using Action A to replace internal sprites
3 years ago
Jonathan G Rennison
b807f0d50e
Fix setting of object spec ctrl flags from GRF properties
3 years ago
Jonathan G Rennison
24fb390e9f
Add NewGRF object property for flood-resistance
...
Does not imply being able to be built on water
3 years ago
Jonathan G Rennison
d9116106ca
Add NewGRF object property for new edge foundation mode
3 years ago
Jonathan G Rennison
ff714b7648
Add setting to disable "big GUI" NewGRFs
3 years ago
Jonathan G Rennison
924ffb013f
Add NewGRF object property/flag to use land as object ground sprite
...
This handles variable ground densities, snow/desert, etc.
3 years ago
Jonathan G Rennison
906fde15c7
Move NewGRF extension feature/property lists to separate file
3 years ago
Jonathan G Rennison
0691b25e17
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/saveload/afterload.cpp
3 years ago
Jonathan G Rennison
fc58ed9987
Codechange: Remove CargoSpec::multipliertowngrowth which is unused ( #9701 )
...
This is set by cargo property 19.
This property is only implemented in TTDPatch.
3 years ago
Jonathan G Rennison
3d4261a33a
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/order_cmd.cpp
# src/table/settings/news_display_settings.ini
3 years ago
Michael Lutz
95c8467670
Fix 65cbde4b: Writing to uninitialized string when loading a currency NewGRF.
3 years ago
Jonathan G Rennison
9e946d4c5d
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/command.cpp
# src/console_cmds.cpp
# src/group_gui.cpp
# src/lang/catalan.txt
# src/lang/czech.txt
# src/lang/danish.txt
# src/lang/greek.txt
# src/lang/hungarian.txt
# src/lang/irish.txt
# src/lang/japanese.txt
# src/lang/luxembourgish.txt
# src/lang/norwegian_bokmal.txt
# src/lang/romanian.txt
# src/lang/russian.txt
# src/lang/serbian.txt
# src/lang/simplified_chinese.txt
# src/lang/slovak.txt
# src/lang/spanish_MX.txt
# src/lang/swedish.txt
# src/lang/tamil.txt
# src/lang/traditional_chinese.txt
# src/lang/turkish.txt
# src/lang/ukrainian.txt
# src/lang/vietnamese.txt
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/saveload/afterload.cpp
# src/saveload/newgrf_sl.cpp
# src/saveload/saveload.h
# src/script/script_instance.cpp
# src/toolbar_gui.cpp
# src/toolbar_gui.h
# src/vehicle_gui.cpp
# src/widgets/rail_widget.h
# src/widgets/vehicle_widget.h
# src/window.cpp
3 years ago
Jonathan G Rennison
3ef1a0943b
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/lang/chuvash.txt
# src/lang/czech.txt
# src/lang/english_AU.txt
# src/lang/english_US.txt
# src/lang/german.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/latvian.txt
# src/lang/russian.txt
# src/tree_gui.cpp
# src/vehicle.cpp
3 years ago
Jonathan G Rennison
faf32200cf
Merge tag '12.0-beta1' into jgrpp-beta
...
# Conflicts:
# CMakeLists.txt
# bin/ai/CMakeLists.txt
# bin/game/CMakeLists.txt
# src/build_vehicle_gui.cpp
# src/console_cmds.cpp
# src/core/overflowsafe_type.hpp
# src/fios.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/lang/polish.txt
# src/network/core/game_info.cpp
# src/network/core/game_info.h
# src/network/core/tcp_game.cpp
# src/network/core/tcp_game.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_coordinator.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf_engine.cpp
# src/openttd.cpp
# src/rev.cpp.in
# src/settings_type.h
# src/train.h
# src/train_cmd.cpp
3 years ago
Jonathan G Rennison
f764fcfb1f
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/console_cmds.cpp
# src/debug.cpp
# src/lang/vietnamese.txt
# src/network/core/address.cpp
# src/network/core/address.h
# src/network/core/config.h
# src/network/core/os_abstraction.cpp
# src/network/core/os_abstraction.h
# src/network/core/tcp_listen.h
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_gamelist.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf.cpp
# src/openttd.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/settings_table.cpp
# src/settings_type.h
# src/table/settings/network_settings.ini
3 years ago
Jonathan G Rennison
f54d69a60a
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/economy.cpp
# src/elrail.cpp
# src/graph_gui.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/network/core/game_info.cpp
# src/newgrf_station.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/strings_func.h
# src/table/settings/network_settings.ini
# src/table/settings/settings.ini
3 years ago
Jonathan G Rennison
da282c3ecc
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# CMakeLists.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/misc_gui.cpp
# src/newgrf.cpp
3 years ago
Jonathan G Rennison
544da99102
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/cargopacket.h
# src/lang/korean.txt
# src/linkgraph/linkgraph.h
# src/linkgraph/linkgraphjob.h
# src/linkgraph/linkgraphschedule.h
# src/network/network_admin.h
# src/network/network_func.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/order_base.h
# src/rail_cmd.cpp
# src/saveload/company_sl.cpp
# src/saveload/depot_sl.cpp
# src/saveload/economy_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/map_sl.cpp
# src/saveload/newgrf_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/signs_sl.cpp
# src/saveload/station_sl.cpp
# src/saveload/subsidy_sl.cpp
# src/saveload/town_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/script/api/script_object.cpp
# src/settings.cpp
# src/string.cpp
# src/string_func.h
# src/table/CMakeLists.txt
# src/table/settings/settings.ini
# src/viewport_sprite_sorter_sse4.cpp
3 years ago
Jonathan G Rennison
4042480806
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/table/win32_settings.ini
# src/table/window_settings.ini
3 years ago
PeterN
f5561ac212
Fix #9562 : Handle case of invalid action2 with zero results. ( #9564 )
...
(cherry picked from commit 7e70ead396
)
3 years ago
Jonathan G Rennison
fd605e3cf3
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/company_cmd.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/indonesian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/swedish.txt
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/mcf.cpp
# src/network/core/tcp.cpp
# src/network/core/tcp.h
# src/network/core/tcp_game.h
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_admin.cpp
# src/network/network_admin.h
# src/network/network_chat_gui.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf.cpp
# src/newgrf_station.cpp
# src/order_gui.cpp
# src/rail_cmd.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/station_cmd.cpp
# src/stdafx.h
# src/table/currency_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/terraform_cmd.cpp
# src/timetable_gui.cpp
# src/train_cmd.cpp
# src/tree_cmd.cpp
# src/water_cmd.cpp
3 years ago
PeterN
7e70ead396
Fix #9562 : Handle case of invalid action2 with zero results. ( #9564 )
3 years ago
Charles Pigott
16dca0d7bc
Codechange: Object non-zero dimension check was not logically correct
3 years ago
Jonathan G Rennison
5d351a14d2
Add new signal type: no-entry signal
...
This is only passable in one direction, but does not have a signal
or show an aspect in the opposite direction
Add a setting for whether this is shown in the signal UI.
Off by default.
3 years ago
Jonathan G Rennison
b2ef6c0de8
Add implementation of multi-aspect signalling and GRF support
...
Requires realistic braking
See: #247
3 years ago
Jonathan G Rennison
f1fde8c684
Enable recolouring of custom signal graphics (global and per-railtype)
3 years ago
Jonathan G Rennison
322a046f49
NewGRF: Allow using Action 2/3 for custom signal sprites
...
This is mostly the same format as the railtype custom signal mechanism
3 years ago
Vít Šefl
2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles ( #9346 )
3 years ago
Jonathan G Rennison
4174fe727c
Add NewGRF feature: Extra station name strings
...
These are used when all the default names have been used up,
instead of "Town Station #NNN".
3 years ago
Rubidium
178ea3196b
Remove: includes to network/core/config.h from headers when only three cpp files need it
3 years ago
Patric Stout
6f0c6fb2ae
Fix a4987233: NewGRFs could no longer be loaded from the NewGRF folder.
...
This statement was removed by accident, as it felt it could be removed.
But it is used to know if the NewGRF is from the baseset folder or
from the NewGRF folder.
3 years ago
rubidium42
a498723345
Remove: arbitrary limit on number of statically loaded NewGRFs ( #9431 )
3 years ago
glx22
a543a4b7bb
Codechange: Remove FOR_EACH_SET_CARGO_ID
3 years ago
glx22
89ab8b79a5
Codechange: Remove FOR_EACH_SET_BIT
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
Peter Nelson
40cec34836
Change: Skip creating a RealSpriteGroup when there is only one result.
...
This avoids checking RSG for empty sets every time they are evaluated.
This might alter behaviour in cases of a malformed NewGRF file.
3 years ago
Jonathan G Rennison
054c820521
Implement custom sprite detection with new sprite mechanism
3 years ago
Rubidium
e227bbaff0
Cleanup: remove the old FIO slot functions
...
(cherry picked from commit fa6abe1646
)
3 years ago
Rubidium
eecf7c8525
Codechange: let NewGRF make use of SpriteFile instead of most of the FIO slot functions
...
(cherry picked from commit 10e35ca8e4
)
3 years ago
Rubidium
6bd12e24d7
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
...
(cherry picked from commit fdc11a9f94
)
3 years ago
Rubidium
525f6adcd0
Codechange: let NewGRF sounds make use of RandomAccessFile instead of the FIO slot functions
...
(cherry picked from commit c097bc9d7d
)
3 years ago
Rubidium
7c4d803265
Fix: memory leak due to assigning result of strdup to a std::string
...
(cherry picked from commit 296194ad36
)
3 years ago
Patric Stout
ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) ( #9304 )
...
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42
ae85af98eb
Codechange: Use std::string GetString where convenient
3 years ago
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
3 years ago
Rubidium
e6f0d63e25
Codechange: comparison result is always the same due to earlier check
...
Practically the length of the handlers not being equal to the number of
features is the problem as it means something was forgotten when adding
a new feature, so static assert to that and let the existing check on
the feature number take care of invalid data from the NewGRFs.
3 years ago
frosch
1da0ba95b2
Feature: Define refittability of default vehicles using cargo classes.
...
This ensures that default vehicles can transport any NewGRF defined cargos, albeit with weird graphics and vehicle names.
This also changes the refittability of default vehicles with default industries.
3 years ago
frosch
9f8d0b1bee
Fix: Resolve cargo-types of default vehicles via their cargo label.
...
Default vehicles now behave as if they had a cargo translation table. This fixes default vehicles carrying seemingly random cargos, if NewGRF industry sets are present.
This behavior is disabled, when a NewGRF touches any of the cargo-type or refitting properties. In that case it's up to the NewGRF to define its own cargo translation table.
3 years ago
rubidium42
65cbde4b30
Codechange: move currency settings to std::string
3 years ago
Rubidium
296194ad36
Fix: memory leak due to assigning result of strdup to a std::string
3 years ago
Rubidium
10e35ca8e4
Codechange: let NewGRF make use of SpriteFile instead of most of the FIO slot functions
3 years ago
Rubidium
fdc11a9f94
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
3 years ago
Rubidium
c097bc9d7d
Codechange: let NewGRF sounds make use of RandomAccessFile instead of the FIO slot functions
3 years ago
Peter Nelson
01d40812fa
Codechange: Validate custom station platform layout tiles are permitted values only.
...
(cherry picked from commit 756034fa27
)
3 years ago
Peter Nelson
da571d6481
Codechange: Use std::vector for NewGRF station tile sprite layouts.
...
(cherry picked from commit a3e49178d1
)
3 years ago
Peter Nelson
72bc8c7595
Codechange: Use std::vector for NewGRF station platform layouts.
...
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
(cherry picked from commit bd1a20f6ee
)
3 years ago
Peter Nelson
0b4d45af93
Codechange: Warn if randomaction2 group count is not a power of 2.
...
Previously noted by a comment, this does not need to be guarded against as non-powers of 2 will not cause issues beyond the choice of results being reduced.
(cherry picked from commit 18fb1c3866
)
3 years ago
Peter Nelson
f5722a999e
Cleanup: Use std::vector in RandomSpriteGroup.
...
(cherry picked from commit 913d8a7f28
)
3 years ago
Peter Nelson
a69a1d19a9
Cleanup: Use std::vector in DeterministicSpriteGroup.
...
(cherry picked from commit 1aeaf39954
)
3 years ago
Peter Nelson
d3b9d19c5a
Cleanup: Use std::vector in RealSpriteGroup.
...
(cherry picked from commit f785a70a2b
)
3 years ago
glx22
050b95e351
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
...
(cherry picked from commit 9a8756d7ed
)
3 years ago
Peter Nelson
756034fa27
Codechange: Validate custom station platform layout tiles are permitted values only.
3 years ago
Peter Nelson
a3e49178d1
Codechange: Use std::vector for NewGRF station tile sprite layouts.
3 years ago
Peter Nelson
bd1a20f6ee
Codechange: Use std::vector for NewGRF station platform layouts.
...
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
3 years ago
Peter Nelson
18fb1c3866
Codechange: Warn if randomaction2 group count is not a power of 2.
...
Previously noted by a comment, this does not need to be guarded against as non-powers of 2 will not cause issues beyond the choice of results being reduced.
3 years ago
Peter Nelson
913d8a7f28
Cleanup: Use std::vector in RandomSpriteGroup.
3 years ago
Peter Nelson
1aeaf39954
Cleanup: Use std::vector in DeterministicSpriteGroup.
3 years ago
Peter Nelson
f785a70a2b
Cleanup: Use std::vector in RealSpriteGroup.
3 years ago
glx22
9a8756d7ed
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
3 years ago
Jonathan G Rennison
6a62b94263
Add NewGRF railtype flag to disable realistic braking for vehs of that type
...
See: #242
4 years ago
Jonathan G Rennison
f39b6f4ba3
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/cheat_gui.cpp
# src/genworld_gui.cpp
# src/landscape.cpp
# src/lang/english.txt
# src/saveload/afterload.cpp
# src/screenshot.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/table/settings.ini
# src/tile_type.h
# src/widgets/genworld_widget.h
4 years ago
Jonathan G Rennison
83ac5aa27a
Fix: Memory leak of airport tile layout in AirportChangeInfo (prop 0A) ( #8928 )
4 years ago
Jonathan G Rennison
7ae5e5b89f
Fix memory leak of airport tile layout in AirportChangeInfo
4 years ago
Patric Stout
1a1049bc0d
Change: rename setting "max_heightlevel" to "map_height_limit"
...
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.
Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.
Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
4 years ago