Commit Graph

765 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Jonathan G Rennison 41543498f4 Fix ships leaving dots behind in viewport map mode
Fixes: 57db9a41
1 month ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
SamuXarick d7c5e9e8ab Codechange: Where the ship comes from is already known
This simplifies the handling of variables.

`ChooseShipTrack` is called upon entering `tile`, and looking further back to the caller, it can be deduced that `v->tile` matches `src_tile`. With that said, `enterdir` can also be removed, as it's not used anywhere else.

`CreateRandomPath` and `GetRandomFollowUpTrackdir` is being fed `src_tile` as it's 2nd parameter. This could be eliminated, as `v` is also being passed to it. Just use `v->tile` in those functions.
2 months ago
Jonathan G Rennison fe730bce31 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/codeql.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows.yml
#	src/map.cpp
#	src/music/midifile.hpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/pbs.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_text.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_func.h
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/viewport.cpp
#	src/waypoint_cmd.cpp
2 months ago
Rubidium 27eadc13ec Codechange: rename TILE_ADD(XY) to TileAdd(XY) 2 months ago
Tyler Trahan 32b0fb9f6e
Fix #12010: Use economy timer for vehicle stats minimum age, not calendar (#12142) 2 months ago
Peter Nelson b2ca6e1ac8
Codefix: Remove no-longer used ship special-case. (#12192)
This special-case has not been triggered since multi-tile docks were introduced.
3 months ago
Jonathan G Rennison cb5c6abc00 Fix display of ships entering viewports on an aqueduct 3 months ago
Jonathan G Rennison 828d2146eb Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/ai/ai_info.cpp
#	src/company_base.h
#	src/economy.cpp
#	src/game/game_info.cpp
#	src/gfx_type.h
#	src/linkgraph/linkgraph_gui.cpp
#	src/palette.cpp
#	src/palette_func.h
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
#	src/window.cpp
#	src/window_func.h
3 months ago
SamuXarick b22fb43cea
Fix #10490: Allow ships to exit depots if another is not moving at the exit point (#12161) 3 months ago
Jonathan G Rennison 8581808952 Merge tag '14.0-beta2' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/cargotype.cpp
#	src/console_cmds.cpp
#	src/graph_gui.cpp
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/misc_gui.cpp
#	src/network/network_client.cpp
#	src/newgrf.cpp
#	src/newgrf_town.cpp
#	src/object_cmd.cpp
#	src/openttd.cpp
#	src/pathfinder/water_regions.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/table/build_industry.h
#	src/table/engines.h
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
3 months ago
Jonathan G Rennison fdd666f66a Merge tag '14.0-beta1' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/squirrel/sqcompiler.cpp
#	src/aircraft.h
#	src/animated_tile.h
#	src/base_consist.h
#	src/cargotype.h
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/engine_gui.cpp
#	src/industry_gui.cpp
#	src/lang/english.txt
#	src/music/extmidi.cpp
#	src/network/core/network_game_info.cpp
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_industries.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/order_type.h
#	src/os/macosx/misc_osx.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_gui.cpp
#	src/rail_gui.h
#	src/roadveh.h
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/script/api/script_town.cpp
#	src/settingsgen/settingsgen.cpp
#	src/ship.h
#	src/ship_cmd.cpp
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen.h
#	src/table/settings/script_settings.ini
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_cmd.h
#	src/town_gui.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/waypoint_base.h
#	src/widget.cpp
3 months ago
Jonathan G Rennison 838b166726 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_base.h
#	src/debug.cpp
#	src/debug.h
#	src/economy.cpp
#	src/engine_type.h
#	src/graph_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_cmd.h
#	src/network/core/os_abstraction.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings_type.h
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/tests/bitmath_func.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
3 months ago
Jonathan G Rennison 7938844d1d Vehicles age at calendar speed in wallclock mode 3 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
3 months ago
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
3 months ago
Tyler Trahan f6dd5053a3
Feature: Order flag to unbunch vehicles at depot (#11945) 3 months ago
Koen Bussemaker 5a55c4a934 Feature: [NewGRF] Allow higher max speeds for ships 4 months ago
Kuhnovic a7c2f489f6 Fix #5713: FindClosestShipDepot only considers depots that are actually reachable (#11768)
(cherry picked from commit 8a4a99b7e8)
4 months ago
Kuhnovic 8a4a99b7e8
Fix #5713: FindClosestShipDepot only considers depots that are actually reachable (#11768) 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
Jonathan G Rennison 45205a4284 Clear ship path cache when performing collision avoidance 4 months ago
Jonathan G Rennison 914b92b21f Merge branch 'master' into jgrpp
Bump savegame for water regions for ship pathfinder
Use ring_buffer for ShipPathCache
4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 0d4d4a9cac Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/3rdparty/squirrel/squirrel/sqclosure.h
#	src/3rdparty/squirrel/squirrel/sqobject.h
#	src/3rdparty/squirrel/squirrel/sqvm.h
#	src/aircraft.h
#	src/airport_gui.cpp
#	src/blitter/32bpp_sse_func.hpp
#	src/blitter/null.hpp
#	src/bridge_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.h
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/date_gui.cpp
#	src/depot_gui.cpp
#	src/dock_gui.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/fileio.cpp
#	src/fios.cpp
#	src/fios_gui.cpp
#	src/fontcache/spritefontcache.h
#	src/framerate_gui.cpp
#	src/game/game_text.cpp
#	src/gamelog.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/highscore_gui.cpp
#	src/hotkeys.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/main_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_gui.cpp
#	src/network/core/tcp_game.cpp
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf_airport.cpp
#	src/newgrf_airport.h
#	src/newgrf_airporttiles.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_animation_base.h
#	src/newgrf_canal.cpp
#	src/newgrf_commons.h
#	src/newgrf_config.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_engine.h
#	src/newgrf_generic.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/newgrf_industries.cpp
#	src/newgrf_industries.h
#	src/newgrf_industrytiles.cpp
#	src/newgrf_industrytiles.h
#	src/newgrf_object.cpp
#	src/newgrf_object.h
#	src/newgrf_railtype.cpp
#	src/newgrf_railtype.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_roadtype.cpp
#	src/newgrf_roadtype.h
#	src/newgrf_spritegroup.cpp
#	src/newgrf_spritegroup.h
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/newgrf_town.cpp
#	src/newgrf_town.h
#	src/news_gui.cpp
#	src/object_gui.cpp
#	src/order_gui.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/os/windows/win32.cpp
#	src/os/windows/win32_main.cpp
#	src/pathfinder/npf/npf.cpp
#	src/pathfinder/npf/queue.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/roadveh.h
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/script/api/script_text.hpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/signs_cmd.cpp
#	src/signs_gui.cpp
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/spriteloader/grf.hpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/station_map.h
#	src/statusbar_gui.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/table/newgrf_debug_data.h
#	src/terraform_gui.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_window.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/transparency_gui.cpp
#	src/vehicle_gui.cpp
#	src/water_cmd.cpp
#	src/waypoint_cmd.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/rail_widget.h
#	src/widgets/terraform_widget.h
#	src/window.cpp
#	src/window_gui.h
6 months ago
frosch baf7cc858b Codechange: Rename ship docking tile related functions. 8 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 months ago
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 8 months ago
Tyler Trahan fca2b37726 Codechange: Move Ticks into their own class 8 months ago
Jonathan G Rennison 92e632454e Change ship path cache to be optional and use a ring buffer 9 months ago
Tyler Trahan b012d1100c Fix #10334: Store separate newgrf-safe version of date_of_last_service. (#11124)
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.

Co-authored-by: Peter Nelson <peter1138@openttd.org>
(cherry picked from commit 9a602ff304)
9 months ago
Tyler Trahan 9a602ff304
Fix #10334: Store separate newgrf-safe version of date_of_last_service. (#11124)
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.

Co-authored-by: Peter Nelson <peter1138@openttd.org>
10 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
10 months ago
PeterN 98788e865f Fix #10502: Refit engine before attaching free wagons. (#10926)
Caused by incorrect order of operations when buying a train engine with refit and attaching free wagons.

(cherry picked from commit ee2d0745e9)
12 months 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
12 months ago
Jonathan G Rennison 02fe4af934 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-windows.yml
#	src/company_base.h
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/economy.cpp
#	src/economy_cmd.h
#	src/fios.h
#	src/goal.cpp
#	src/group_gui.cpp
#	src/network/core/config.h
#	src/network/network_admin.cpp
#	src/newgrf_config.cpp
#	src/os/windows/win32.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/story.cpp
#	src/story_base.h
#	src/string.cpp
#	src/table/settings/economy_settings.ini
#	src/tests/CMakeLists.txt
#	src/tests/math_func.cpp
12 months ago
Peter Nelson 4a5e413a6c Cleanup: Remove unnecessary VehicleRandomBits()
Simple Random() assignment to byte does the same.
1 year ago
Kuhnovic 3991e76c96
Fix #8177: Ships with max speed overflow to near-zero speed (#10695) 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Jonathan G Rennison 6e091c78b8 Use SoftClamp in DrawAircraftEngine, DrawShipEngine, DrawTrainEngine 1 year ago
Jonathan G Rennison c9c0436e58 Add company setting for remain at station if next order for same station
Set value on load for whether the save version had this enabled for trains
1 year ago
Jonathan G Rennison 211fdd62b2 Initial support for multi-part (pseudo-articulated) ships 1 year ago
Jonathan G Rennison 4ec6a99dd8 Add GetTileTrackStatus wrapper for when red signals part is not needed 1 year ago
Jonathan G Rennison 0310fb0cdc Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/czech.txt
#	src/lang/galician.txt
#	src/lang/german.txt
#	src/order_cmd.cpp
#	src/saveload/afterload.cpp
#	src/ship.h
#	src/vehicle.cpp
1 year ago
Rubidium 375a5b8e3f Codechange: refactor FindClosestDepot to not use pointers, but return a struct 1 year ago
Jonathan G Rennison 5bbf1f5375 Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/geometry_type.hpp
#	src/error_gui.cpp
#	src/rail_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widgets/dropdown.cpp
1 year ago
Jonathan G Rennison 1f36c3f3e4 Merge branch 'master' into jgrpp
# Conflicts:
#	src/ai/ai_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/genworld_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/newgrf_sound.cpp
#	src/roadveh.h
#	src/sound.cpp
#	src/station_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_gui.cpp
1 year ago
Peter Nelson f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2 years ago
Artin Alavi fd4f148c62
Feature: Hotkey to honk a vehicle's horn (#10110) 2 years ago