Jonathan G Rennison
090656bd7f
Adjust handling of year display in wallclock mode and company inauguration years
...
See: #657
7 months ago
Jonathan G Rennison
33cbfc3e76
Cache current ticks per calendar day
7 months ago
Jonathan G Rennison
6b12539e3f
Implement StateTicksToCalendarDate for wallclock mode
7 months ago
Jonathan G Rennison
bd955c4117
Fix calendar day length in wallclock mode
...
See: https://github.com/OpenTTD/OpenTTD/issues/12154
7 months ago
Jonathan G Rennison
675b31887a
Saveload: Fix recalculation of _state_ticks
...
For XSLFI_VARIABLE_DAY_LENGTH versions 1 to 3
7 months ago
Jonathan G Rennison
37e6f36b1f
Fix off by one in wallclock mode ConvertDateToYMD
7 months ago
Jonathan G Rennison
471934e685
Add a helper to get the number of days in a given calendar month
7 months ago
Jonathan G Rennison
074447138c
Add method for whether calendar is frozen
7 months ago
Jonathan G Rennison
450c6b76d6
Ensure tile loop counts and cargo scalers updated when day length changed
8 months ago
Jonathan G Rennison
a48e15dce0
Add wallclock time settings
8 months ago
Jonathan G Rennison
1f5b35fac4
Change link graph join and compression times to use scaled tick counter
8 months ago
Jonathan G Rennison
edbbaeb5d9
Add ScaledTickCounter type
8 months ago
Jonathan G Rennison
b13b2781bd
Add string codes for upstream wallclock mode, add upstream language changes
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
9aa8059c79
Include elapsed state ticks since load in crash/failure logs
...
Consolidate game load date/time variables
8 months ago
Jonathan G Rennison
d39236d50c
Store state ticks directly in savegame instead of the offset
...
Initialise the state ticks value to a constant for new games,
instead of using an implicit offset of 0
8 months ago
Jonathan G Rennison
0ea57528c9
Rename DateTicksScaled to StateTicks
...
Rename various other related/derived types and variables
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
ffff696b4e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/build_vehicle_gui.cpp
# src/cheat_gui.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/group_cmd.cpp
# src/landscape.cpp
# src/network/network_gui.cpp
# src/newgrf.cpp
# src/saveload/afterload.cpp
# src/script/api/script_date.cpp
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/strings.cpp
# src/subsidy_gui.cpp
# src/survey.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_game_calendar.h
9 months ago
Jonathan G Rennison
4689113553
Debug: De-duplicate formatting of hex dates for desync/random logging
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
9 months ago
Jonathan G Rennison
4874381943
Link graph: Fix date shifting after max year
10 months ago
Jonathan G Rennison
42213454f1
Remove unused _autosave_months constants
11 months ago
Jonathan G Rennison
4bfa8b7b7b
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/openttd.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/table/settings/gameopt_settings.ini
# src/table/settings/gui_settings.ini
11 months ago
Jonathan G Rennison
e1cce4d9f7
Link graph: Store last compression in scaled date ticks
...
Higher accuracy than using dates at high day legnths
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
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
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
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
Patric Stout
5e1bcee39b
Codechange: introduce a framework for all our timers
...
IntervalTimer and TimeoutTimer use RAII, and can be used to replace
all the time-based timeouts, lag-detection, "execute every N" we
have.
As it uses RAII, you can safely use it as static variable, class
member, temporary variable, etc. As soon as it goes out-of-scope,
it will be safely removed.
This allows for much easier to read code when it comes to intervals.
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2 years ago
Jonathan G Rennison
3877bb31ef
Changing day length or date no longer changes time in minutes
...
Add offset variables for scaled date ticks.
Adjust offset when changing day length or date, such that scaled
date ticks remain the same.
Store _scaled_tick_counter and scaled date ticks offset in the savagame.
2 years ago
Jonathan G Rennison
f4d775cad3
Change _scaled_tick_counter to uint64
2 years ago
Jonathan G Rennison
0818ce4ae7
Merge branch 'master' into jgrpp (SLV_U64_TICK_COUNTER)
...
# Conflicts:
# src/date.cpp
# src/date_func.h
# src/newgrf.cpp
# src/newgrf_animation_base.h
# src/saveload/gamelog_sl.cpp
# src/saveload/misc_sl.cpp
# src/saveload/saveload.h
# src/stdafx.h
2 years ago
dP
548f0496a9
Change: Make _tick_counter 64bit to avoid wrapping ( #10035 )
2 years ago
Jonathan G Rennison
1084bb8566
Initial support for NewGRF road stops (bus and lorry stops)
3 years ago
Jonathan G Rennison
583663bca1
Allow setting autosave interval to a custom number of days
3 years ago
nchappe
2cb6351af5
Fix: Update last servicing dates when using the date cheat ( #9694 )
3 years ago
Jonathan G Rennison
158608442c
Merge pull request #281 from VacuumBreather/train_speed_adaptation
...
# Conflicts:
# src/saveload/extended_ver_sl.cpp
# src/saveload/extended_ver_sl.h
3 years ago
Jonathan G Rennison
28e39c9045
Fix trailing whitespace
3 years ago
Andreas Schmitt
9b1783809d
Add station cargo history
3 years ago
Andreas Schmitt
669770f209
Fix a few issues and reset everything on start of new game
3 years ago
Jonathan G Rennison
e6a858c0dc
Fix date cheat/scenario load not adjusting vehicle date of last service
3 years ago
Jonathan G Rennison
2e20da40ed
Cache current value of snow line height
4 years ago
Jonathan G Rennison
e95216b59d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/core/geometry_func.cpp
# src/date.cpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/object_gui.cpp
# src/openttd.cpp
# src/settings_type.h
# src/video/allegro_v.cpp
# src/video/dedicated_v.cpp
# src/video/null_v.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
4 years ago
Jonathan G Rennison
15b99f2e7a
Fix: Whole status bar instead of money widget refreshed on money change ( #8692 )
...
This could result in the rest of the status bar being
redrawn unnecessarily frequently
4 years ago