Commit graph

16592 commits

Author SHA1 Message Date
CHaBek d0d3325604
Update Korean translations by CHaBek 2023-03-28 10:27:06 +09:00
bors[bot] a27dbb1219
Merge #6435
6435: add proof mode for menu backgrounds closes #3009 r=def- a=Marmare314


![backgroundproof](https://user-images.githubusercontent.com/49279081/225979288-3fb43d41-79f7-477e-8479-6b3d106fbd5b.gif)

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: marmare314 <49279081+Marmare314@users.noreply.github.com>
2023-03-27 14:48:18 +00:00
bors[bot] b31d28dcaf
Merge #6474
6474: update selected group correctly after dragging r=def- a=Marmare314

When dragging a layer up, the wrong layer is selected after. Should be merged before #6467.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: marmare314 <49279081+Marmare314@users.noreply.github.com>
2023-03-27 09:19:24 +00:00
marmare314 927c80167f update selected layer correctly after dragging 2023-03-27 09:13:39 +02:00
marmare314 93d204f0ca show duplicate positions in tooltip 2023-03-27 08:51:02 +02:00
bors[bot] 15e83ddc16
Merge #6473
6473: Update brazilian_portuguese.txt r=def- a=rffontenelle



Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2023-03-27 06:50:28 +00:00
Rafael Fontenelle f15d975a5a
Update brazilian_portuguese.txt 2023-03-26 19:12:13 -03:00
bors[bot] 90e1652f76
Merge #6472
6472: Update russian.txt r=def- a=lolipodass

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: lolipodass <56706038+lolipodass@users.noreply.github.com>
2023-03-26 17:51:58 +00:00
lolipodass 412a2ff5f7
Update russian.txt 2023-03-26 20:15:48 +03:00
bors[bot] 41c6cdbccf
Merge #6468
6468: Translations for upcoming 16.9 r=Robyt3 a=def-

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2023-03-26 16:32:58 +00:00
bors[bot] e3575b1ae8
Merge #6469
6469: Add new contributor r=Robyt3 a=def-

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2023-03-26 16:14:00 +00:00
bors[bot] b207826df1
Merge #6470
6470: Fix ninja not getting predicted r=heinrich5991 a=Zwelf

Fixes #6464

This was regressed by #6246 by the wrong transformation of `if(!m_FreezeTime)` to `if(m_FreezeTime != 0)` instead of the correct `if(m_FreezeTime == 0)`.

And take additional measure to never set m_FreezeTime to a negative number in client prediction code.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Zwelf <zwelf@strct.cc>
2023-03-26 14:50:25 +00:00
Zwelf d40ff12d9a Fix ninja dash not getting predicted correctly
Fixes #6464

This was regressed by #6246 by the wrong transformation of `if(!m_FreezeTime)`
to `if(m_FreezeTime != 0)` instead of the correct `if(m_FreezeTime == 0)`.

And take additional measure to never set m_FreezeTime to a negative
number in client prediction code.
2023-03-26 16:42:31 +02:00
Dennis Felsing 6b0656ff85 Add new contributor 2023-03-26 16:28:06 +02:00
Dennis Felsing efeafbf1fb Translations for upcoming 16.9 2023-03-26 16:23:45 +02:00
bors[bot] a9674afb02
Merge #6451 #6466
6451: Fix `console_enable_colors` not being used, save `console_output_level` and `console_enable_colors` variables r=def- a=Robyt3

Closes #6447.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


6466: Fix rcon login when disconnecting dummy and when username used r=def- a=Robyt3

When connecting a dummy and then logging into rcon only the dummy is logged in. When disconnecting the dummy, the main client was not automatically logged in. When logging in with the main client and then connecting the dummy, the dummy was already authenticated automatically. Now the main client is also authenticated automatically when disconnecting an authenticated dummy.

This automatic authentication was also not working correctly if the login used a username, as only the password was stored. Now both username and password are stored to correctly authenticate the main or dummy client.

The stored username and password are completely cleared when disconnecting, so they are not stored in memory longer than necessary.

Closes #5586.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-26 12:59:00 +00:00
bors[bot] 0cf6f15590
Merge #6461
6461: Check if HTTP request task is aborted in completion callback r=def- a=Robyt3

It's possible for the HTTP request task to be aborted after the curl request has finished, so the returned `State` will be `HTTP_DONE` but `m_Abort` is `true`. The `State` never changes to `HTTP_ABORTED`, because the progress callback is not called after the HTTP request has completed.

This causes the client to crash when a skin download is aborted after the HTTP request finished but before the completion callback is called.

This is fixed by checking if `m_Abort` is `true` and setting the `State` to `HTTP_ABORTED` at the beginning of the completion callback.

Closes #3567.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-26 12:40:47 +00:00
Robert Müller 7bc17b2bd8 Fix rcon login when disconnecting dummy and when username used
When connecting a dummy and then logging into rcon only the dummy is logged in. When disconnecting the dummy, the main client was not automatically logged in. When logging in with the main client and then connecting the dummy, the dummy was already authenticated automatically. Now the main client is also authenticated automatically when disconnecting an authenticated dummy.

This automatic authentication was also not working correctly if the login used a username, as only the password was stored. Now both username and password are stored to correctly authenticate the main or dummy client.

The stored username and password are completely cleared when disconnecting, so they are not stored in memory longer than necessary.

Closes #5586.
2023-03-26 14:00:50 +02:00
bors[bot] ac71f5ce32
Merge #6465
6465: Ensure texture is cleared when rendering MOTD background r=def- a=Robyt3

Seems like there are cases where the texture is not cleared when the MOTD background is rendered, so part of the font texture is used for the round rect.

![screenshot](https://user-images.githubusercontent.com/23437060/227772184-65a7e463-4551-460f-814d-9ad70eaa3dc7.png)

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-26 11:26:05 +00:00
Robert Müller 1b19895204 Ensure texture is cleared when rendering MOTD background
Seems like there are cases where the texture is not cleared when the MOTD background is rendered, so part of the font texture is used for the round rect.
2023-03-26 13:15:36 +02:00
bors[bot] 214053ec9a
Merge #6459
6459: Add random skin button r=def- a=HiRavie

Adds a button for generating a random skin in tee settings. The logic generates handsome tees more often than not.
Intentionally didn't add a console command so it's not possible to make annoying skin change binds with this.
![random_skin](https://user-images.githubusercontent.com/65019210/227658839-5e8f3a4b-4e7c-4561-90c9-21a267d61a3a.png)

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Ravie <65019210+HiRavie@users.noreply.github.com>
2023-03-25 23:08:15 +00:00
bors[bot] 781ec433c2
Merge #6463
6463: Add "Delete" button to editor file browser r=def- a=Robyt3

To delete files and empty folders from the user's save directory.

Only files and folders from the user's save directory can be deleted. Only empty folders can be deleted.

Error message popups are shown when the deletion fails.

Closes #6272.

Screenshots:

- ![screenshot_2023-03-25_16-54-58](https://user-images.githubusercontent.com/23437060/227728748-c13e7283-289f-47ee-a34b-c42407b5bd2b.png)
- ![screenshot_2023-03-25_16-55-05](https://user-images.githubusercontent.com/23437060/227728750-fb5246f1-35c2-4834-b71f-4e3b5782664f.png)
- ![screenshot_2023-03-25_16-55-26](https://user-images.githubusercontent.com/23437060/227728749-842a00d0-0dec-4671-aa1f-9d110defb0d4.png)


## Checklist

- [X] Tested the change ingame
- [X] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-25 22:44:40 +00:00
Robert Müller fda8507d03 Add "Delete" button to editor file browser
To delete files and empty folders from the user's save directory.

Only files and folders from the user's save directory can be deleted. Only empty folders can be deleted.

Error message popups are shown when the deletion fails.

Closes #6272.
2023-03-25 16:59:02 +01:00
Robert Müller 6f1533ee18 Group UI code of right and left editor file dialog buttons
Move UI code for "New folder" button close to the code the "Map details" button.
2023-03-25 16:58:51 +01:00
Robert Müller fd98ed0295 Add IStorage::RemoveFolder
Wrapper for `fs_removedir`.
2023-03-25 16:58:51 +01:00
bors[bot] f2df34847b
Merge #6460
6460: Replace usage of `fmodf` with `std::fmod` r=heinrich5991 a=Robyt3

Leftover from #6372.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-25 15:24:59 +00:00
Ravie 20ac914e0e Tooltip ID 2023-03-25 16:13:29 +01:00
bors[bot] 48b6dea725
Merge #6462
6462: Refactor `net_set_blocking` and `net_set_non_blocking` r=heinrich5991 a=Robyt3

Reduce duplicate code by using loop and by merging implementation of `net_set_blocking` and `net_set_non_blocking`.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-25 15:02:39 +00:00
Ravie eb41ecf3d7 Icon button, tooltip and various fixes 2023-03-25 15:43:25 +01:00
Robert Müller aa0ad18f1b Refactor net_set_blocking and net_set_non_blocking
Reduce duplicate code by using loop and by merging implementation of `net_set_blocking` and `net_set_non_blocking`.
2023-03-25 15:36:50 +01:00
Ravie 705be7c6e3 Implement random skin button 2023-03-25 13:11:47 +01:00
Robert Müller ddb21ec49e Check if HTTP request task is aborted in completion callback
It's possible for the HTTP request task to be aborted after the curl request has finished, so the returned `State` will be `HTTP_DONE` but `m_Abort` is `true`. The `State` never changes to `HTTP_ABORTED`, because the progress callback is not called after the HTTP request has completed.

This causes the client to crash when a skin download is aborted after the HTTP request finished but before the completion callback is called.

This is fixed by checking if `m_Abort` is `true` and setting the `State` to `HTTP_ABORTED` at the beginning of the completion callback.

Closes #3567.
2023-03-25 12:43:19 +01:00
Robert Müller 3c3a8021d2 Replace usage of fmodf with std::fmod
Leftover from #6372.
2023-03-25 10:28:26 +01:00
bors[bot] 6808b62b74
Merge #6457
6457: Fix and improve twping tool r=def- a=Robyt3



## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-24 08:02:47 +00:00
Robert Müller f4ee220395 Show twping timeout if no ping response is received, add exit code
Return exit code `0` if ping successful. Return `1` if timeout. Return `-1` if incorrect argument.
2023-03-23 23:26:07 +01:00
Robert Müller 71976256d8 Refactor twping variables 2023-03-23 23:11:30 +01:00
Robert Müller fae9ed1b5e Add missing initialization to twping
The tool doesn't work without initializing secure random and network.
2023-03-23 23:07:47 +01:00
Robert Müller 7c7d3b7732 Use logger instead of <cstdio> in twping 2023-03-23 23:06:49 +01:00
bors[bot] 4c07e76d12
Merge #6455
6455: Fix dummy tee being able to ping main tee in chat r=def- a=Robyt3

Main and dummy tee cannot ping each other anymore. Other main and dummy tees can still ping your own main and dummy tees.

We must ensure to only use `m_aLocalIDs[1]` when the dummy is connected, as this ID is not updated when no dummy is connected, so it can refer to another client if you disconnect your dummy and another client subsequently takes its client ID.

Closes #3699.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-23 21:49:14 +00:00
Robert Müller 880ced2de0 Fix dummy tee being able to ping main tee in chat
Main and dummy tee cannot ping each other anymore. Other main and dummy tees can still ping your own main and dummy tees.

We must ensure to only use `m_aLocalIDs[1]` when the dummy is connected, as this ID is not updated when no dummy is connected, so it can refer to another client if you disconnect your dummy and another client subsequently takes its client ID.

Closes #3699.
2023-03-23 20:24:28 +01:00
bors[bot] 971b166488
Merge #6439
6439: Refactor `random` functions r=heinrich5991 a=Robyt3



## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-23 12:56:55 +00:00
bors[bot] f1149b83e5
Merge #6454
6454: Round by millisecond, not centisecond (fixes #6453) r=heinrich5991 a=def-

Some servers seem to allow times with millisecond precision, official DDNet doesn't, so never noticed this issue.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2023-03-23 12:18:44 +00:00
Dennis Felsing 5252667204 Round by millisecond, not centisecond (fixes #6453)
Some servers seem to allow times with millisecond precision, official
DDNet doesn't, so never noticed this issue.
2023-03-23 09:47:48 +01:00
Robert Müller 9f3c59000e Save console_output_level and console_enable_colors variables 2023-03-22 22:16:53 +01:00
Robert Müller 6760532491 Fix console_enable_colors not being used 2023-03-22 22:11:47 +01:00
bors[bot] 8057d591db
Merge #6449
6449: Select language on first start based on user locale r=heinrich5991 a=Robyt3

Closes #2459.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [X] Tested in combination with possibly related configuration options
- [X] Written a unit test (especially base/) or added coverage to integration test
- [X] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-21 20:52:04 +00:00
Robert Müller a91b51c8a2 Select language on first start based on user locale
On first client start (when `cl_show_welcome` is `1`), determine the user locale with `os_locale_str` and initially select the most fitting language for this locale.

For this the language index must also be loaded immediately on client launch, before the initial language is loaded.
2023-03-21 21:17:40 +01:00
Robert Müller cddbc78592 Add RFC 3066 language tags to language index
Add RFC 3066 language tags to language index in order to identify the language to select when first starting the game based on the user's locale.

Multiple language tags can be specified per entry separated with a semicolon, as some languages have different tags that do not share a unique prefix (e.g., Simplified and Traditional Chinese).
2023-03-21 21:17:40 +01:00
Robert Müller 481698c7d0 Move CLanguage and LoadLanguageIndexfile to localization
The `CLanguage` class and `LoadLanguageIndexfile` function are more appropriately located in the file for the other localization functions.
2023-03-21 21:17:40 +01:00
Robert Müller 413227a5c1 Add os_locale_str to get user locale
This function determines the preferred user locale setting.
2023-03-21 21:17:40 +01:00