Commit Graph

374 Commits

Author SHA1 Message Date
Nicolae Crefelean d4c3d01d07
Add: new plural form for Romanian translation (#8936) 2021-04-10 17:33:27 +02:00
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 2021-04-07 09:31:47 +02:00
milek7 295f34a9df Fix: Freeing LanguagePack with wrong size. 2021-04-02 10:12:25 +02:00
Patric Stout b21ba566ae
Codechange: remove special strings for language and resolutions (#8824)
As OpenTTD grew, we found other ways to do this, and we are no
longer in need for a hack like this.
2021-03-09 10:58:33 +01:00
Michael Lutz 6755ff63e1 Add: [OSX] Native font rendering without using FreeType. 2021-02-14 11:48:58 +01:00
Michael Lutz 2b0200d429 Codechange: OS-specific data for font search is not used outside of searching. 2021-02-13 20:09:14 +01:00
Patric Stout c6fd6cfd15 Fix: tell the user if a font fails to load and fallback is about to be used
Additionally, tell exactly why the font failed to load, which
glyph was missing from the font. This hopefully helps the user
a bit more in the right direction.
2021-01-13 14:27:39 +01:00
Patric Stout 98400974a9 Codechange: nobody was using "str" parameter, so remove it 2021-01-13 14:27:39 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Michael Lutz 024a3f6259 Codechange: Use automatic memory management for language pack reading. 2020-12-27 13:19:25 +01:00
Michael Lutz f3326d34e7 Codechange: Use std::string in FIO search path handling. 2020-12-27 13:19:25 +01:00
stormcone ca65f19b03 Feature: Show group name as part of the default vehicle name.
Only if the vehicle is member of a group and does not have a user defined name.
2020-12-15 21:18:03 +01:00
jostephd b1cf79da5b
Feature: new velocity unit "tiles/day" (#8278) 2020-12-15 00:39:57 +01:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx 8cccb158e9 Fix #7672: more than 32 resolutions may be available 2019-08-02 20:19:07 +01:00
Michael Lutz d2ed426077 Codechange: [Win32] Pass a native GDI font description around when we have one, instead of repeatedly guessing the font. 2019-05-14 11:21:36 +01:00
Michael Lutz 2675762ae9 Add: [Win32] GDI engine for font glyph rendering as a replacement for including FreeType.
Building with FreeType is still possible and will take precedence over the GDI renderer, but
the project files don't include FreeType anymore by default. Combining GDI rendering with ICU
text layout is untested.
2019-05-14 11:21:36 +01:00
glx 8899272614 Codechange: use std::vector for _language_dropdown 2019-04-18 21:49:34 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 427d9d483f
Fix #6564: enforce types of arguments for station name strings (#7419) 2019-03-26 22:50:56 +01:00
Charles Pigott e453572b6a Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised 2019-03-26 20:54:40 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
Patric Stout 36105841b9 Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
2019-03-11 10:16:00 +01:00
Patric Stout 52d7e7d45e Codechange: ICU_LAYOUT is in reality ICU_LX (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
2019-03-11 10:16:00 +01:00
PeterN 63fe6c6598
Codechange: Make std::stack use std::vector container in string formatting/drawing. (#7305)
This is a very minor performance increase which can add up during operations such
as sorting. Performance impact my be platform/compiler dependent.
2019-03-02 08:06:02 +00:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Michael Lutz 32ce1ce347 Add: [OSX] Text layout using the native CoreText API.
By default, the native API will be used instead of ICU, but if ICU is
forced in using configure, it will take precedence.
2018-12-08 20:13:27 +01:00
Michael Lutz 8d7cd6a526 Add: [OSX] Native natural sort implementation. 2018-12-08 20:13:27 +01:00
Charles Pigott e0c0394e37 Fix: Remove various dead or unnecessary assignments 2018-10-31 12:41:49 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
PeterN 11ab3c4ea2
Change: Increase cargo type limit to 64. 2018-06-26 13:32:58 +01:00
Michael Lutz 768a31bfe3 Add: [Win32] Text layout using the native Windows Uniscribe library.
Uniscribe is sometimes producing different results compared to ICU, especially
when RTL and LTR content is mixed. Comparing the results to other programs
(like editors or web browsers) leads me to believe that the result are at least
not worse than ICU and possibly better.
2018-06-06 21:37:09 +02:00
Michael Lutz f4394debdc Add: [Win32] Native natural sort implementation. 2018-06-06 21:37:09 +02:00
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
PeterN 3b32075e8a
Add: {PUSH_COLOUR} and {POP_COLOUR} control codes to handle switching colours. (#6737)
This replaces the internal SCC_PREVIOUS_COLOUR swap.
2018-04-19 19:33:21 +01:00
Pavel Stupnikov 9175c349da Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726) 2018-04-17 18:41:31 +01:00
Charles Pigott 19076c24c1 Fix #6690: Compilation with ICU 61 2018-04-08 11:47:26 +02:00
frosch 2bb80d280c (svn r27758) -Change: Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k. 2017-02-26 19:41:30 +00:00
frosch a56e2bccd0 (svn r27756) -Codechange: Add StringTab enum 2017-02-26 19:40:53 +00:00
frosch 9ad09627ad (svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs. 2017-02-26 19:39:58 +00:00
frosch d874cef678 (svn r27602) -Fix [FS#6481]: Compilation with --disable-network. (Deranged) 2016-06-17 18:56:19 +00:00
michi_cc 2b8bb12d62 (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 2015-08-10 20:24:13 +00:00
rubidium 69fac508c3 (svn r27367) -Codechange: make a distinction between the layouting part of ICU (lx) or the sorting/collation part of ICU (i18n) 2015-08-09 12:33:27 +00:00
michi_cc 95cb7c8692 (svn r27288) -Fix: Slow network content GUI in MSVC Debug builds due to repeated string resolving. 2015-05-17 19:49:35 +00:00
rubidium 730773f5f1 (svn r27102) -Fix [FS#6194]: money values would end up wrong in strings when outside of the bounds of a 32 bits integer 2015-01-01 20:50:43 +00:00