Commit Graph

965 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Jonathan G Rennison d90c540f9e Enable economy day length scaling in wallclock timekeeping mode 2 weeks ago
Jonathan G Rennison 0008e7d769 Fix velocity unit names used in cargo payments graph window 2 months ago
Jonathan G Rennison 6e689c2b93 Fix tiles/day speed unit in wallclock mode 2 months ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison 45b6079899 Add string code for absolute timetable time 3 months ago
Jonathan G Rennison 91b3e9c1ab Initial support for relative timetabling in wallclock mode 3 months ago
Rubidium 4c117dd2d8 Revert #11993: new number format system does not and cannot work for CJK languages
There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.

This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
3 months ago
Rubidium 5d2e6e4efa Fix #12148, fca8166: Do not draw decimals when number of digits is 0 3 months ago
Rubidium 360fe8b0b6 Fix a253205: division by zero when attempting to format some short currencies 3 months ago
Rubidium 7e2eefb91f Cleanup: Remove digit group separators from strgen and languages 3 months ago
Rubidium b741b2ba6f Feature: Fully user configurable number format and abbreviations 3 months ago
Rubidium 609d0071d5 Change: Remove saving of digit group and decimal separator configurations from the savegame 3 months ago
Rubidium 9f8fd80112 Feature: Fully customisable number abbreviations per translation 3 months ago
Rubidium a253205b93 Feature: Fully customisable number format per translation 3 months ago
Rubidium 819c6c756e Codechange: Add support for number format and abbreviations pragmas/attributes to strgen 3 months ago
Rubidium fca8166087 Codechange: Simplify FormatNumber by moving out zero fill and decimal support 3 months ago
Rubidium a44bd81280 Codechange: Move determining the decimal separator to a separate function 3 months ago
Jonathan G Rennison 838b166726 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_base.h
#	src/debug.cpp
#	src/debug.h
#	src/economy.cpp
#	src/engine_type.h
#	src/graph_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_cmd.h
#	src/network/core/os_abstraction.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings_type.h
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/tests/bitmath_func.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
3 months ago
Jonathan G Rennison b13b2781bd Add string codes for upstream wallclock mode, add upstream language changes 3 months ago
Jonathan G Rennison e98d9a1d1d Strings: Remove DATE_WALLCLOCK_* string codes, add TT_TIME 3 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
3 months ago
Jonathan G Rennison d456f4a3a5 Replace DATE_UNIT_SIZE macro with a function 3 months ago
Jonathan G Rennison 0ea57528c9 Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
3 months ago
Patric Stout f1842f9144
Add: {CURRENCY_SHORT} only did k / m suffix. Add bn / tn and make translatable. (#11921)
64bit numbers are REALLY large, but our compact method was build
for 32bit numbers. Extend it to 64bit.
4 months ago
frosch 28c83089f6 Codechange: Remove TKM string code. 4 months ago
Peter Nelson 009fea0e14 Fix: Memory leak in ICUParagraphLayout::NextLine() (#11895)
This function calls icu::BreakIterator::createLineInstance() but does not clean up after it.

Instead use a static instance that is cloned (for thread-safety) and deleted as necessary.

(cherry picked from commit 6d276698b6)
4 months ago
Peter Nelson 6d276698b6
Fix: Memory leak in ICUParagraphLayout::NextLine() (#11895)
This function calls icu::BreakIterator::createLineInstance() but does not clean up after it.

Instead use a static instance that is cloned (for thread-safety) and deleted as necessary.
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
Tyler Trahan fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units (#11341) 4 months ago
Rubidium ee00c7b159 Codechange: use TO_LE16 directly when reading language file offsets 4 months ago
Patric Stout fd073a2810 Remove: replace custom span with std::span 4 months ago
Jonathan G Rennison 3050620189 Merge branch 'master' into jgrpp
# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.cpp
#	src/economy.cpp
#	src/engine_gui.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/linkgraph/refresh.cpp
#	src/linkgraph/refresh.h
#	src/newgrf.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_func.h
#	src/order_gui.cpp
#	src/pathfinder/pathfinder_type.h
#	src/saveload/afterload.cpp
#	src/subsidy_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
4 months ago
Jonathan G Rennison 4b48d3b5fe
Fix: String gender scan with SCC_INDUSTRY_NAME (#11697) 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 f24388c0b2 Fix string gender scan with SCC_INDUSTRY_NAME 4 months ago
Jonathan G Rennison dcd71f5ab8 Strings: Exit early when scanning for gender data 4 months ago
Jonathan G Rennison 0460b820f3 Use std::string for LanguageMetadata::file 4 months ago
Jonathan G Rennison 0ab4b8ea31 Add helper functions to get last path segment 4 months ago
Jonathan G Rennison f034714559 Use StringBuilder for GetString/GetStringWithArgs, as per upstream
Update dependent code as required
4 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
4 months ago
Peter Nelson 7482f71692
Change: Don't handle 'missing' string parameters as 0. (#11673)
If not enough parameters are supplied for a string, then a value of 0 was used, which could result in incorrect information being displayed.

Instead, throw an exception and include an error in the string.
4 months ago
Jonathan G Rennison 5db9266f4b Change: Allow STRING/STRINGN to use all remaining parameters in game script mode 4 months ago
Jonathan G Rennison e2a79f0f32 Codechange: No longer advance parent offset in StringParameters parent mode
Add method to manually advance offset
4 months ago
Jonathan G Rennison 3611770138 Do not assert when STRINGN has insufficient parameters, output placeholder 5 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
Peter Nelson 33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. (#11637) 5 months ago
Jonathan G Rennison d5a7a67b8c Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	src/ai/ai_gui.cpp
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/32bpp_simple.cpp
#	src/blitter/32bpp_sse2.cpp
#	src/blitter/8bpp_optimized.cpp
#	src/blitter/8bpp_simple.cpp
#	src/blitter/null.cpp
#	src/blitter/null.hpp
#	src/company_gui.cpp
#	src/game/game_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/gfx_func.h
#	src/graph_gui.cpp
#	src/industry_gui.cpp
#	src/linkgraph/linkgraphjob.cpp
#	src/network/network_gui.cpp
#	src/newgrf_debug_gui.cpp
#	src/openttd.cpp
#	src/pathfinder/npf/aystar.h
#	src/road_gui.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_log.cpp
#	src/script/api/script_town.cpp
#	src/script/script_gui.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/sortlist_type.h
#	src/spritecache.cpp
#	src/spriteloader/grf.cpp
#	src/spriteloader/grf.hpp
#	src/spriteloader/spriteloader.hpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/station_gui.cpp
#	src/strings.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
#	src/window_gui.h
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