1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00
Commit Graph

31564 Commits

Author SHA1 Message Date
Rubidium
883d3e7a9f Codechange: use std::span instead of pointer + length 2024-04-09 10:11:50 +02:00
54be756aae Codechange: Pass NewGRF strings as std::string_view instead of char *. (#12461) 2024-04-09 08:40:27 +01:00
dc7c2bb30d Fix: Draw continuation lines for engine variant hierarchy tree. (#12434) 2024-04-09 08:35:12 +01:00
de4e00c93f Codechange: Pass by reference to UpdateWidgetSize. (#12457)
These parameters are always provided and not optional.
2024-04-09 08:34:45 +01:00
translators
b5ad28022d Update: Translations from eints
english (au): 5 changes by krysclarke
chinese (simplified): 1 change by WenSimEHRP
catalan: 7 changes by J0anJosep
portuguese (brazilian): 27 changes by pasantoro
2024-04-09 04:40:33 +00:00
1b127628cb Codechange: Use dynamic_cast with FindWindowById. (#12458)
Missed from 74e09ab.
2024-04-08 22:32:57 +01:00
7e28605830 Fix: Use reinterpret_cast instead of C-style cast to align pointers. 2024-04-08 18:21:42 +01:00
4daf95b878 Fix: Use static_cast instead of C-cast to avoid hidden errors. 2024-04-08 18:21:42 +01:00
cdfffb551c Fix: sym->sym accidentally changed to sym prevented keys working with SDL. 2024-04-08 18:21:42 +01:00
74e09abf76 Codechange: Use dynamic_cast instead of C-cast after FindWindowById. (#12448)
dynamic_cast was used in most places, but not all.
2024-04-08 13:26:19 +01:00
Rubidium
4e6d4fcf32 Codechange: replace for loops with endof with range-based for loops 2024-04-08 07:00:55 +02:00
translators
095bdf32fe Update: Translations from eints
greek: 5 changes by gh658804
finnish: 7 changes by hpiirai
ukrainian: 56 changes by Quantom2, 14 changes by imlystyi
latvian: 14 changes by lexuslatvia
portuguese: 14 changes by azulcosta
portuguese (brazilian): 10 changes by pasantoro
polish: 5 changes by pAter-exe
2024-04-08 04:41:24 +00:00
Rubidium
62f5c595f3 Codechange: use range-based for loops and let count be correct count 2024-04-07 23:08:33 +02:00
rubidium42
4718971ccc Codechange: use std::size instead of lengthof for town names 2024-04-07 23:08:07 +02:00
995fca58a2 Codechange: Use begin/end instead of endof for some industry arrays. (#12447) 2024-04-07 22:01:46 +01:00
Rubidium
d7fa614a9d Codechange: use range-based for loop for debug levels and fix global variable naming 2024-04-07 22:17:57 +02:00
Rubidium
1fcf1a136d Codechange: use single function returning std::span over two functions that return size and begin 2024-04-07 22:02:16 +02:00
translators
0f6bf90731 Update: Translations from eints 2024-04-07 04:41:19 +00:00
eb094a953c Codefix: Social Plugins widget parts were not constexpr. (#12443)
Widget lists were made constexpr except these.
2024-04-06 22:32:26 +00:00
34ba969c74 Change: Display more useful information in sprite aligner than sprite ID. (#12439)
Sprite IDs are not useful information given they change don't refer to anything outside the loaded game.

Instead, include the filename and nfo line at minimum, and include action A or action 5 sprite replacement information if applicable.
2024-04-06 21:16:02 +01:00
fbdf26800b Codechange: Use std::initializer_list and range-for for credits window. (#12431)
Replaces C-style array, indexed looping, and char * strings.
2024-04-06 19:30:23 +01:00
a4c2f0778a Codechange: Use range-for to iterate keycode-to-name lookups. (#12429)
Replaces C-style looping.
2024-04-06 19:30:01 +01:00
b905209421 Fix: Viewport signs assume small font is smaller than normal font. (#12422)
If the small font is set to a larger size than the normal font for some reason, viewport signs would be drawn incorrect as the area marked dirty only considered the normal size font.
2024-04-06 19:29:41 +01:00
830c9e2de8 Codechange: Simplify iteration of framerate performance elements. 2024-04-06 19:28:51 +01:00
Rubidium
97bea563d7 Codechange: let lengthof fail when anything that isn't a C-style array is passed 2024-04-06 07:21:31 +02:00
Rubidium
c544a2be0a Fix: do not use lengthof() for non C-style arrays 2024-04-06 07:21:31 +02:00
translators
eaafc57de6 Update: Translations from eints
swedish: 6 changes by joeax910
norwegian (bokmal): 2 changes by eriksorngard
chinese (simplified): 2 changes by WenSimEHRP
dutch: 2 changes by Afoklala
2024-04-06 04:41:24 +00:00
8e881471c1 Codechange: Pass replacement blitter name as string_view instead char *. 2024-04-05 23:23:33 +01:00
6771dbe62b Codechange: Use range-for to find replacement blitter. 2024-04-05 23:23:33 +01:00
a866166673 Codechange: Use initializer_list and range-for for OpenTTD title. (#12430)
Replaces C-style array and looping.
2024-04-05 21:52:50 +01:00
2cc700d606 Codechange: Replace colour_dropdown array with StringID arithmetic. (#12426)
This assumes that the string colours are in order, but that is already assumed elsewhere.

Removes old C-style array access.
2024-04-05 21:51:36 +01:00
83da886093 Fix: Aircraft crash counter was too low to reach ground. (#12425)
Aircraft can float above the ground when crashed as the counter limit to reach the ground is too low.

Instead reset the counter until the aircraft reaches the ground, then continue the timer.
2024-04-05 19:16:22 +01:00
e8c78df39e Fix #12233: Mini order list overlaps vehicle group name. (#12423)
Move mini order list down one line to make room.
2024-04-05 08:18:12 +01:00
d11622b9a0 Fix #12114: Viewport coords of crashed aircraft not updated when falling. (#12424)
This results in the aircraft glitching as the wrong viewport area is drawn.
2024-04-05 08:17:42 +01:00
translators
df3e5ade11 Update: Translations from eints
korean: 2 changes by telk5093
portuguese (brazilian): 1 change by pasantoro
2024-04-05 04:43:25 +00:00
7572cfd103 Codechange: Redefine ZOOM_LVL so that ZOOM_LVL_NORMAL is 1x zoom.
This matches expectations of what normal zoom means.
2024-04-04 22:27:03 +01:00
9854553e10 Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.
Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
2024-04-04 22:27:03 +01:00
3c94e81665 Codechange: Use ZOOM_LVL_MIN to refer to first zoom level.
Many uses of ZOOM_LVL_NORMAL actually just want the first zoom level slot, so use ZOOM_LVL_MIN to make this clearer.
2024-04-04 22:27:03 +01:00
7c322ebcf1 Codechange: Define a ZOOM_LVL for minimum text effect visibility. 2024-04-04 22:27:03 +01:00
197fb00d31 Fix #12395: Ensure president name widget is tall enough. (#12419) 2024-04-04 17:56:16 +01:00
338def1b06 Fix: Segfault when using -q without providing a . character. (#12418)
Use std::filesystem::path to find extension instead of strrchr.
2024-04-04 14:39:15 +01:00
f6a88e40a4 Codechange: Use std::list for News Items. (#12338) 2024-04-04 07:53:14 +01:00
translators
08cf106fc6 Update: Translations from eints
english (us): 2 changes by 2TallTyler
finnish: 2 changes by hpiirai
ukrainian: 2 changes by Quantom2
danish: 2 changes by beruic
portuguese (brazilian): 22 changes by pasantoro
2024-04-04 04:41:30 +00:00
Loïc Guilloux
243c6bead3 Fix #12415, 9c49a61, df400ef: Aircraft::tile is valid only for front vehicle (#12416) 2024-04-03 23:16:36 +02:00
translators
931aa39018 Update: Translations from eints
english (au): 2 changes by krysclarke
swedish: 2 changes by joeax910
greek: 2 changes by gh658804
russian: 3 changes by its5Q
catalan: 2 changes by J0anJosep
spanish: 2 changes by MontyMontana
portuguese: 2 changes by azulcosta
portuguese (brazilian): 27 changes by pasantoro
polish: 2 changes by pAter-exe
2024-04-03 04:40:31 +00:00
9750826590 Fix a29766d: Wrong scrolling dropdown list position with RTL. (#12412) 2024-04-02 13:29:15 +01:00
translators
72b5c6a591 Update: Translations from eints
vietnamese: 1 change by KhoiCanDev
greek: 83 changes by gh658804
german: 3 changes by Wuzzy2
ukrainian: 54 changes by Quantom2
spanish: 4 changes by MontyMontana
portuguese (brazilian): 2 changes by pasantoro
2024-04-02 04:41:36 +00:00
2047c27445 Codechange: Move drop down list item definitions to separate header.
This reduces the scope of the definitions which are no longer needed to create the common lists.
2024-04-01 22:33:16 +01:00
56cac21086 Codechange: Use functions to create common drop down list items. 2024-04-01 22:33:16 +01:00
Loïc Guilloux
11aa3694fa Fix: [Win32] Force font mapper to only use TrueType fonts (#12406) 2024-04-01 22:59:13 +02:00