Peter Nelson
48539992e8
Codechange: Use std::unordered_map for storing TrueTypeFontCache's GlyphEntry.
2024-05-30 20:16:28 +01:00
Peter Nelson
7b717fcccb
Codechange: Replace AllocatorProc with SpriteAllocator class.
...
This allows for state to be passed to or maintained by the allocator.
2024-05-30 20:16:28 +01:00
Peter Nelson
de16655f76
Change: [UI] Remove substitution of missing glyph with '?' glyph. ( #12736 )
...
When a glyph does not exist, we substitute it with the '?' glyph instead, but layouters are not aware of this substitution.
2024-05-30 18:33:58 +01:00
Peter Nelson
9c19cf06e4
Change: [UI] Use SetMinimalTextLines to set label height correctly. ( #12734 )
...
SetMinimalSize does not know about font size, so these labels were incorrectly sized if the font height is different from normal.
2024-05-30 12:31:21 +01:00
Peter Nelson
0f230244fe
Codechange: [UI] Remove redundant SetMinimalSize for WWT_EDITBOX widgets. ( #12733 )
2024-05-30 08:34:26 +01:00
Tyler Trahan
deb77463b0
Fix #12492 : Clarify helptext for "minutes per year" setting ( #12726 )
2024-05-29 14:58:36 -04:00
Jonathan G Rennison
85918fc23e
Fix: Water infrastructure total when changing owner of object on water
2024-05-29 20:11:43 +02:00
Peter Nelson
2e7819927f
Fix: Invalidate game options window after changing base sounds set. ( #12731 )
2024-05-29 17:05:04 +01:00
translators
51e170a8d0
Update: Translations from eints
...
swedish: 12 changes by sereneavatar
2024-05-29 04:42:57 +00:00
Peter Nelson
f220ed179d
Codechange: Use std::unordered_map for SpriteFontCache's glyph map. ( #12724 )
...
Replaces a C-style malloc'd array and malloc'd contents, and no manual memory clean up is necessary.
2024-05-28 19:34:03 +01:00
Peter Nelson
3d4b98845a
Codechange: Remove initial colour from layouter cache. ( #12728 )
...
Initial colour is now always TC_INVALID, which is substituted with the desired colour when drawing the layout line.
This allows strings which differ only by initial colour to use the same layout cache entry, increasing the efficacy of the cache.
2024-05-28 19:33:44 +01:00
translators
605dff4920
Update: Translations from eints
...
swedish: 9 changes by joeax910
english (us): 2 changes by 2TallTyler
luxembourgish: 4 changes by phreeze83
catalan: 2 changes by J0anJosep
latvian: 27 changes by lexuslatvia
2024-05-28 04:45:37 +00:00
Tyler Trahan
37f68a65ee
Fix #12283 : Vehicle group dropdown shouldn't have default action ( #12727 )
2024-05-27 16:26:07 -04:00
Peter Nelson
f6c5da4cad
Fix: Incorrect dump_info output with labels outside of ascii range. ( #12723 )
...
An unspecified cargo label is 0x00000000, which terminates C-strings.
2024-05-27 12:44:49 +01:00
Peter Nelson
4b81b62b72
Change: Don't reinitialise font caches when setting initial interface scale. ( #12722 )
2024-05-27 12:44:34 +01:00
translators
692943669d
Update: Translations from eints
...
galician: 34 changes by pvillaverde
greek: 3 changes by gh658804
2024-05-27 04:41:33 +00:00
Peter Nelson
517dab35b1
Codechange: Use range-for to iterate base media files. ( #12721 )
2024-05-26 16:46:18 +01:00
Peter Nelson
3c42f701d7
Fix: Allow changing size of default OpenTTD font. ( #12641 )
...
* Fix: Allow changing size of default OpenTTD font.
Size configuration for default font was ignored as a different code path to load the font was followed.
Resolved by removing this additional path and conditionally selecting the default font.
2024-05-26 15:59:25 +01:00
Peter Nelson
2c70ccb137
Add: [NewGRF] Extended custom waypoint classes. ( #12653 )
...
This allows waypoints to be split into categories just like stations, instead of all being lumped together.
Station class labels with the first byte set to 0xFF will be treated in the same way as the 'WAYP' class.
2024-05-26 09:53:33 +01:00
translators
d11823df36
Update: Translations from eints
...
korean: 2 changes by telk5093
2024-05-26 04:42:20 +00:00
Koen Bussemaker
6efc1fa250
Codechange: Removed unused yapf PfNodeCachFlush function
2024-05-25 21:49:12 +02:00
translators
c325a2ebd4
Update: Translations from eints
...
estonian: 3 changes by siimsoni
dutch: 2 changes by Afoklala
french: 2 changes by ben20471
portuguese: 2 changes by azulcosta
2024-05-25 04:42:07 +00:00
Peter Nelson
676d64037d
Fix d6ccfdb
: GetCharPosition failed for RTL text. ( #12710 )
...
Changes in d6ccfdb
assumed that character indexes only incremented, which is not true for RTL text.
2024-05-24 15:33:30 +01:00
translators
d9cadb49b0
Update: Translations from eints
...
english (au): 2 changes by krysclarke
chinese (simplified): 7 changes by WenSimEHRP
korean: 4 changes by telk5093
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
portuguese (brazilian): 2 changes by pasantoro
2024-05-24 04:43:08 +00:00
Peter Nelson
5fefe0b61f
Fix: Reverse left/right keypress when editing RTL text. ( #12711 )
...
When editing RTL text, pressing left should increment instead of decrement the character position to move left, and vice versa.
2024-05-23 21:34:05 +01:00
Peter Nelson
f87c6990b0
Fix: Memory leak in CoreTextFontCache. ( #12662 )
...
Temporary buffer for rendering glyphs was not freed after use. Instead let CGBitmapContextCreate() handle the buffer.
> data may be a pointer to pixels. If you pass NULL, the context will create its own buffer and free that buffer itself later. If you pass your own buffer, the context will not free it; it remains your buffer that you must free after you release the context, hopefully for the last time.
2024-05-23 21:07:11 +01:00
yeah-its-gloria
071796660d
Fix: Implement support for secure state coding on macOS
...
Fixes a warning when running on macOS 14 and newer about not officially supporting secure state coding.
2024-05-23 19:32:29 +02:00
Jonathan G Rennison
b2572c7ca8
Fix #12563 : Race condition setting finish flag in WinHTTP
2024-05-23 19:31:45 +02:00
translators
9f13d3ff2b
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
greek: 11 changes by gh658804
2024-05-23 04:40:46 +00:00
Tyler Trahan
8f6e21617f
Fix #12591 : Give descriptive error when station construction fails due to wrong layout ( #12678 )
2024-05-22 17:56:03 -04:00
Rubidium
b2f1a06def
Change: support listing/updating authorized keys of companies by the admin in the console
2024-05-22 22:20:10 +02:00
Rubidium
fea9ffa808
Codechange: also allow removing clients from the company allow lists
2024-05-22 22:20:10 +02:00
Peter Nelson
8a6745b26f
Codechange: Use PIP instead of spacer widgets for OSK spacing. ( #12709 )
...
This (slightly) simplifies the OSK widget layout.
2024-05-22 19:06:52 +01:00
Peter Nelson
766350bfd2
Fix: Hide empty house 'classes' in house picker. ( #12694 )
...
Picker class list should not list classes with no items. The house picker could break this 'rule' with NewGRFs loaded.
2024-05-22 18:06:59 +01:00
Peter Nelson
7e12b5ff0f
Fix: Crash if interface scale or font size changes with chat box present. ( #12705 )
...
Caused by the chat box being undrawn with the new dimensions, leading to out-of-bounding memory access.
2024-05-22 18:06:34 +01:00
Jonathan G Rennison
42fc32243d
Fix #12681 : Abstract filetype not set for network client join savegames ( #12701 )
2024-05-22 09:43:01 +01:00
Peter Nelson
19ca4089a1
Codechange: Use std::filesystem::exists instead of access. ( #12702 )
2024-05-22 09:23:01 +01:00
translators
5bc3723bcc
Update: Translations from eints
...
czech: 11 changes by vladoschreiner
2024-05-22 04:42:40 +00:00
Peter Nelson
5442b0dd2d
Fix: Make progress bars obey language direction. ( #12704 )
...
With RTL languages, progress bars should start from the right.
2024-05-21 00:40:08 +01:00
Peter Nelson
28e814f62a
Codechange: Use L"" instead of _T("") ( #12703 )
2024-05-20 17:34:22 +00:00
translators
fb4a370d3f
Update: Translations from eints
...
vietnamese: 13 changes by KhoiCanDev
chinese (simplified): 1 change by WenSimEHRP
finnish: 11 changes by hpiirai
french: 29 changes by ottdfevr
polish: 1 change by aefoes
2024-05-20 04:43:22 +00:00
translators
46d7586ab1
Update: Translations from eints
...
estonian: 8 changes by siimsoni
chinese (simplified): 4 changes by ahyangyi
korean: 13 changes by telk5093
2024-05-19 04:43:16 +00:00
Loïc Guilloux
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
2024-05-18 17:04:16 +02:00
Peter Nelson
ba47d1ca2b
Fix: Allow resolving house parent scope (town) of unbuilt houses. ( #12695 )
...
Return unavailable variable result, instead of nullptr dereference.
2024-05-18 12:33:50 +01:00
Peter Nelson
3f5a354f37
Codechange: Use emplace with ICURun and UniscribeRun. ( #12693 )
2024-05-18 09:17:38 +01:00
Peter Nelson
856ec901ca
Fix #12685 : nullptr dereference when checking for equal loaded/loading groups. ( #12686 )
...
Always treat empty groups as non-equal. Given that the case of both being empty is handled earlier, they cannot both be equal and empty.
Additionally if a loaded or loading set are all the same, only add one reference.
2024-05-18 09:17:06 +01:00
translators
7fd2487c46
Update: Translations from eints
...
swedish: 6 changes by joeax910
chinese (simplified): 2 changes by WenSimEHRP
dutch: 27 changes by Afoklala
2024-05-18 04:40:26 +00:00
Peter Nelson
8d26d032e1
Fix #12497 : [NewGRF] Increase vehicle motion counter for all parts. ( #12561 )
...
NewGRFs relied on the incorrectly motion counter that was 'fixed' in #12229 , so always update v->motion_counter for all vehicle parts.
2024-05-17 20:50:04 +01:00
Peter Nelson
c85481564f
Codechange: Use reusable temporary buffer in Win32FontCache. ( #12666 )
...
This avoids allocating and deleting a temporary buffer for every glyph that is rendered into a sprite.
2024-05-17 08:50:59 +01:00
Peter Nelson
4940b6ff0b
Codefix: Compile warning with newer C++ compiler on MinGW. ( #12689 )
...
> template-id not allowed for constructor in C++20
2024-05-16 12:09:19 +01:00
translators
26113e3622
Update: Translations from eints
...
english (au): 11 changes by krysclarke
swedish: 7 changes by joeax910
english (us): 11 changes by 2TallTyler
chinese (simplified): 11 changes by WenSimEHRP
russian: 11 changes by Ln-Wolf
catalan: 11 changes by J0anJosep
portuguese: 13 changes by azulcosta
portuguese (brazilian): 11 changes by pasantoro
2024-05-16 04:41:07 +00:00
Peter Nelson
ca52da6c95
Fix: Unable to choose a font containing hyphen. ( #12684 )
...
FcNameParse may require some characters be escaped. Instead, pass name as FC_FAMILY.
2024-05-16 00:38:23 +01:00
Peter Nelson
d1b7619822
Change: Ignore min/max years for manual house placer. ( #12687 )
2024-05-15 23:17:58 +01:00
translators
56ea002283
Update: Translations from eints
...
catalan: 16 changes by J0anJosep
latvian: 2 changes by lexuslatvia
2024-05-15 04:41:37 +00:00
Peter Nelson
980dcaac6e
Cleanup: Remove GetFontTable from FontCache. ( #12677 )
...
This interface is no longer used, so does not need to be implemented.
Removes manual memory management with malloc/free.
2024-05-14 21:13:26 +01:00
Peter Nelson
ed67aedabf
Feature: Allow manually placing town buildings in scenario editor.
...
House picker is accessed from the Landscaping toolbar as there is no town toolbar.
Once placed these houses behave like any other and can be removed by players and towns.
Uses the unified picker system, so also supports used/saved favourites. As town building don't have class labels, town zones are use to imitate them.
2024-05-14 21:11:48 +01:00
Peter Nelson
874cfe000b
Codechange: Set underlying type for HouseSpec enums.
2024-05-14 21:11:48 +01:00
Peter Nelson
b731ab0632
Change: Allow sprite resolver to evaluate non-existent houses.
...
This could previous be done but only with a town and tile in mind, but for drawing in the UI, neither of those exist yet.
2024-05-14 21:11:48 +01:00
Peter Nelson
d99c1337a2
Add: Command to build an individual house on a specific tile.
2024-05-14 21:11:48 +01:00
Peter Nelson
f901722066
Codechange: Rename BuildTownHouse to TryBuildTownHouse.
2024-05-14 21:11:48 +01:00
Tyler Trahan
bb77d16e40
Add: Shade button to waypoint picker ( #12682 )
2024-05-14 14:43:56 -04:00
Muxy
486af1a6fc
Fix: [Admin] #12411 Send Network Welcome Packet to admin port after game creation completed
...
WelcomeAll moved into NetworkOnGameStart
Signed-off-by: Muxy <muxy@goulp.net>
2024-05-14 19:24:31 +02:00
Peter Nelson
460fab920c
Fix #12418 , 338def1b06
: Filename extension taken from wrong string. ( #12680 )
2024-05-14 18:18:30 +01:00
Rubidium
00c4b232b3
Fix #12550 : files were not saved in the right location when binary and configuration are in the same folder
2024-05-14 17:01:28 +02:00
translators
3f06aa441b
Update: Translations from eints
...
english (us): 17 changes by 2TallTyler
greek: 147 changes by KyriakosMich
2024-05-14 04:40:19 +00:00
Tyler Trahan
9f63b9f65d
Fix #12594 : Give descriptive error when company takeover fails due to vehicle limit ( #12676 )
2024-05-13 10:10:03 -04:00
translators
870149406a
Update: Translations from eints
...
chinese (simplified): 23 changes by WenSimEHRP
russian: 17 changes by Ln-Wolf
portuguese (brazilian): 8 changes by pasantoro
2024-05-13 04:41:24 +00:00
Peter Nelson
18e56df5e1
Fix #12674 : Non-NewGRF Build Station widgets may not fill window properly. ( #12675 )
...
Allow labels in Build Station window to fill width as needed.
2024-05-13 00:18:07 +00:00
Peter Nelson
f2f7573c3f
Fix #12668 : Crash opening picker window with filter when no results available. ( #12669 )
...
When first opening the picker window, we attempt to find a valid class and type to select. If the picker window was closed with filters enabled, there may not be anything list that is usable.
Resolve this by using callbacks to find the first usable type when no types are listed.
2024-05-12 20:14:29 +01:00
Rubidium
77c188e6da
Codechange: use std::vector instead of malloced array
2024-05-12 12:55:52 +02:00
Rubidium
6cea49c117
Codechange: replace uint with size_t in binary heap
2024-05-12 12:55:52 +02:00
Rubidium
8349203038
Cleanup: remove unused Aystar variables
2024-05-12 10:46:03 +02:00
Peter Nelson
77a7113ba6
Cleanup: Remove unused parameters from FreeTypeFontCache::SetFontSize. ( #12663 )
2024-05-12 08:39:40 +01:00
Rubidium
f939e81bf0
Fix #12655 , 4f6d75f
: inconsistent state in client list and potential crash after client leaves
2024-05-12 07:23:40 +02:00
translators
95a89e43b2
Update: Translations from eints
...
english (au): 16 changes by krysclarke
chinese (simplified): 16 changes by XiaoJi-Game
korean: 19 changes by telk5093
russian: 1 change by Ln-Wolf
finnish: 16 changes by hpiirai
lithuanian: 1 change by khamper
portuguese: 17 changes by azulcosta
portuguese (brazilian): 16 changes by pasantoro
2024-05-12 04:41:31 +00:00
Peter Nelson
34da94ffc8
Fix: Use widget resize step instead of window resize step. ( #12659 )
...
Build Picker class list filter could be drawn incorrectly depending on how the window can be resized.
2024-05-11 20:51:44 +01:00
Peter Nelson
d78f39a9df
Cleanup: Remove GetUnitsPerEM and units_per_em. ( #12656 )
...
GetUnitsPerEM is never called.
2024-05-11 14:50:34 +01:00
translators
721cd2b8ad
Update: Translations from eints
...
ukrainian: 1 change by Quantom2
dutch: 5 changes by Afoklala
lithuanian: 1 change by khamper
2024-05-11 04:41:26 +00:00
Peter Nelson
b30fe0d7da
Feature: Ctrl-click to toggle favourites in build-pickers.
...
This allows ctrl-click on a type in a build-picker window to remember it
as a favourite. An new filter button to show only favourites makes it
simpler to use these types.
Favourite types are saved locally in favs.cfg, so are remembered between
games.
2024-05-11 02:12:41 +01:00
Peter Nelson
fde3b35a24
Feature: New filter to show only used types in build-pickers.
...
This filters the build-picker type lists to only show types that have
already been placed in the current game, making it simpler to get to
build matching features.
2024-05-11 02:12:41 +01:00
Peter Nelson
b76517816e
Feature: Add "All" filter to build-picker show types from all classes.
...
Toggling the "All" filter causes the class selection to be ignored, so
that items from all classes can be displayed together. The class text
filter is still applied.
This makes it easier to search amongst types for a feature.
2024-05-11 02:12:41 +01:00
Peter Nelson
cdc356e7bf
Change: Unify station/waypoint/roadstop/object build-picker window code.
...
These windows now share a common code base for choosing and display class and types.
An additional text filter is added to search types by name instead of just classes.
2024-05-11 02:12:41 +01:00
Peter Nelson
d2c8b476b5
Codechange: Add functions to test if a station/roadstop class is a waypoint.
...
This is now checked by class label instead of by index.
2024-05-11 02:12:41 +01:00
Peter Nelson
9f8c9724be
Codechange: Add station/roadstop class labels for DFLT/WAYP.
...
This avoids repeating the same multichar literal value.
2024-05-11 02:12:41 +01:00
Peter Nelson
d5671030b1
Codechange: Add NewGRFSpecsBase class to hold class/index information.
...
Standardises how the class index is stored in the spec, instead of relying ot the Spec structs having the same members.
This allows retrieving class_index and index without searching or using pointer arithmetic.
'cls_id' is renamed to 'class_index' to make it clearer that it is an index rather than the multichar label of the class.
2024-05-11 02:12:41 +01:00
Peter Nelson
733284cc16
Codechange: Return std::vector from GetMusicCatEntryData.
...
Return std::vector instead of pointer to array with manual memory management.
2024-05-11 02:10:41 +01:00
Peter Nelson
31c306c6cd
Codechange: Return std::string from GetMusicCatEntryName.
...
Return std::string instead of pointer to C-string with manual memory management.
2024-05-11 02:10:41 +01:00
frosch
dc22edc556
Doc: [Script] Extend API documentation on calendar- vs economy-time
2024-05-10 13:17:19 +01:00
frosch
04cc0c8125
Codechange: [Script] Document relation between ScriptErrorType and ErrorMessages enums
2024-05-10 13:17:19 +01:00
frosch
40e6230900
Codechange: Add main page to script API documentation
2024-05-10 13:17:19 +01:00
frosch
dfa2622153
Codechange: Unify naming of squirrel built-in types in Script API docs
2024-05-10 13:17:19 +01:00
frosch
e436e2ef40
Codefix: broken links and syntax issues in script API documentation
2024-05-10 13:17:19 +01:00
frosch
64e1f1d4d9
Codefix: Script API documentation about IDs was incomplete
2024-05-10 13:17:19 +01:00
frosch
4bf2dc3148
Codefix: Script API did not link simple types correctly
2024-05-10 13:17:19 +01:00
frosch
c1375cecf8
Codefix: [Script] script_types was excluded from API documentation
2024-05-10 13:17:19 +01:00
frosch
ffe76a0133
Update: Doxyfiles to doxygen 1.9.4
2024-05-10 13:17:19 +01:00
merni-ns
c3ee5e58a3
Cleanup: Move remaining NPF files into pathfinder directory
2024-05-10 10:38:44 +02:00
merni-ns
798ec4184b
Cleanup: Remove unused function InvalidateShipPathCache
...
This was only used in the callback when changing the ship pathfinder setting.
2024-05-10 10:38:44 +02:00
merni-ns
55a7c59d13
Remove: NPF and pathfinder change settings
2024-05-10 10:38:44 +02:00
translators
a5c2543efc
Update: Translations from eints
...
chinese (simplified): 7 changes by WenSimEHRP, 4 changes by ahyangyi
2024-05-10 04:40:29 +00:00