Commit Graph

790 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
2 weeks ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison c4a1436362 Workaround missing std::bit_cast on some compilers 2 months ago
Jonathan G Rennison cc2521ddf5 Add helper function for unsigned saturating add 2 months ago
Rubidium a06814c173 Codechange: use std::source_location over __FILE__ and __LINE__ for Random 2 months ago
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 2 months ago
Jonathan G Rennison cd40eba453 Add an option to disable use of tagged pointers 3 months ago
Jonathan G Rennison 567e235883 Merge branch 'master' into jgrpp
# Conflicts:
#	src/saveload/saveload.h
3 months ago
Jonathan G Rennison 93bf033107 Add whether the vehicle is non-front to the vehicle pool pointer tag
Add iteration filters which check this
3 months ago
Jonathan G Rennison ee7a347287 Fix 07278a41: Narrowing conversion warning fix 3 months ago
Jonathan G Rennison 1bfcbf823c Use tagged pointers in the vehicle pool on supported (64 bit) platforms
Use to avoid needing to dereference each pointer to get the vehicle
type when doing per-vehicle type iteration
3 months ago
Jonathan G Rennison 07278a41e5 Fix narrowing conversion warnings in pool resize capacity calculation 3 months ago
Jonathan G Rennison 0fbb32403c Add exponential behaviour to pool growth reallocation 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
Peter Nelson 2ecc3c90f7
Change: Improve performance of finding free pool slots. (#12055)
Add a bitmap of used pool slots which allows finding a free pool slot without having to check if each index is already used or not.

Loosely based on a JGRPP patch.
3 months ago
Rubidium f0c50ad529 Codechange: Add function to get the power of ten for a given number 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 fad5ee56e7 Update fmt StrongType adapter 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
Jonathan G Rennison 17712af318 Random: Try a little bit harder in the random bytes fallback path 3 months ago
Jonathan G Rennison bb627e944c Serialisation: Add std::span wrappers for Recv_binary, Send_binary 3 months ago
Jonathan G Rennison 2208d70e33 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/monocypher/CHANGELOG.md
#	src/3rdparty/monocypher/CMakeLists.txt
#	src/3rdparty/monocypher/README.md
#	src/3rdparty/monocypher/monocypher.h
#	src/core/random_func.cpp
#	src/misc.cpp
3 months ago
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 4 months ago
Jonathan G Rennison c0b8e58404 Codechange: Simplify SetBitIterator
Use FindFirstBit and KillFirstBit, allowing simpler iterator equality
Add simple test
4 months ago
Jonathan G Rennison be469405df Bitmath: Add utility functions for calculating bit masks
Add tests
4 months ago
Jonathan G Rennison c26ca5369e Unconditionally use FindFirstBit in SetBitIterator
Add simple tests
4 months ago
Jonathan G Rennison 5404be172c Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/bitmath_func.cpp
#	src/core/bitmath_func.hpp
#	src/core/geometry_type.hpp
#	src/game/game_text.hpp
#	src/graph_gui.cpp
#	src/pathfinder/npf/npf.cpp
#	src/script/api/script_text.cpp
#	src/spritecache.cpp
#	src/track_func.h
4 months ago
Jonathan G Rennison 822ecae85d Merge branch 'master' into jgrpp
# Conflicts:
#	src/cargotype.h
#	src/core/CMakeLists.txt
#	src/core/span_type.hpp
#	src/fileio.cpp
#	src/fios.cpp
#	src/misc/endian_buffer.hpp
#	src/misc_gui.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/settings.cpp
#	src/settings_internal.h
#	src/stdafx.h
#	src/string_func.h
#	src/strings.cpp
#	src/strings_func.h
#	src/strings_internal.h
4 months ago
Patric Stout ea8c1d8597 Change: make for smooth-scrolling based on actual time
This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
4 months ago
Jonathan G Rennison b01fd1607a Re-order various structs to reduce holes/padding 4 months ago
Jonathan G Rennison 770915ccc2 Remove networking test from UpdateStateChecksum in dedicated builds 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
Jonathan G Rennison a40aa5e5b8 Add default equality operator to Point 4 months ago
Jonathan G Rennison a6635088e9 ring buffer: Fix ambiguous comparison operators in C++20 4 months ago
Jonathan G Rennison 606d7cd814 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/direction_type.h
#	src/gfx_type.h
#	src/group_gui.cpp
#	src/misc_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/signs_gui.cpp
#	src/slope_func.h
#	src/smallmap_gui.cpp
#	src/terraform_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_gui.cpp
#	src/town_type.h
#	src/vehicle_type.h
#	src/widget_type.h
4 months ago
Patric Stout 71b8801b61
Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems (#11844) 4 months ago
Rubidium 086cbd0d72 Codechange: add constexpr to math functions where applicable 4 months ago
Rubidium dfe70181f1 Codechange: add constexpr to bitmath functions where applicable 4 months ago
Rubidium 4c51534b6a Remove: LeastCommonMultiple / GreatestCommonDivisor
Use std::lcm / std::gcd instead.
4 months ago
Patric Stout bd85f61a40 Change: use a stronger hash and actual random information to generate Uids 4 months ago
Rubidium 6b21368bc2 Codechange: replace FIND_FIRST_BIT/FindFirstBit2x64 with FindFirstBit 4 months ago
Rubidium 8faaedeff9 Codechange: replace hand written function to find first/last bit with C++ variant 4 months ago
Rubidium 1c694e433d Codechange: use std::popcount instead of hand written loop 4 months ago
Peter Nelson ae575a7a5b Codechange: Store text run positions in vector of points.
This simplifies the interlaced vector of x/y positions.
4 months ago
Rubidium 2f8de227dc Remove: unused OTTD_ALIGNMENT define and ReadLE16(Un)aligned 4 months ago
Jonathan G Rennison 888b7b5dce Add a simple 64 bit to 64 bit hash (from MurmurHash3) 4 months ago
Rubidium 47c0184a0b Codechange: replace ROR/ROL with std::rotr/rotl 4 months ago
Patric Stout fd073a2810 Remove: replace custom span with std::span 4 months ago
Rubidium aa5ba5bd7f Codechange: allow certain enumeration to be added
Otherwise C++20 doesn't like it.
4 months ago
Peter Nelson a5b6e17556 Codechange: Make geometry methods constexpr. 4 months ago