Commit Graph

1118 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Jonathan G Rennison 3712b84d2e Fix narrowing conversion warnings 1 month ago
Jonathan G Rennison 28e74005d0 Remove various uses of lengthof on std::array 1 month ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison 9f205727bf Extend industry production/transported totals to 32 bits 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
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 2 months ago
Jonathan G Rennison b38321b9b4 Add setting to only spawn primary industries 3 months ago
Jonathan G Rennison a98a56669b Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/autoreplace_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/network/network_content.cpp
#	src/newgrf_roadstop.cpp
#	src/pathfinder/yapf/yapf_ship.cpp
#	src/road_gui.cpp
#	src/saveload/ai_sl.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_gui.cpp
#	src/video/cocoa/cocoa_ogl.h
#	src/video/sdl2_opengl_v.h
#	src/video/video_driver.hpp
#	src/video/win32_v.h
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
#	src/window.cpp
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 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
3 months ago
Peter Nelson 58ed38be03 Change: Avoid adjacent fence fields.
This restores pre-r23168 behaviour of only a single fence between adjacent fields.
3 months ago
Jonathan G Rennison cfebbfac8c Merge branch 'master' into jgrpp
# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/company_base.h
#	src/company_gui.cpp
#	src/cpu.cpp
#	src/debug.h
#	src/group.h
#	src/group_cmd.cpp
#	src/house.h
#	src/industry.h
#	src/newgrf_house.cpp
#	src/news_type.h
#	src/openttd.cpp
#	src/saveload/company_sl.cpp
#	src/settings_type.h
#	src/sl/oldloader_sl.cpp
#	src/story.cpp
#	src/table/town_land.h
#	src/viewport.cpp
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 41f2eed425
Feature: Settings to scale cargo production of towns and industries (#10606) 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
Peter Nelson c0ab436077
Codechange: Store Colours in Colours type. (#11625)
This reduces casts, some magic numbers, and introduces a bit of type-safety.
4 months ago
Jonathan G Rennison 1e0bb019a7 Change cargo scaling settings to be linear instead of logarithmic 4 months ago
Jonathan G Rennison 3050620189 Merge branch 'master' into jgrpp
# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.cpp
#	src/economy.cpp
#	src/engine_gui.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/linkgraph/refresh.cpp
#	src/linkgraph/refresh.h
#	src/newgrf.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_func.h
#	src/order_gui.cpp
#	src/pathfinder/pathfinder_type.h
#	src/saveload/afterload.cpp
#	src/subsidy_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
4 months ago
Peter Nelson 952d111b94 Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
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 f034714559 Use StringBuilder for GetString/GetStringWithArgs, as per upstream
Update dependent code as required
4 months ago
Jonathan G Rennison 7f6b1d6b94 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/company_func.h
#	src/core/overflowsafe_type.hpp
#	src/engine.cpp
#	src/music/midifile.cpp
#	src/network/network_command.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_spritegroup.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/road_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/script/api/script_depotlist.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/strings.cpp
#	src/table/settings/game_settings.ini
4 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 4 months ago
Jonathan G Rennison 61d65c9861 Use std::array for industry/industry spec input/output arrays 5 months ago
Jonathan G Rennison 4fac6b295c Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-linux.yml
#	src/base_consist.h
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/32bpp_optimized.hpp
#	src/blitter/32bpp_sse2.hpp
#	src/blitter/8bpp_optimized.hpp
#	src/gfx_func.h
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/linkgraph/linkgraphjob.cpp
#	src/mixer.cpp
#	src/newgrf_callbacks.h
#	src/openttd.cpp
#	src/os/macosx/macos.mm
#	src/os/windows/win32.cpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/sound.cpp
#	src/spritecache.cpp
#	src/spriteloader/spriteloader.hpp
#	src/station_map.h
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui_base.h
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/viewport.cpp
5 months ago
Peter Nelson e5aed24395
Codechange: Use std::array for industry tile cargo acceptance. (#11498)
This avoids use of memcpy/memset to copy or fill.
6 months ago
Jonathan G Rennison 2a31095118 Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/console_cmds.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/hotkeys.cpp
#	src/network/core/tcp_connect.cpp
#	src/network/core/tcp_listen.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_engine.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_station.cpp
#	src/openttd.cpp
#	src/order_gui.cpp
#	src/os/macosx/osx_main.cpp
#	src/pathfinder/yapf/yapf_node_rail.hpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_game_calendar.h
#	src/timer/timer_manager.h
#	src/timer/timer_window.cpp
#	src/timetable_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/vehicle_cmd.h
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_func.h
#	src/window_gui.h
6 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
Jonathan G Rennison 3436e0a781 Merge branch 'master' into jgrpp
# Conflicts:
#	src/error.h
#	src/error_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_gui.cpp
#	src/news_gui.cpp
#	src/rail_cmd.cpp
#	src/saveload/gamelog_sl.cpp
#	src/script/api/script_text.cpp
#	src/script/script_instance.cpp
#	src/statusbar_gui.cpp
#	src/strings.cpp
#	src/strings_func.h
#	src/strings_internal.h
#	src/table/settings/gui_settings.ini
#	src/table/settings/linkgraph_settings.ini
#	src/textbuf_gui.h
6 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
6 months ago
Rubidium c9276c2959 Codechange: replace x.size() == 0 with x.empty() 7 months ago
frosch 5733145c59 Cleanup: Remove unneeded parameters. 8 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 months ago
PeterN 18e75dbc88
Fix: Don't produce invalid cargo. (#11314)
Production for secondary industries did not always check that the produced cargo type isn't valid.
8 months ago
Jonathan G Rennison a18f3274b4 Rename close window functions to match upstream 8 months ago
Tyler Trahan fca2b37726 Codechange: Move Ticks into their own class 8 months ago
Michael Lutz fb6d85dbe5 Add: [Script] Custom news message text for industry SetProductionLevel.
(cherry picked from commit 0089323542)
9 months ago
Michael Lutz 4c6ed36b6a Add: [Script] Game script control of industry production level.
(cherry picked from commit 1c56991213)
9 months ago
Michael Lutz 0089323542 Add: [Script] Custom news message text for industry SetProductionLevel. 9 months ago
Michael Lutz 1c56991213 Add: [Script] Game script control of industry production level. 9 months ago
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
9 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
Jonathan G Rennison ead18b2af2 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/3rdparty/md5/md5.h
#	src/3rdparty/squirrel/squirrel/squtils.h
#	src/animated_tile.cpp
#	src/console_func.h
#	src/core/CMakeLists.txt
#	src/core/container_func.hpp
#	src/core/smallstack_type.hpp
#	src/crashlog.cpp
#	src/crashlog.h
#	src/debug.h
#	src/economy.cpp
#	src/gamelog.cpp
#	src/industry_gui.cpp
#	src/lang/catalan.txt
#	src/misc_gui.cpp
#	src/network/network_content.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/newgrf_gui.cpp
#	src/os/unix/font_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_cmd.cpp
#	src/saveload/animated_tile_sl.cpp
#	src/script/api/script_tilelist.cpp
#	src/settings.cpp
#	src/settingsgen/settingsgen.cpp
#	src/sl/oldloader_sl.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen_base.cpp
#	src/table/settings/gui_settings.ini
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui_base.h
#	src/viewport_sprite_sorter.h
11 months ago
Rubidium 3e8f8c55c2 Codechange: make creating temporary StringParameters easier 11 months ago
Rubidium 1d902a97ce Codechange: move StringParameters to strings_internal.h 11 months ago
Rubidium 0a5e58451b Codechange: pass string parameters by reference 11 months ago
Rubidium f86500df92 Codechange: remove need for SetDParamX 11 months ago
Jonathan G Rennison 02549c5224 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/cargomonitor.cpp
#	src/core/CMakeLists.txt
#	src/economy.cpp
#	src/landscape.cpp
#	src/linkgraph/flowmapper.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraphschedule.cpp
#	src/misc_gui.cpp
#	src/newgrf_generic.cpp
#	src/newgrf_storage.cpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/station_sl.cpp
#	src/script/script_gui.cpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/string_func.h
#	src/terraform_cmd.cpp
11 months ago