Jonathan G Rennison
05e237f8d1
Add wrapper to iterate vehicle pool with vehicle type filter
...
Without needing to dereference vehicle pointers if using tagged pointers
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
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
8 months ago
Jonathan G Rennison
b940fa9466
Do not scale shown running costs by the day length factor
...
Show in original years
8 months ago
Jonathan G Rennison
7ce06e22b8
Split date types into calendar and economy dates
...
See: 735abfe1
8 months ago
Jonathan G Rennison
516e8defb5
Add wrappers to get and update the current effective day length factor
8 months ago
Jonathan G Rennison
0ea57528c9
Rename DateTicksScaled to StateTicks
...
Rename various other related/derived types and variables
8 months ago
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
8 months ago
Jonathan G Rennison
1ce8930583
Use DateTicksScaled for Vehicle::last_loading_tick
8 months ago
Jonathan G Rennison
49eb40bc4f
Change various _network_dedicated tests to use IsHeadless
8 months ago
Jonathan G Rennison
dc9f322478
Use [[no_unique_address]] for space in end of NewGRFCache
8 months ago
Jonathan G Rennison
df9fc6d1cf
Use comparison operator for NewGRFCache instead of memcmp
8 months ago
Jonathan G Rennison
b01fd1607a
Re-order various structs to reduce holes/padding
8 months ago
Jonathan G Rennison
3017660e5d
Reduce the size of VehicleSpriteSeq (and Vehicle) 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
97e6f3062e
Adding of _t to (u)int types, and WChar to char32_t
...
See: eaae0bb5e
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
Rubidium
e3f49ee7a0
Codechange: coding style fixes
9 months ago
Jonathan G Rennison
03e0ec8276
Strong typedef: Use strong typedefs for date, date tick, minutes types
...
Add delta types
Adjust/add type conversion functions
Add various utility methods on types
Remove the various minute macros
Fix some minute conversion inconsistencies
10 months ago
Tyler Trahan
3902acb13d
Codechange: Define a TickCounter variable type for TimerGameTick::counter
10 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
11 months ago
Peter Nelson
7d4a91ef9e
Cleanup: Remove some unused functions. ( #11429 )
...
These were picked up with cppcheck.
11 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Jonathan G Rennison
f6eadf19c6
Replace vehicle tile hash
...
Use robin hood hash of TileIndex
Retain linked list of vehicles on the same tile
1 year ago
Patric Stout
a9ed590ca7
Codechange: use TimerGameCalendar::Date for variables in linkgraph that are dates ( #11187 )
1 year 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
)
1 year 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>
1 year 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
1 year ago
Jonathan G Rennison
d75c489466
Add various missing includes
1 year 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
1 year ago
Jonathan G Rennison
d09b504bc5
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release-linux.yml
# .github/workflows/release-macos.yml
# .github/workflows/release-source.yml
# .github/workflows/release.yml
# CMakeLists.txt
# COMPILING.md
# src/ai/ai_core.cpp
# src/ai/ai_gui.cpp
# src/bridge_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/core/CMakeLists.txt
# src/core/smallmap_type.hpp
# src/disaster_vehicle.h
# src/effectvehicle_base.h
# src/fontcache.cpp
# src/game/game_core.cpp
# src/game/game_gui.cpp
# src/gamelog.cpp
# src/gamelog_internal.h
# src/group_gui.cpp
# src/linkgraph/linkgraph.h
# src/misc.cpp
# src/network/core/config.h
# src/network/core/udp.cpp
# src/network/network_chat_gui.cpp
# src/network/network_content_gui.cpp
# src/network/network_gui.cpp
# src/newgrf.cpp
# src/newgrf_gui.cpp
# src/newgrf_profiling.cpp
# src/newgrf_profiling.h
# src/object_gui.cpp
# src/openttd.cpp
# src/openttd.h
# src/order_gui.cpp
# src/os/windows/font_win32.cpp
# src/rail_gui.cpp
# src/road.cpp
# src/road_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/script/api/script_controller.cpp
# src/script/api/script_roadtypelist.cpp
# src/script/script_config.cpp
# src/script/script_config.hpp
# src/script/script_instance.cpp
# src/script/script_scanner.cpp
# src/script/squirrel.cpp
# src/script/squirrel_helper.hpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/table/settings/network_private_settings.ini
# src/timetable_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/window_gui.h
1 year ago
Jonathan G Rennison
ac2f9a21e8
Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
...
Leave afterload in src/saveload/
1 year ago
Jonathan G Rennison
cdb3a6288b
Codechange: Remove unused CapacitiesMap typedef from struct Vehicle
1 year ago
Jonathan G Rennison
24ffc5233c
Remove CapacitiesMap typedef
1 year 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
1 year ago
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
1 year ago
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
1 year ago
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
1 year ago
Peter Nelson
7ccdefa1c1
Change: Increase vehicle random data from 8 to 16 bits.
1 year ago
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
1 year ago
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
1 year ago
Jonathan G Rennison
bd837a2fcd
TBTR: Mark vehicles as requiring service on template/replacement change
2 years ago
Jonathan G Rennison
211fdd62b2
Initial support for multi-part (pseudo-articulated) ships
2 years ago
Jonathan G Rennison
8dca681c8c
Use btree_multimap for pending speed restrictions
...
Avoid unnecessary iteration when saving VESR chunk
2 years ago
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2 years ago
Rubidium
b7a5d8e296
Codechange: add annotation to selectively force inlining in debug build
2 years 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
2 years ago
Rubidium
375a5b8e3f
Codechange: refactor FindClosestDepot to not use pointers, but return a struct
2 years ago
Jonathan G Rennison
5c2d5782a4
Fixes incorrect link graph edge travel times with non-unity day length
...
Change vehicle last_loading_tick to be relative to _scaled_tick_counter
2 years 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
2 years ago