Commit Graph

50 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 91d83335c7 Add helper to get timetable absolute display unit size 3 months ago
Jonathan G Rennison 33cbfc3e76 Cache current ticks per calendar day 3 months ago
Jonathan G Rennison 91b3e9c1ab Initial support for relative timetabling in wallclock mode 3 months ago
Jonathan G Rennison 675b31887a Saveload: Fix recalculation of _state_ticks
For XSLFI_VARIABLE_DAY_LENGTH versions 1 to 3
3 months ago
Jonathan G Rennison edbbaeb5d9 Add ScaledTickCounter type 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
Jonathan G Rennison 9aa8059c79 Include elapsed state ticks since load in crash/failure logs
Consolidate game load date/time variables
3 months ago
Jonathan G Rennison d456f4a3a5 Replace DATE_UNIT_SIZE macro with a function 3 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
3 months ago
Jonathan G Rennison 0ea57528c9 Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
3 months ago
Jonathan G Rennison 16b840d86e Increase DateTicks to 64 bits, fix overflow after year 79455 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 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
4 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
5 months ago
Jonathan G Rennison 4689113553 Debug: De-duplicate formatting of hex dates for desync/random logging 5 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
5 months ago
Jonathan G Rennison e9599fd4be Scheduled dispatch: Remove scheduled_dispatch_start_full_date_fract
Use DateTicksScaled
5 months ago
Jonathan G Rennison c76a5ed638 Timetable: Remove timetable_start_subticks, use DateTicksScaled 5 months ago
Jonathan G Rennison fc1c47cbd2 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/crashlog.h
#	src/date_type.h
#	src/depot_type.h
#	src/landscape.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/script/api/script_infrastructure.cpp
#	src/stdafx.h
#	src/table/settings/gui_settings.ini
#	src/table/settings/pathfinding_settings.ini
#	src/tests/CMakeLists.txt
6 months 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
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.
1 year ago
Jonathan G Rennison f4d775cad3 Change _scaled_tick_counter to uint64 1 year 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 53f9fa139d Remove redundant year/month date globals 4 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 1d5ba98932 Show time and in game date of game load in desync/crash logs 5 years ago
keldorkatarn 4955996b35 Remove costly recalculation of a date format we already have.
(cherry picked from commit 6aca18d18252f1c2f6d4a215999b7d7afb7df813)

See #36
6 years ago
Jonathan G Rennison e54a7189fd Add debug command line switch to quit after fixed number of days 6 years ago
Jonathan G Rennison 375b069f82 Replace day length scaled tick macros with global variables.
This is to avoid needing to expensively re-calculate them all the time.
Instead update them by incrementing.
8 years ago
Jonathan G Rennison 9565e5b9b1 Merge branch 'day_length-sx' into jgrpp
Conflicts:
	src/lang/english.txt
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/timetable_cmd.cpp
9 years ago
patch-import d86a56cbef Import day length patch
Minor whitespace fixes.

http://www.tt-forums.net/viewtopic.php?p=1148227#p1148227
9 years ago
patch-import 79138de1b9 Import departure boards patch 9 years ago
rubidium 9fc2798baf (svn r22411) -Document: another bunch of bits 13 years ago
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 13 years ago
rubidium 0318ddc279 (svn r20591) -Codechange: make sure _date_fract is set when SetDate is called. Some places wouldn't reset _date_fract correctly at all 14 years ago
rubidium 56a263070f (svn r20591) -Codechange: make sure _date_fract is set when SetDate is called. Some places wouldn't reset _date_fract correctly at all 14 years ago
rubidium 6ef7b78c8b (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 14 years ago
rubidium 644deff9d2 (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 14 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
frosch aadd3b29af (svn r13594) -Feature(ette)[FS#2093]: Supply newgrfs with 'day of month', 'leap year' and 'day of year'. 16 years ago
frosch 4236dd3be5 (svn r13594) -Feature(ette)[FS#2093]: Supply newgrfs with 'day of month', 'leap year' and 'day of year'. 16 years ago
rubidium db73addb43 (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago