Commit Graph

58938 Commits

Author SHA1 Message Date
Peter Nelson
84c6a917d8 Add: [NewGRF] Extended custom waypoint classes. (#12653)
This allows waypoints to be split into categories just like stations, instead of all being lumped together.

Station class labels with the first byte set to 0xFF will be treated in the same way as the 'WAYP' class.

(cherry picked from commit 2c70ccb137)
2024-08-22 14:21:21 +01:00
Peter Nelson
fe14fe6d3c Codechange: Store custom station layouts in a map instead of nested vectors. (#12898)
The map key is the platforms and length combined. This simplifies allocation and searching for layouts.

(cherry picked from commit ff972ec4ff)

# Conflicts:
#	src/newgrf.cpp
#	src/newgrf_station.h
2024-08-22 14:21:21 +01:00
Peter Nelson
839ec6f1e8 Add: [NewGRF] Station property 1E, extended station tile flags.
Properties 11, 14 and 15 to set pylons/nowires/blocked intrinsically only support 8 station tiles.

Add new property to define all three flags for each station tile layout.

(cherry picked from commit a03ddb3ccb)

# Conflicts:
#	src/newgrf.cpp
#	src/newgrf_station.h
#	src/station_cmd.cpp
2024-08-22 14:21:21 +01:00
Peter Nelson
c709976703 Feature: [NewGRF] Allow fixed layout up to 256 tiles per NewGRF rail station.
Allow using up to 256 tile layouts in property 0E or callback 24, which defines the layout to be saved into the map.

This was originally limited to 8, because station graphics above 8 referred to other station types but that was changed in 2007.

1) More efficient than using callback 14, as that needs to be checked every time a station tile is rendered.
2) The layout does not get changed when the station is changed (this may or may not be desirable!)

Using more than 256 layouts still requires callback 14.

(cherry picked from commit 6e553410d3)
2024-08-22 14:10:47 +01:00
Peter Nelson
c001ee507e Codechange: Rename CBID_STATION_SPRITE_LAYOUT and CBID_STATION_TILE_LAYOUT.
These callbacks both select rail station tile layouts, the difference is one happens when drawing, the other happens when building. Change the names to make this clearer.

(cherry picked from commit 70a2ed062d)

# Conflicts:
#	src/newgrf_station.cpp
#	src/station_cmd.cpp
2024-08-22 14:10:47 +01:00
Peter Nelson
6b5e4108a9 Codefix: Find GRF override entries properly. (#12743)
My naive code from 16 years ago tested for GRF overrides in a way that will create empty 0 entries for each source GRF tested.

(cherry picked from commit 579ce8eae0)
2024-08-22 14:10:47 +01:00
Peter Nelson
1e55fd4667 Change: [NewGRF] Treat house max year 0xFFFF as MAX_YEAR. (#12740)
(cherry picked from commit 96fc367bcf)
2024-08-22 14:10:47 +01:00
Jonathan G Rennison
1154fff48a Fix a2b63635: Scheduled dispatch info panel was one line too short 2024-08-22 12:54:31 +01:00
Jonathan G Rennison
e6afaed4fc Scheduled dispatch: Show slots for different clock hours on separate lines
See: #722
2024-08-22 12:48:20 +01:00
Jonathan G Rennison
f75f9f11de Merge branch 'master' into jgrpp
# Conflicts:
#	src/CMakeLists.txt
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_class.h
#	src/newgrf_class_func.h
#	src/newgrf_object.h
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/pathfinder/aystar.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_rail.cpp
#	src/settings.cpp
#	src/table/object_land.h
#	src/widgets/CMakeLists.txt
2024-08-22 11:48:13 +01:00
Jonathan G Rennison
5ad010b06f Timer: Add equivalent timer interface for upstream TimerGameCalendar 2024-08-22 01:00:58 +01:00
Jonathan G Rennison
c7904e23f0 Timer: Add upstream TimerWindow 2024-08-22 01:00:58 +01:00
Jonathan G Rennison
a56efeb609 Timer: Add utility to ensure safe iteration of timers 2024-08-21 22:57:54 +01:00
Jonathan G Rennison
5eae56fd23 Lang: Reformat lang files, remove unused string 2024-08-21 22:57:54 +01:00
Jonathan G Rennison
c21d6607dd Hotkeys: Use std::vector, remove HOTKEY_LIST_END sentinel 2024-08-21 22:35:54 +01:00
Jonathan G Rennison
44dffb0e81 cpp-btree: Add contains method to match STL 2024-08-21 22:21:47 +01:00
Jonathan G Rennison
e060e9b83d Fix: DepotWindow::GetVehicleFromDepotWndPt not refreshing vehicle list 2024-08-21 16:57:30 +01:00
Jeremy Gao
4fb677bdfe
Update: Simplified Chinese translations (#721) 2024-08-21 12:00:06 +01:00
Jonathan G Rennison
5fe5519a66 Lang: Remove unused extra string 2024-08-20 23:46:45 +01:00
Jonathan G Rennison
f76204475b Merge PR #729 into jgrpp 2024-08-20 23:46:20 +01:00
Qwest8K
5aca3bd4ab Update russian.txt 2024-08-20 04:13:32 +03:00
Jonathan G Rennison
6b8a37d0e9 Remove unused headers from road.cpp 2024-08-19 21:52:29 +01:00
Jonathan G Rennison
e760a4eff6 Tracerestrict: Use spans for drop down list sets in GUI 2024-08-17 22:49:11 +01:00
Jonathan G Rennison
591fe96a71 Saveload: Support upstream wider station type field size version 2024-08-17 22:01:29 +01:00
Jonathan G Rennison
782840a62b Remove leftover debug prints 2024-08-17 18:03:10 +01:00
Jonathan G Rennison
16dfb84978 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.h
#	src/console_gui.cpp
#	src/music.cpp
#	src/pathfinder/npf/npf.cpp
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_types.hpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settings_type.h
#	src/ship_cmd.cpp
#	src/strings.cpp
#	src/table/settings/pathfinding_settings.ini
#	src/train_cmd.cpp
#	src/vehicle_type.h
#	src/waypoint_gui.cpp
2024-08-17 17:49:19 +01:00
Jonathan G Rennison
e2510b4627 Merge branch 'master' into jgrpp
Company password removal/pubkey access: mostly skipped

# Conflicts:
#	src/company_cmd.h
#	src/network/core/tcp_game.h
#	src/network/network_server.cpp
#	src/saveload/saveload.h
2024-08-17 15:31:57 +01:00
Jonathan G Rennison
7dd8729a33 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cachecheck.cpp
#	src/network/network.cpp
#	src/openttd.cpp
#	src/pathfinder/follow_track.hpp
#	src/saveload/saveload.cpp
#	src/textfile_gui.cpp
2024-08-17 15:31:57 +01:00
Jonathan G Rennison
1406b36fde Set default hotkey for picker tool to / (SLASH) 2024-08-14 00:59:03 +01:00
Jonathan G Rennison
5b36c1db11 Merge branch 'master' into jgrpp
# Conflicts:
#	src/bridge_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/core/geometry_func.hpp
#	src/disaster_vehicle.cpp
#	src/dropdown.cpp
#	src/dropdown_func.h
#	src/engine_gui.h
#	src/genworld_gui.cpp
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/network/network_content.cpp
#	src/newgrf.cpp
#	src/newgrf_airport.h
#	src/newgrf_engine.cpp
#	src/order_gui.cpp
#	src/pathfinder/water_regions.cpp
#	src/saveload/town_sl.cpp
#	src/slider_func.h
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/table/airport_defaults.h
#	src/tilematrix_type.hpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/video/sdl_v.cpp
2024-08-13 20:34:12 +01:00
Jonathan G Rennison
fbfb752b1c Simplify texts and GUI behaviour for cargo scaling mode settings 2024-08-13 01:43:35 +01:00
Jonathan G Rennison
4c3072e719 Departures: Fix manual memory management, avoid leaks 2024-08-13 01:39:26 +01:00
Jonathan G Rennison
3717b5b934 Sign window: Ctrl-click sign to open extra viewport at sign coordinates 2024-08-13 00:54:11 +01:00
Jonathan G Rennison
7b26ec91c6 Sign window: Remove dead code for WID_SIL_FILTER_ENTER_BTN 2024-08-13 00:48:50 +01:00
Jonathan G Rennison
13e13e875c Order window: Clicking selected label order opens edit window 2024-08-13 00:31:07 +01:00
Jonathan G Rennison
157f713388 Departures: Support scheduled dispatch vehicle slot conditionals
Also iterate orders more times when these are present
2024-08-13 00:17:14 +01:00
Jonathan G Rennison
371d7c10d7 Departures: Fix wrong tick in scheduled dispatch evaluation 2024-08-12 23:57:43 +01:00
Jonathan G Rennison
3003f8796e Add conditional order sub-mode for vehicle dispatch slot 2024-08-12 23:57:43 +01:00
Jonathan G Rennison
a2b6363584 Scheduled dispatch: Store vehicle last dispatch records 2024-08-12 23:57:43 +01:00
TELK
0d863bdf0d Update: Korean translation 2024-08-11 11:29:18 +01:00
Jonathan G Rennison
5d62cb361d Debug: Enable debug window for rail waypoints 2024-08-11 10:55:09 +01:00
Jonathan G Rennison
37b129c3c0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/effectvehicle.cpp
#	src/fileio.cpp
#	src/gfx.cpp
#	src/newgrf_commons.h
#	src/road_gui.cpp
#	src/saveload/gamelog_sl.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/signs_gui.cpp
#	src/smallmap_gui.cpp
#	src/sortlist_type.h
#	src/table/settings.h.preamble
#	src/table/settings/company_settings.ini
#	src/table/settings/currency_settings.ini
#	src/table/settings/difficulty_settings.ini
#	src/table/settings/economy_settings.ini
#	src/table/settings/game_settings.ini
#	src/table/settings/gui_settings.ini
#	src/table/settings/linkgraph_settings.ini
#	src/table/settings/locale_settings.ini
#	src/table/settings/misc_settings.ini
#	src/table/settings/multimedia_settings.ini
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/table/settings/news_display_settings.ini
#	src/table/settings/old_gameopt_settings.ini
#	src/table/settings/pathfinding_settings.ini
#	src/table/settings/script_settings.ini
#	src/table/settings/win32_settings.ini
#	src/table/settings/window_settings.ini
#	src/table/settings/world_settings.ini
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/video/opengl.cpp
#	src/viewport.cpp
2024-08-09 23:16:07 +01:00
Jonathan G Rennison
77c0197216 CMake: Remove -fno-strict-aliasing compiler flag 2024-08-09 23:16:07 +01:00
Jonathan G Rennison
70793de97b Fix type casts for position updates in BufferDeserialisationHelper 2024-08-09 23:15:57 +01:00
Jonathan G Rennison
2a204ea033 cpp-btree: Use union to avoid strict aliasing violation in leaf_fields 2024-08-09 23:15:57 +01:00
Jonathan G Rennison
1c6df3451b Saveload: Improve efficiency of SlReadSimpleGamma 2024-08-09 23:15:57 +01:00
Jonathan G Rennison
22a6dc642d Saveload: Refactor interface for memory dumper raw write functions 2024-08-08 21:36:30 +01:00
Jonathan G Rennison
d0cbc48f7d Saveload: Move AcquireBytes loop out of CheckBytes 2024-08-08 21:00:16 +01:00
Jonathan G Rennison
0ab976e069 Saveload: Refactor interface for read buffer raw read functions 2024-08-08 21:00:16 +01:00
Jonathan G Rennison
cef83e30b5 Saveload: Fix return type of SlReadUint16 2024-08-08 20:28:08 +01:00