Commit Graph

2022 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 1dbbbed9e5 NewGRF: Only extend value of road stops variable 68 if feature tested for 1 year ago
Jonathan G Rennison 2ed248a61d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout.cpp
#	src/misc_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_config.h
#	src/newgrf_engine.cpp
#	src/news_gui.cpp
#	src/order_gui.cpp
#	src/roadveh_cmd.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/statusbar_gui.cpp
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
1 year ago
Jonathan G Rennison b02817f262 Merge branch 'master' into jgrpp
# Conflicts:
#	src/newgrf.cpp
1 year ago
Jonathan G Rennison ef03d44fb3 Use std::unique_ptr for GRFLineToSpriteOverride 1 year ago
Jonathan G Rennison fd4d4d341d Merge branch 'master' into jgrpp
# Conflicts:
#	src/animated_tile.cpp
#	src/cargopacket.h
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/date.cpp
#	src/disaster_vehicle.cpp
#	src/dock_gui.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/error_gui.cpp
#	src/fontcache/spritefontcache.cpp
#	src/game/game_gui.cpp
#	src/game/game_text.cpp
#	src/gfx.cpp
#	src/graph_gui.cpp
#	src/highscore_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/english_AU.txt
#	src/lang/english_US.txt
#	src/lang/finnish.txt
#	src/lang/french.txt
#	src/lang/italian.txt
#	src/lang/portuguese.txt
#	src/lang/russian.txt
#	src/lang/turkish.txt
#	src/lang/vietnamese.txt
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_generic.cpp
#	src/news_gui.cpp
#	src/openttd.cpp
#	src/os/unix/unix.cpp
#	src/os/windows/font_win32.cpp
#	src/os/windows/win32.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/misc_sl.cpp
#	src/saveload/oldloader_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/signs_gui.cpp
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/spritecache.cpp
#	src/spritecache.h
#	src/spriteloader/grf.cpp
#	src/station_cmd.cpp
#	src/statusbar_gui.cpp
#	src/stdafx.h
#	src/strgen/strgen_base.cpp
#	src/subsidy.cpp
#	src/table/settings/difficulty_settings.ini
#	src/texteff.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/townname.cpp
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
#	src/widgets/dropdown.cpp
#	src/window.cpp
1 year ago
Peter Nelson 76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Rubidium 3323402aaa Codechange: rename smallvec_type to container_func and use only when needed 1 year ago
Peter Nelson 6b87fe6540 Codechange: Use std::array for GRF(File|Config) parameters.
This simplifies comparison, copying and assignment operations.
1 year ago
Peter Nelson c23aae96a2 Codechange: Use std::array instead of C array for automatic deep-copies. 1 year ago
Peter Nelson f14479d27d Codechange: Use std::optional for GRF Parameter list. 1 year ago
Peter Nelson c38df2d589 Codechange: Use std::map instead of custom SmallMap. 1 year ago
Peter Nelson 83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Peter Nelson 0b72297d57 Feature: Increase number of stations/roadstops per NewGRF. 1 year ago
Peter Nelson bc7dfd7b46 Add: Station property 1C/1D to set name/classname.
These are an alternative to the original "generic" C4xx/C5xx method,
which can only assign strings to IDs up to 256.
1 year ago
Peter Nelson d6f35a9fd6 Change: Add placeholders for unimplemented NewGRF station properties. 1 year ago
Peter Nelson e5c9a3e527 Change: Read Action 3 IDs as extended-bytes for all features.
This can be done because previous the value 0xFF (which indicates an
extended byte) was reserved for this purpose. Other features which may
not have mentioned reserving 0xFF do not allow this many IDs anyway.

This makes Action 3 consistent across all features. The allowable limits
for each feature do not change.
1 year ago
Peter Nelson 10baecd81f Change: Make Action 3 debug messages more consistent. 1 year ago
Rubidium 3901ef9760 Codechange: use std::string for the GRF filenames 1 year ago
Rubidium f78aa1e720 Codechange: use std::unique_ptr to manager GRFErrors in GRFConfig 1 year ago
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 1 year ago
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 1 year ago
Peter Nelson 20d2558f1b Fix: Clear church/stadium flags when copying house substitute specs. 1 year ago
Peter Nelson 64782cf005 Fix #10627: Houses subsitute specs should only be copied on first definition.
Before #10627, substitue specs were always copied despite redefinition.
1 year ago
PeterN 7535eb65e2
Codechange: Use vector instead of mallloc/free for Action 6 data. (#10713) 1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
Patric Stout 31ad990831
Codechange: move tick-counter into TimerGameTick (#10712) 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Rubidium 7b539fa7c9 Fix: fmt's {:#04X} yields '0X00', not '0x0000'
Technically the 0X vs 0x is not a big problem, just not pretty. However, the
length also including the 0x results in unexpected behaviour, so it probably
better to not use it.
1 year ago
PeterN 27b4b5d0a0
Codechange: Make GRF temporary engine data a vector. (#10685)
This replaces manual C-style realloc/memset/free.
1 year ago
Rubidium 7088f5b7c7 Codechange: use string/fmt instead of printf for grfmsg 1 year ago
PeterN d949cfab24
Codechange: Use std:: features for NewGRF town names (#10631)
This removes manual memory (de-)allocation and list counting.
1 year ago
Peter Nelson 7b0797d1cd Codechange: Use unique ptrs for NewGRF specs. 1 year ago
Peter Nelson ef6b307465 Change: Use std::vector for NewGRF spec tables.
Pointer space is allocated only for the number of IDs used, instead of
the max number of IDs for each feature.
1 year ago
Peter Nelson 15e6fc4eeb Codechange: Use iterator when mapping sprite groups. 1 year ago
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 1 year ago
Jonathan G Rennison c89079a210 Merge branch 'master' into jgrpp
# Conflicts:
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/saveload.h
#	src/strings.cpp
#	src/vehicle.cpp
1 year ago
PeterN 246ba6f00a
Fix 8361cf5a73: Missing bounds check for house specs. (#10625) 1 year ago
Jonathan G Rennison 82803b98e0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/game/game_gui.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf.cpp
#	src/order_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_text.cpp
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/strings.cpp
#	src/table/settings/economy_settings.ini
#	src/table/settings/locale_settings.ini
#	src/timetable_gui.cpp
1 year ago
Peter Nelson 08977828cc Fix: Check ID for name is within bounds. 1 year ago
Peter Nelson cd6c04a663 Fix: Check station ID is within bounds when copying layouts. 1 year ago
Peter Nelson 8361cf5a73 Fix: Check sprite group mapping ID is within bounds of feature. 1 year ago
Peter Nelson 96f4eb3681 Codechange: Check NewGRF feature is defined before processing any sprite group mapping.
Previously this was checked after loading ids, or repeatedly checked for
each item.
1 year ago
Peter Nelson 04215afe3f Codechange: Replace roadstop spec limit magic number with constant. 1 year ago
Peter Nelson 93197f58b7 Codechange: Bind objectspecs to classes once all finalised. 1 year ago
Jonathan G Rennison 62053779b5 Road stops: Add flag to read draw mode from register 0x100 1 year ago
Jonathan G Rennison 5718730d68 VarAction2: Add support for more varaction2 types
Add CB failure and deterministic relative types
1 year ago
Jonathan G Rennison ae99f667b0 NewGRF: Add generic town callback to set town zone radii 1 year ago
Jonathan G Rennison 5acf18fb37 NewGRF: Allow mapping a feature ID to the town scope 1 year ago
Jonathan G Rennison 57c5cc32d0 VarAction2: Improve handling of feature changes with parent scopes 1 year ago
Jonathan G Rennison 25ed7c2b53 Merge branch 'master' into jgrpp
# Conflicts:
#	src/music.cpp
#	src/script/api/script_company.cpp
#	src/script/api/script_event_types.cpp
#	src/script/api/script_group.cpp
#	src/script/api/script_object.cpp
#	src/script/api/script_road.cpp
1 year ago
Joan Josep d80f193e74
Fix: Improve grfmessage for ShipVehicleChangeInfo. (#10558) 1 year ago
Jonathan G Rennison 0fc9223724 VarAction2: Support extended bytes for var 0x7E proc with more_action2_ids 1 year ago
Jonathan G Rennison de17e0aa4d NewGRF: Add extension for more Action2 set IDs 1 year ago
Jonathan G Rennison 5d0ad5625b
Fix : [NewGRF] Object and road stop ignore property handlers (#10525)
* Fix: IgnoreObjectProperty did not handle object property 0x18

* Fix: IgnoreRoadStopProperty did not handle properties 0x0E - 0x12, 0x15
1 year ago
Jonathan G Rennison 412eab22c0 Fix: IgnoreRoadStopProperty did not handle properties 0x0E - 0x12, 0x15 1 year ago
Jonathan G Rennison 8e900c7a87 Fix: IgnoreObjectProperty did not handle object property 0x18 1 year ago
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 1 year ago
Jonathan G Rennison 2ffb245b33 GRF: Add property mapping ID extension mechanism
Bump property_mapping feature version to 3
1 year ago
Jonathan G Rennison 3497d0dcdb Add road/tram type properties to set road vehicle collision mode 1 year ago
Jonathan G Rennison 3b9015ef7a Fix successfully mapped properties in HandleAction0PropertyDefault 1 year ago
Jonathan G Rennison c756b8de8e GRF: Add second success indicator mechanism for feature tests and ID mappings 1 year ago
Jonathan G Rennison 64699d94c9 GRF: Only use extended bytes for object IDs if feature is tested for 1 year ago
Jonathan G Rennison a85b3d7de7 GRF: Add generic mechanism to observe which features have been tested 1 year ago
Jonathan G Rennison dceafaf2db GRF: Initial support for > 255 road stop specs per GRF
Add new variable for road stop info of nearby tiles
Bump roadstops version
1 year ago
Jonathan G Rennison b539799c0a GRF: Fix c0c9c66f: ObjectMapSpriteGroup with missing object specs 1 year ago
Jonathan G Rennison c0c9c66f7b GRF: Initial support for > 255 objects per GRF 1 year ago
Peter Nelson 74e4556a85 Codechange: Store objectspecs in std::vector instead of flat array.
(cherry picked from commit 1ae263c5467105820e4d770b3d57d25ba01e22b1)
1 year ago
Peter Nelson d34e1bbbc1 Codechange: Bind objectspecs to classes once all finalised.
(cherry picked from commit 5f4a8f730b8982cbec7eec5e2331f0bc9217e69e)
1 year ago
Jonathan G Rennison 483e3172af Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/strong_typedef_type.hpp
#	src/gfx.cpp
#	src/group_cmd.cpp
#	src/industry_cmd.cpp
#	src/map_func.h
#	src/newgrf_debug_gui.cpp
#	src/order_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_gui.cpp
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/tile_type.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
1 year ago
Michael Lutz 5daaa45e4a Add: [NewGRF] Second vehicle property for additional callback flags.
(cherry picked from commit 2d73076056)
1 year ago
Michael Lutz 3fdf57cbd6 Change: [NewGRF] Extend the D8xx (DCxx) string area up to FFFF.
This adds the Exxx and Fxxx blocks to the usable range for NewGRF
local strings. TTDPatch uses these ranges for internal strings, but as
we don't support any of them anyway, it is "free" real estate for us.

(cherry picked from commit f5394ed2ef)
1 year ago
Jonathan G Rennison 1272bec13b Road stops: Add height property for build window preview 1 year ago
Jonathan G Rennison 91d736ace5 GRF: Fix ignorable unknown mapped road type and road stop properties 1 year ago
Michael Lutz 2d73076056 Add: [NewGRF] Second vehicle property for additional callback flags. 1 year ago
Michael Lutz f5394ed2ef Change: [NewGRF] Extend the D8xx (DCxx) string area up to FFFF.
This adds the Exxx and Fxxx blocks to the usable range for NewGRF
local strings. TTDPatch uses these ranges for internal strings, but as
we don't support any of them anyway, it is "free" real estate for us.
1 year ago
rubidium42 6ba55e663e Codechange: do not hide variables with other variables 1 year ago
Jonathan G Rennison a9100e93cb Merge branch 'master' into jgrpp
# Conflicts:
#	src/group_cmd.cpp
#	src/lang/korean.txt
#	src/lang/simplified_chinese.txt
#	src/script/api/script_rail.cpp
#	src/tunnelbridge_cmd.cpp
1 year ago
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
Francis Herne 01be423237 Fix #10362: NewGRF bridges without speed limits.
For bridges, a max speed of 0xFFFF (i.e. no effective limit)
 is no longer displayed as a limit in the UI.

A max speed of 0 is also considered unlimited, for similarity to the
 roadtype and railtype interface.
1 year ago
Jonathan G Rennison 1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
1 year ago
PeterN 2355882ec1
Codechange: Remove object `enabled` flag and shuffle members. (#10358)
`enabled` flag is replaced with IsEnabled() which checks if views is
non-zero.

ObjectSpec is shuffled to reduce its memory footprint.
1 year ago
Jonathan G Rennison 5b490b243d Merge branch 'master' into jgrpp
# Conflicts:
#	src/industry_cmd.cpp
#	src/landscape.cpp
#	src/object_cmd.cpp
#	src/rail_cmd.cpp
#	src/script/api/script_tile.cpp
#	src/table/settings/difficulty_settings.ini
#	src/table/settings/world_settings.ini
#	src/terraform_cmd.cpp
#	src/tilearea_type.h
#	src/tree_cmd.cpp
#	src/tree_cmd.h
#	src/tree_gui.cpp
#	src/water_cmd.cpp
1 year ago
PeterN 6a0d1c7c19
Fix: Link variants to parents when finalising engines. (#10346)
This ensures that definition-order of engines within the NewGRF does not matter.
1 year ago
Jonathan G Rennison 62d524eaef Merge branch 'master' into jgrpp
# Conflicts:
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/spritecache.cpp
#	src/timetable_gui.cpp
1 year ago
PeterN 1b1aa682a6
Fix: Don't assume engclass 2 should be elrail. (#10315)
When disabling/enabling elrail, there is an assumption that `engclass` of 2
means the engine will run on elrail. While this holds for default engines,
NewGRFs can do other things.

To resolve this we store the intended railtype so that toggling elrail will
restore to the correct type.
1 year ago
Jonathan G Rennison b9dad1818b Add setting to disable NewGRF inflation flag 1 year ago
Jonathan G Rennison 64c210f770 Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/engine.cpp
#	src/engine_func.h
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/newgrf.cpp
#	src/saveload/oldloader_sl.cpp
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
1 year ago
Jonathan G Rennison 58d841486e Merge branch 'master' into jgrpp
# Conflicts:
#	src/os/windows/font_win32.cpp
#	src/script/api/script_object.hpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/viewport_func.h
1 year ago
Francis Herne 6caed5f15e
Add: Slope-aware and roadtype-specific one-way sprites. (#10282) 1 year ago
PeterN 4f26f6b8aa
Cleanup: Simplify GRFLabel linked-list with std::vector. (#10284) 1 year ago
Peter Nelson 3485709f53 Add: Additional vehicle flags to control variants. 1 year ago
Peter Nelson 85814b29d4 Feature: Vehicle add-ons can now group engines in purchase list.
Grouped engines are collapsed by default but can be expanded. This allows
similar engines to be grouped together to avoid cluttering the list.

Suggested uses for this are e.g.:
* Liveries; same stats but different paint job.
* Re-gearing; engine design is mostly the same but different stats.

... but avoiding complex hidden cargo subtype refit systems.

Grouped engines are otherwise separate, so can be independently
autoreplaced, even between variants.
1 year ago
peter1138 d7f561a400 Change: Add variant property to engines. 1 year ago
PeterN 7b5edba76c
Change: Support flipping shorter engines without NewGRF support. (#10262)
* Change: Support flipping shorter engines without NewGRF support.
* Cleanup: Remove write-only prop27_set temporary flag.
1 year ago
Jonathan G Rennison 3877bb31ef Changing day length or date no longer changes time in minutes
Add offset variables for scaled date ticks.
Adjust offset when changing day length or date, such that scaled
date ticks remain the same.
Store _scaled_tick_counter and scaled date ticks offset in the savagame.
1 year ago
Jonathan G Rennison 9038c849ab VarAction2: Use scaled tick counter for NewGRF variable 0x0A 1 year ago
Jonathan G Rennison 12b20376b3 Add new landscape flag to enable drawing rocks covered by snow 1 year ago
Jonathan G Rennison 41fb98db09 Add NewGRF global flag to allow rocky tiles in tropic desert zones 1 year ago
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
2 years ago
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
2 years ago
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.
2 years ago
Jonathan G Rennison ba3bc73676 VarAction2: Fix memory leak of inlinable adjust groups 2 years ago
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
2 years ago
Michael Lutz bd357656ba Codechange: [NewGRF] Replace magic number for default object size by a constant. 2 years ago
frosch f4e2a462fe Cleanup: Remove unused flag sprites. 2 years ago
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
2 years ago
Jonathan G Rennison c2ede2af54 VarAction2: Allow inlining trivial procedures 2 years ago
dP 548f0496a9
Change: Make _tick_counter 64bit to avoid wrapping (#10035) 2 years ago
Jonathan G Rennison 3d8187261a Debug: Include values when logging GRF base cost changes 2 years ago
Jonathan G Rennison ece0a43146 Merge branch 'master' into jgrpp
# Conflicts:
#	src/newgrf_station.cpp
2 years ago
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)
2 years ago
Jonathan G Rennison 173f867e1a VarAction2: Save calculated_result in shadow group struct 2 years ago
Jonathan G Rennison 14de8c7f34 VarAction2: Add quick exit case to last-level callback groups if possible 2 years ago
Jonathan G Rennison 9c18835bd0 Move ProcessDeterministicSpriteGroupRanges into newgrf.cpp 2 years ago
Jonathan G Rennison 4601a1bfc6 Move NewGRF optimiser functions into a separate file
Create a new header for shared definitions with newgrf.cpp
2 years ago
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
2 years ago
Jonathan G Rennison 00e32162a1 VarAction2: Allow DSE to remove procedure calls 2 years ago
Jonathan G Rennison 30ecdfe140 VarAction2: Allow jumping over constant stores to special registers
Insert suitable store(s) after the end block
2 years ago
Jonathan G Rennison 3a8bd7a589 VarAction2: Allow jumps to skip over procedure calls if possible 2 years ago
Jonathan G Rennison e143ab06d8 VarAction2: Track which temp stores may be overwritten by procedures
Instead of treating procedures as an unpredictable store
2 years ago
Jonathan G Rennison 06cc71b6c5 VarAction2: Mark suitable AND ops as jump insertion candidates 2 years ago
Jonathan G Rennison 0bddf96f7f VarAction2: Set variable for ABS op to avoid unused read from var 0 2 years ago
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
2 years ago
Jonathan G Rennison 9a4c31b0da VarAction2: Add last_value variants of JZ/JNZ ops 2 years ago
Jonathan G Rennison cbc6199542 VarAction2: Add a JNZ op analogous to JZ for OR ops 2 years ago
Jonathan G Rennison 5ec802a3d4 VarAction2: Allow substituting perm store loads through temp store 2 years ago
Jonathan G Rennison ed737e1a8f VarAction2: Do not remove redundant adjusts when this would break var 1C 2 years ago
Jonathan G Rennison b9c22a0b9e VarAction2: Do not prune groups when this would break var 1C 2 years ago
Jonathan G Rennison ae746a1af4 VarAction2: Fix tracking of whether a sprite group needs var 1C 2 years ago
Jonathan G Rennison c19bd4473f Add signal style flag to require realistic braking 2 years ago
Jonathan G Rennison 78ae295dfe Add combined normal and shunt aspect signal style flag 2 years ago
Jonathan G Rennison 759b00262e VarAction2: Allow more than one JZ to end on the same end block adjust 2 years ago
Jonathan G Rennison 9775f468e8 VarAction2: Fix jump insertion moving the end marker for another jump 2 years ago
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