Commit Graph

433 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 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
Jonathan G Rennison 0e76f774eb Merge branch 'master' into jgrpp
# Conflicts:
#	src/landscape.cpp
#	src/landscape.h
#	src/misc_gui.cpp
#	src/newgrf_commons.cpp
#	src/order_cmd.cpp
#	src/pathfinder/yapf/yapf_base.hpp
#	src/station_cmd.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/water_cmd.cpp
#	src/window.cpp
2 months ago
Michael Lutz 8b9f59d320 Codechange: Use references for non-optional in/out values of slope functions 2 months ago
Michael Lutz 8dda387f82 Codechange: Use std::tuple for slope functions with two return values 2 months ago
Jonathan G Rennison fc2f746b80 Increase river pathfinding node limit 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 86a6f63e2f Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/codeql.yml
#	.github/workflows/commit-checker.yml
#	.github/workflows/release-linux-legacy.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows-store.yml
#	.github/workflows/release-windows.yml
#	.github/workflows/upload-cdn.yml
#	.github/workflows/upload-gog.yml
#	.github/workflows/upload-steam.yml
#	src/console_cmds.cpp
#	src/core/math_func.hpp
#	src/fios.cpp
#	src/fios.h
#	src/intro_gui.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/settings_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/viewport.cpp
#	src/viewport_func.h
#	src/window.cpp
3 months ago
Jonathan G Rennison 1f5b35fac4 Change link graph join and compression times to use scaled tick counter 3 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
3 months ago
Jonathan G Rennison 516e8defb5 Add wrappers to get and update the current effective day length factor 3 months ago
Loïc Guilloux b68d263d5f
Fix #12014: Remove water when area clearing ship depot (#12030) 3 months ago
Patric Stout 090616b4c9
Add: allow loading heightmaps from command-line (#11870)
If you want to load a file from tar, you have to give the file
inside the tar in order for it to work:

<tar-file>/<dir-in-tar>/<file>.png
4 months ago
Kuhnovic b38d3c2208
Change: simplified water region evaluation, removed savegame data (#11750) 4 months ago
Jonathan G Rennison e0361791fd Used curved instead of square circular area for mapgen water desert removal 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Peter Nelson 33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. (#11637) 5 months ago
Jonathan G Rennison 60378323ea Fix AyStar::Init overriding max search nodes
See: c05ffb22bd
5 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
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
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 months ago
Jonathan G Rennison 8481fb4b7b Fix compiler warnings on Windows ARM64 9 months ago
Jonathan G Rennison cdf1ff8d5a Network: Extend post-desync frame sync history
Record sync state at various points throughout each frame
9 months ago
Jonathan G Rennison 46f5fb9f25 Sprite cache: Allow caching only required subset of sprite zoom levels
Enable for blitters based on 32bpp_optimized or SSE
9 months ago
Rubidium 73d7052732 Add: unit test functionality using catch2
(cherry picked from commit 43a7e54067)
9 months ago
Jonathan G Rennison 7502fbd44b Use ring buffers for tile/landscape candidate queues 9 months ago
Jonathan G Rennison 9cf39b7a25 Prefetch next tile in tile loop iteration 9 months ago
Jonathan G Rennison cc57ac0eff Add pre-check to auxiliary tile loop flooding test 9 months ago
Patric Stout 9624017fc2
Codechange: be more type-specific about types in NPFs queue (#11192) 9 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 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 410d5bdc55 Spread tile loop iterations over all ticks when using day length > 1
See: #545
11 months ago
Jonathan G Rennison ac2f9a21e8 Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
Leave afterload in src/saveload/
11 months 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
12 months ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Peter Nelson a8c0d16371 Cleanup: Use std::advance instead of for-loop. 1 year ago
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 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
PeterN e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Rubidium 43a7e54067 Add: unit test functionality using catch2 1 year ago
Jonathan G Rennison 9521e7ef2b Merge branch 'master' into jgrpp
# Conflicts:
#	src/elrail.cpp
#	src/ground_vehicle.hpp
#	src/landscape.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/tile_cmd.h
#	src/town_cmd.cpp
#	src/tunnelbridge_cmd.cpp
1 year ago
Rubidium c6ff7dad68 Add: compile time "unit tests" for GetPartialZ consistent 1 year ago
Rubidium 9d2a0f3d0b Change: make GetPartialZ consistent, meaning Z of adjacent slopes continue
Previously, on a straight line of a one corner up slope with the adjacent
steep sloop the Z would increase one step every two sub pixels, except for one
case where one sub pixel is skipped. Similarly, a steep slope with two
adjacent one corner up slopes, would have a bump in the height line along the
diagonal whenever it enters/leaves the steep slope tile.
1 year ago
Rubidium e8af8daa68 Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
1 year ago
Jonathan G Rennison 2ea1766677 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/league_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_object.hpp
#	src/script/squirrel_helper.hpp
#	src/settings_table.cpp
#	src/station_cmd.cpp
#	src/table/settings.h.preamble
#	src/tree_cmd.cpp
#	src/tree_map.h
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
1 year ago
Jonathan G Rennison ff189e44e4 Public roads: Handle non-trivial existing foundations 1 year ago