Peter Nelson
ae575a7a5b
Codechange: Store text run positions in vector of points.
...
This simplifies the interlaced vector of x/y positions.
2024-01-19 00:08:31 +00:00
Peter Nelson
f7cc88f370
Codechange: Return vector references instead of pointer to first item.
2024-01-19 00:08:31 +00:00
Michael Lutz
20f1a0dc57
Fix: [OSX] Spurious log message when a sprite glyph was layouted.
2024-01-14 22:50:56 +01:00
Michael Lutz
36cf6b1d13
Feature: Scalable OpenTTD TrueType font made by Zephyris.
...
This uses the normal variant for the small font, not the all-caps version.
2024-01-14 22:50:56 +01:00
Michael Lutz
6e766a2e81
Change: Allow TrueType fonts to provide our private-use glyphs.
2024-01-14 22:50:56 +01:00
Loïc Guilloux
93ba6d6776
Fix: compilation without precompiled headers ( #11770 )
2024-01-14 13:27:03 +01:00
Loïc Guilloux
03df70ce8a
Fix #11752 : [Win32] Wrong multi-line text layout due to incorrect partial run handling ( #11761 )
2024-01-12 19:40:08 +01:00
Patric Stout
d3ee045c2d
Codechange: refactor the Windows-only DllLoader in a cross-platform LibraryLoader ( #11751 )
2024-01-10 21:38:58 +00:00
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
2024-01-06 13:37:33 +01:00
Rubidium
e3f49ee7a0
Codechange: coding style fixes
2024-01-04 16:23:54 +01:00
Peter Nelson
b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. ( #11580 )
...
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.
This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
2023-12-20 20:38:21 +00:00
rubidium42
27082f9efa
Codechange: pass std::string references to OpenBrowser
2023-11-29 02:02:30 +01:00
Peter Nelson
1071acb483
Codechange: Redundant use of char * and c_str(). ( #11454 )
2023-11-10 00:17:36 +00:00
Peter Nelson
d4008850e3
Codechange: Ensure function opening `{` is on new line.
2023-11-09 20:15:38 +00:00
Michael Lutz
86e28e79fb
Fix #11402 : Make string filter locale-aware.
2023-11-03 22:34:01 +01:00
Rubidium
c6411168d8
Cleanup: missing spaces before continuation * in some comments
2023-11-01 22:56:11 +01:00
Rubidium
f16399f4c9
Codechange: replace x.size() > 0 with !x.empty()
2023-10-20 23:05:43 +02:00
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
2023-10-20 23:05:43 +02:00
Loïc Guilloux
0458c15060
Cleanup: [MacOS] Remove unneeded WITH_SDL checks ( #11360 )
2023-10-09 19:35:15 +02:00
frosch
55da426d44
Codechange: All ParagraphLayoutFactory::AppendToBuffer assume that the buffer has at least some space.
...
Assert on that.
2023-09-19 22:49:59 +02:00
frosch
5733145c59
Cleanup: Remove unneeded parameters.
2023-09-19 22:49:59 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
frosch
a3f661cb66
Fix: compilation failed on gcc 10.2 due to missing include. ( #11300 )
...
'_exit' is defined in 'unistd.h'.
2023-09-15 09:26:03 +01:00
Patric Stout
37e2f99c09
Change: store crash logs in JSON format ( #11232 )
2023-09-14 20:13:27 +02:00
Patric Stout
ba67f39db6
Codechange: vendor the nlohmann-json library ( #11290 )
2023-09-13 16:11:34 +02:00
Patric Stout
a3d631ffed
Change: make nlohmann a mandatory library to build OpenTTD ( #11235 )
2023-08-28 19:04:36 +02:00
Patric Stout
b0d7cfaa3d
Change: [Win32] don't allocate 192KiB of memory on the stack on crash ( #11240 )
...
Heap is out of the question, as it might be corrupted.
Allocating this much on stack is silly.
So instead, allocate virtual pages to write the information in.
2023-08-28 12:14:11 +02:00
Patric Stout
d4312c59a4
Codechange: [MacOS] use backtrace() instead of our custom variant ( #11233 )
...
As mentioned in the comment, we only did it ourselves as we once
were compatible with versions before 10.5. But that time has long
gone. So let's update the code to a bit more modern approach.
2023-08-27 22:32:11 +02:00
Patric Stout
b00e483b0f
Change: recover when possible from crashes during a crash ( #11238 )
2023-08-27 21:54:05 +02:00
Patric Stout
29a37c2e0b
Change: [Win32] unify the crashlog handler with the other OSes ( #11236 )
...
While at it, make the crash text a bit more readable, and sync
this with MacOS.
2023-08-27 17:58:31 +00:00
Patric Stout
45cc3acaf5
Codechange: [Win32] unify AppendDecodedStacktrace and LogStacktrace ( #11220 )
...
AppendDecodedStacktrace was already doing the same as LogStacktrace,
just with a different name.
2023-08-20 18:57:01 +00:00
Patric Stout
352ac264a5
Remove: [Win32] module-list from crash.log ( #11219 )
...
Only Windows implemented this, and it opens the files to read them
to get a CRC. Doing this in a crash-handler is strange at best.
Lastly, nobody has actually ever used this information to come to
some sort of conclusion. The module-list is used in combination
with the crash.dmp, but this information is already embedded in
there.
2023-08-20 17:09:21 +00:00
Patric Stout
f120d2beb8
Add: use breakpad to create crash.dmp on MacOS / Linux too ( #11202 )
...
Normally only the Windows platform could create a crash.dmp, making
analysing crash-reports from MacOS / Linux rather tricky.
2023-08-20 17:16:08 +02:00
Patric Stout
8f6df242c4
Remove: [Win32] (pointer-only) stack trace in crash.log ( #11211 )
...
It only contains pointers, which nobody can decipher anyway.
So instead, just report "Not supported", like other targets do
when they can't print a sane stack trace.
2023-08-20 17:08:16 +02:00
Patric Stout
a5aebeb1b5
Remove: [Win32] register values in crash.log ( #11212 )
2023-08-20 16:59:22 +02:00
Patric Stout
cd10ddf9ae
Remove: last remnants of SunOS ( #11210 )
...
We have no evidence SunOS has been tried in the last few years,
and the code is awkward enough to just remove.
2023-08-19 00:52:58 +02:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium
d5c75bd655
Codechange: use std::string instead of a temporary buffer for iconv calls
2023-06-30 19:15:21 +02:00
Rubidium
69d5b9d326
Cleanup: unused NO_THREADS #ifdefs
2023-06-28 19:07:10 +02:00
PeterN
8465559488
Codechange: Pass face index as font os_handle for FreeType fonts. ( #11073 )
...
This allows fallback font detection to test the specific face within the
font rather instead of only the first.
2023-06-27 12:30:46 +01:00
Rubidium
714ff35e9d
Codechange: move to std::string over stredup + free
2023-06-18 22:55:15 +02:00
Rubidium
09f585b772
Codechange: use std::string over stredup+free for splitting font name
2023-06-18 18:32:20 +02:00
Owen Rudge
1a3d1bca59
Remove: OS/2 port
2023-06-16 14:29:14 +01:00
Rubidium
b2a8d8aea4
Codechange: use std::string for Windows' ISO code mangling
2023-06-07 08:27:18 +02:00
PeterN
f249715db3
Fix #10964 : Missing FontConfig format for language. ( #10965 )
2023-06-06 22:38:11 +00:00
PeterN
eda3defcb5
Codechange: Pass language for font detection as std::string. ( #10964 )
2023-06-06 20:55:56 +00:00
PeterN
7a0b6b7ddf
Codechange: Remove Freetype bits on Win32/OSX. ( #10960 )
...
These platforms have their own specific font rendering.
2023-06-06 19:43:27 +01:00
Patric Stout
cd751a598a
Fix: Wayland crash on startup due to Pango also using FontConfig ( #10916 )
...
Basically, we haven't been a good neighbour. Turns out you shouldn't
actually call FcFini when you are done, as some library might still
want to use FontConfig. And they use a shared instance for their
administration.
The idea is that you call FcInit once, and use FcConfigReference
after that to get an instance, you can release. This entry is
ref-counted, and things happen automatically based on that.
At least, I think.
2023-06-03 19:09:02 +00:00
Patric Stout
21adfa7567
Fix: track "memory installed" for surveys less precisely ( #10910 )
...
It turns out, for Windows and Linux having the exact memory allows
for easy tracing of an individual. That is exactly against the idea
of the survey. And honestly, we don't need this precision.
2023-06-03 19:07:56 +00:00
Rubidium
d68b5c9162
Codechange: replace buffer + strecpy with std::string for getting clipboard contents
2023-06-03 20:14:33 +02:00