Jonathan G Rennison
c4a1436362
Workaround missing std::bit_cast on some compilers
7 months ago
Jonathan G Rennison
cc2521ddf5
Add helper function for unsigned saturating add
7 months ago
Jonathan G Rennison
cd40eba453
Add an option to disable use of tagged pointers
7 months ago
Jonathan G Rennison
567e235883
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/saveload/saveload.h
7 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
7 months ago
Jonathan G Rennison
ee7a347287
Fix 07278a41: Narrowing conversion warning fix
7 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
7 months ago
Jonathan G Rennison
07278a41e5
Fix narrowing conversion warnings in pool resize capacity calculation
7 months ago
Jonathan G Rennison
0fbb32403c
Add exponential behaviour to pool growth reallocation
7 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
7 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.
7 months ago
Rubidium
f0c50ad529
Codechange: Add function to get the power of ten for a given number
7 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
8 months ago
Jonathan G Rennison
fad5ee56e7
Update fmt StrongType adapter
8 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
8 months ago
Jonathan G Rennison
17712af318
Random: Try a little bit harder in the random bytes fallback path
8 months ago
Jonathan G Rennison
bb627e944c
Serialisation: Add std::span wrappers for Recv_binary, Send_binary
8 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
8 months ago
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
8 months ago
Jonathan G Rennison
c0b8e58404
Codechange: Simplify SetBitIterator
...
Use FindFirstBit and KillFirstBit, allowing simpler iterator equality
Add simple test
8 months ago
Jonathan G Rennison
be469405df
Bitmath: Add utility functions for calculating bit masks
...
Add tests
8 months ago
Jonathan G Rennison
c26ca5369e
Unconditionally use FindFirstBit in SetBitIterator
...
Add simple tests
8 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
8 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
8 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.
8 months ago
Jonathan G Rennison
b01fd1607a
Re-order various structs to reduce holes/padding
8 months ago
Jonathan G Rennison
770915ccc2
Remove networking test from UpdateStateChecksum in dedicated builds
8 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
8 months ago
Jonathan G Rennison
a40aa5e5b8
Add default equality operator to Point
8 months ago
Jonathan G Rennison
a6635088e9
ring buffer: Fix ambiguous comparison operators in C++20
8 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
8 months ago
Patric Stout
71b8801b61
Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems ( #11844 )
8 months ago
Rubidium
086cbd0d72
Codechange: add constexpr to math functions where applicable
8 months ago
Rubidium
dfe70181f1
Codechange: add constexpr to bitmath functions where applicable
8 months ago
Rubidium
4c51534b6a
Remove: LeastCommonMultiple / GreatestCommonDivisor
...
Use std::lcm / std::gcd instead.
8 months ago
Patric Stout
bd85f61a40
Change: use a stronger hash and actual random information to generate Uids
8 months ago
Rubidium
6b21368bc2
Codechange: replace FIND_FIRST_BIT/FindFirstBit2x64 with FindFirstBit
8 months ago
Rubidium
8faaedeff9
Codechange: replace hand written function to find first/last bit with C++ variant
8 months ago
Rubidium
1c694e433d
Codechange: use std::popcount instead of hand written loop
8 months ago
Peter Nelson
ae575a7a5b
Codechange: Store text run positions in vector of points.
...
This simplifies the interlaced vector of x/y positions.
8 months ago
Rubidium
2f8de227dc
Remove: unused OTTD_ALIGNMENT define and ReadLE16(Un)aligned
8 months ago
Jonathan G Rennison
888b7b5dce
Add a simple 64 bit to 64 bit hash (from MurmurHash3)
8 months ago
Rubidium
47c0184a0b
Codechange: replace ROR/ROL with std::rotr/rotl
8 months ago
Patric Stout
fd073a2810
Remove: replace custom span with std::span
9 months ago
Rubidium
aa5ba5bd7f
Codechange: allow certain enumeration to be added
...
Otherwise C++20 doesn't like it.
9 months ago
Peter Nelson
a5b6e17556
Codechange: Make geometry methods constexpr.
9 months ago
Jonathan G Rennison
97e6f3062e
Adding of _t to (u)int types, and WChar to char32_t
...
See: eaae0bb5e
9 months ago
Jonathan G Rennison
55d78a23be
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/3rdparty/squirrel/include/squirrel.h
# src/blitter/32bpp_sse_func.hpp
# src/bridge_map.h
# src/clear_map.h
# src/company_manager_face.h
# src/console_func.h
# src/core/bitmath_func.hpp
# src/core/endian_func.hpp
# src/core/random_func.hpp
# src/depot_map.h
# src/elrail_func.h
# src/fontcache.h
# src/industry_map.h
# src/map_func.h
# src/newgrf_spritegroup.h
# src/object_map.h
# src/rail.h
# src/rail_map.h
# src/road_func.h
# src/road_map.h
# src/saveload/saveload.h
# src/saveload/saveload_error.hpp
# src/settings_gui.cpp
# src/sl/oldloader.h
# src/sprite.h
# src/spritecache.h
# src/station_func.h
# src/station_map.h
# src/story_base.h
# src/strings_func.h
# src/tile_cmd.h
# src/tile_map.h
# src/tile_type.h
# src/town.h
# src/town_map.h
# src/tree_map.h
# src/tunnel_map.h
# src/tunnelbridge_map.h
# src/vehicle_func.h
# src/viewport_func.h
# src/void_map.h
# src/water.h
# src/water_map.h
# src/widget_type.h
9 months ago
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
9 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
9 months ago