Commit Graph

1824 Commits

Author SHA1 Message Date
Jonathan G Rennison
41fb98db09 Add NewGRF global flag to allow rocky tiles in tropic desert zones 2022-12-12 22:12:20 +00:00
Jonathan G Rennison
2af2c56d19 Allow various settings to be changed in multiplayer
If the corresponding TTDPatch flag bit has not been observed by a NewGRF
2022-11-10 22:34:14 +00:00
Jonathan G Rennison
6459e62fff Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/english.txt
#	src/map_type.h
#	src/network/network_command.cpp
#	src/object_cmd.cpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_func.h
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/settings_gui.cpp
#	src/string.cpp
#	src/table/road_land.h
#	src/table/settings/game_settings.ini
#	src/table/settings/world_settings.ini
#	src/tbtr_template_gui_main.h
#	src/train_cmd.cpp
2022-11-05 19:24:44 +00:00
PeterN
f24286a1ae Fix: Ensure 31-bit shifts are unsigned. (#10128)
Shifting a signed 32-bit integer by 31 bits is undefined behaviour.
A few more than necessary are switched to unsigned for consistentency.
2022-11-04 07:15:59 +00:00
Jonathan G Rennison
ba3bc73676 VarAction2: Fix memory leak of inlinable adjust groups 2022-11-03 20:23:31 +00:00
Jonathan G Rennison
0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2022-10-16 20:14:13 +01:00
Michael Lutz
bd357656ba Codechange: [NewGRF] Replace magic number for default object size by a constant. 2022-10-16 18:28:08 +02:00
frosch
f4e2a462fe Cleanup: Remove unused flag sprites. 2022-10-16 14:56:52 +02:00
Jonathan G Rennison
0818ce4ae7 Merge branch 'master' into jgrpp (SLV_U64_TICK_COUNTER)
# Conflicts:
#	src/date.cpp
#	src/date_func.h
#	src/newgrf.cpp
#	src/newgrf_animation_base.h
#	src/saveload/gamelog_sl.cpp
#	src/saveload/misc_sl.cpp
#	src/saveload/saveload.h
#	src/stdafx.h
2022-10-03 19:58:31 +01:00
Jonathan G Rennison
c2ede2af54 VarAction2: Allow inlining trivial procedures 2022-10-01 22:32:00 +01:00
dP
548f0496a9 Change: Make _tick_counter 64bit to avoid wrapping (#10035) 2022-09-21 12:42:29 +02:00
Jonathan G Rennison
3d8187261a Debug: Include values when logging GRF base cost changes 2022-09-19 19:35:53 +01:00
Jonathan G Rennison
ece0a43146 Merge branch 'master' into jgrpp
# Conflicts:
#	src/newgrf_station.cpp
2022-09-14 19:43:12 +01:00
frosch
e2c46fda3f Fix: [NewGRF] Ensure that stations always have an even number of sprite layouts.
The drawing code has a special fallbacks for zero layouts, but fails hard for one layout.
(odd numbers >= 3 are weird, but do not fail as badly as 1)
2022-09-11 21:26:06 +02:00
Jonathan G Rennison
173f867e1a VarAction2: Save calculated_result in shadow group struct 2022-08-22 00:13:23 +01:00
Jonathan G Rennison
14de8c7f34 VarAction2: Add quick exit case to last-level callback groups if possible 2022-08-22 00:13:23 +01:00
Jonathan G Rennison
9c18835bd0 Move ProcessDeterministicSpriteGroupRanges into newgrf.cpp 2022-08-14 21:48:24 +01:00
Jonathan G Rennison
4601a1bfc6 Move NewGRF optimiser functions into a separate file
Create a new header for shared definitions with newgrf.cpp
2022-08-10 19:06:59 +01:00
Jonathan G Rennison
3d59c961a6 VarAction2: Avoid group variable tracking coupling through shared procs
Output dependencies on a procedure shouldn't propagate into input
dependencies on unrelated call sites in different groups
2022-08-10 18:30:09 +01:00
Jonathan G Rennison
00e32162a1 VarAction2: Allow DSE to remove procedure calls 2022-08-10 00:04:32 +01:00
Jonathan G Rennison
30ecdfe140 VarAction2: Allow jumping over constant stores to special registers
Insert suitable store(s) after the end block
2022-08-09 22:53:50 +01:00
Jonathan G Rennison
3a8bd7a589 VarAction2: Allow jumps to skip over procedure calls if possible 2022-08-09 22:10:45 +01:00
Jonathan G Rennison
e143ab06d8 VarAction2: Track which temp stores may be overwritten by procedures
Instead of treating procedures as an unpredictable store
2022-08-09 18:37:00 +01:00
Jonathan G Rennison
06cc71b6c5 VarAction2: Mark suitable AND ops as jump insertion candidates 2022-08-09 18:34:01 +01:00
Jonathan G Rennison
0bddf96f7f VarAction2: Set variable for ABS op to avoid unused read from var 0 2022-08-01 18:27:21 +01:00
Jonathan G Rennison
7af568f0f0 VarAction2: Handle case where expensive vars are only conditionally read
Within a JZ_LV and in prior DSGAF_SKIP_ON_ZERO op
2022-07-31 00:16:40 +01:00
Jonathan G Rennison
9a4c31b0da VarAction2: Add last_value variants of JZ/JNZ ops 2022-07-30 23:32:23 +01:00
Jonathan G Rennison
cbc6199542 VarAction2: Add a JNZ op analogous to JZ for OR ops 2022-07-30 22:40:41 +01:00
Jonathan G Rennison
5ec802a3d4 VarAction2: Allow substituting perm store loads through temp store 2022-07-30 21:17:00 +01:00
Jonathan G Rennison
ed737e1a8f VarAction2: Do not remove redundant adjusts when this would break var 1C 2022-07-14 23:57:23 +01:00
Jonathan G Rennison
b9c22a0b9e VarAction2: Do not prune groups when this would break var 1C 2022-07-14 23:47:48 +01:00
Jonathan G Rennison
ae746a1af4 VarAction2: Fix tracking of whether a sprite group needs var 1C 2022-07-14 23:38:52 +01:00
Jonathan G Rennison
c19bd4473f Add signal style flag to require realistic braking 2022-06-30 21:20:43 +01:00
Jonathan G Rennison
78ae295dfe Add combined normal and shunt aspect signal style flag 2022-06-27 18:51:26 +01:00
Jonathan G Rennison
759b00262e VarAction2: Allow more than one JZ to end on the same end block adjust 2022-06-26 23:30:14 +01:00
Jonathan G Rennison
9775f468e8 VarAction2: Fix jump insertion moving the end marker for another jump 2022-06-26 22:53:07 +01:00
Jonathan G Rennison
89f66236ff VarAction2: Fix SHR/SAR mixup in check for merge with prior RST 2022-06-25 20:51:09 +01:00
Jonathan G Rennison
a311f12615 Add signals_style_lookahead_single_signal_only signal style property 2022-06-25 01:29:08 +01:00
Jonathan G Rennison
fcae909839 Add signal style flag for drawing on the opposite side 2022-06-22 23:45:44 +01:00
Jonathan G Rennison
229613b06a VarAction2: Resolve jumps in advance to avoid needing to track nesting 2022-06-22 02:09:13 +01:00
Jonathan G Rennison
387e646439 VarAction2: Add group flag for whether to run jump insert pass 2022-06-20 18:46:31 +01:00
Jonathan G Rennison
3714fad790 VarAction2: Fix jump insertion using mul with bool as last value 2022-06-20 18:41:09 +01:00
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
2022-06-20 18:23:52 +01:00
Jonathan G Rennison
191f710c40 Add custom signal style properties to set electric/semaphore enabled types 2022-06-19 17:43:46 +01:00
Jonathan G Rennison
175c5d4d50 Add signal style flag to limit lookahead extra aspect 2022-06-19 12:46:56 +01:00
Jonathan G Rennison
bdd73a19a1 Add signal style flag for unconditional reserve through
Add map bits for unconditional reserve through
Adjust signal aspect/state handling
2022-06-19 04:15:27 +01:00
Jonathan G Rennison
7ae06124ae Add signal style flag for no aspect increase behaviour (banner repeater) 2022-06-19 02:08:38 +01:00
Jonathan G Rennison
6e4c4b35e7 Initial implementation of NewGRF custom signal styles 2022-06-19 02:08:38 +01:00
Jonathan G Rennison
4acccc232a Fix #9925: Industry tile layout validation for layouts of only one tile 2022-06-18 22:02:08 +02:00
Jonathan G Rennison
098bb74ed2 Fix industry tile layout validation when the layout has only one tile
See: https://github.com/OpenTTD/OpenTTD/issues/9925
2022-06-18 11:08:13 +01:00