scemino
2423ba3ed6
TWP: Move btea to common
2024-03-07 20:08:26 +01:00
Giovanni Cascione
3b466e65be
COMMON: move mappedEvents declaration out of for loop
2024-03-02 14:10:13 +02:00
elasota
84fe1e2018
COMMON: Add multi-data IO templates and multi-value IO functions to streams
2024-02-27 17:13:35 +01:00
Torbjörn Andersson
18ff31bc92
COMMON: Flag some Path functions as WARN_UNUSED_RESULT
...
This would have caught the recent Hopkins regression. It also warns
about a few other things at the moment, so that has to be looked into at
some point.
2024-02-09 18:54:54 +01:00
Le Philousophe
aceaf99816
COMMON: Fix bug #14892
...
When both paths were equal, suffix was incremented one char too much and
went off the string.
Add test cases to check for this.
2024-02-02 08:06:59 +01:00
Josu Igoa
74763d28dd
COMMON: Add basque language
2024-01-30 11:49:53 +03:00
Le Philousophe
61b267759a
COMMON: Use hashit, hashit_lower, equalsIgnoreCase on Path string
...
This change should be safe as our escape system doesn't mess with case.
In addition, we compare underlying strings to check equality so hashing
its content should work too.
2024-01-20 23:20:55 +01:00
Kaloyan Chehlarski
b89b946e7d
COMMON: Allow extracting delimiter info from Tokenizer
...
Extended the StringTokenizer and U32StringTokenizer
classes with functions that provide the caller with a list
of all delimiters surrounding the last processed token.
2024-01-16 23:31:13 +02:00
Le Philousophe
e51e93c3de
COMMON: Fix DumpFile path creation at opening
...
Path rework broke it badly
2024-01-15 18:52:36 +01:00
Le Philousophe
5b4e26322e
COMMON: Don't fail when comparing empty strings
...
Add tests for this.
2024-01-14 14:06:41 +01:00
Le Philousophe
4f1ccf0ef7
COMMON: Fix fromConfig not using the fixed path under Windows
...
Instead of using value_ it uses the untouched value.
2024-01-13 17:57:57 +01:00
Cameron Cawley
7b025fb6f2
COMMON: Fix compilation with 32-bit Visual Studio
2024-01-09 09:52:55 +00:00
Cameron Cawley
f7c2d14587
COMMON: Move all find and replace functions into BaseString
2024-01-08 23:39:22 +01:00
Cameron Cawley
35125f5509
COMMON: Use more standard library functions in String classes
2024-01-08 23:39:22 +01:00
Cameron Cawley
0a4fec83c0
COMMON: Improve removing characters from strings
2024-01-08 23:39:22 +01:00
Cameron Cawley
a8183c7734
COMMON: Insert all characters in one go with String::insertString()
2024-01-08 23:39:22 +01:00
Cameron Cawley
dce0f057ec
COMMON: Optimize U32String::vformat a bit by appending chars instead of inserting them
2024-01-08 23:39:22 +01:00
Cameron Cawley
6c06ae6125
COMMON: Simplify = and += operators for U32String and DBCSString
2024-01-08 23:39:22 +01:00
Cameron Cawley
4abc229268
COMMON: Unify implementations of String::replace()
2024-01-08 23:39:22 +01:00
Cameron Cawley
15a96f8c33
COMMON: Modify U32String::itoa() to use value_type instead of char
2024-01-08 23:39:22 +01:00
Cameron Cawley
288e1aaa3f
COMMON: Remove use of fmin/fmax/fminf/fmaxf
2024-01-08 13:07:05 +01:00
Martin Gerhardy
401e3eb968
EVENTRECORDER: const for isEventsBufferEmpty()
2024-01-06 13:46:19 +01:00
Cameron Cawley
f63ed4b9c3
COMMON: Fix translation of error messages
2024-01-02 01:00:54 +02:00
Le Philousophe
3a80655b45
COMMON: Remove useless unary + in Path lambdas
...
This confuses poor old MSVC2015 and is not needed.
2024-01-01 11:22:45 +01:00
elasota
968aa2fcd6
COMMON: Add support for opening an InstallShield cab inside of an archive
2023-12-29 11:15:17 +02:00
Eugene Sandulenko
efb903204d
COMMON: Added more global debug levels
2023-12-28 01:52:44 +01:00
Eugene Sandulenko
bf3117e935
COMMON: Switch debug channels to a hashmap
...
We used to use a bitfield there, which was restricting the total
number of flags to 32 (unless we switch to uint64, which is suboptimal).
Moreover, with the introduction of the global debug flags, we have
even fewer bits to flip, and this shared nature was restricting
the introduction of more global debug channels.
The goal for the bitfield was to make it possible to put a debug message into
more than one channel. But this feature was practically not used by the engines.
This was removed by the previous commits.
This commit turns the debug channels into a hashmap and puts the global channel
IDs after 100000.
There is no absolute need to renumber the existing debug channels, but
I could follow with an engine or two.
2023-12-28 01:41:10 +01:00
Cameron Cawley
eda69db63c
COMMON: Allow passing const pointers to BitArray::set_bits()
2023-12-26 20:23:59 +01:00
Cameron Cawley
5b1b14ad80
COMMON: Mark more symbols as const
2023-12-26 20:23:59 +01:00
Le Philousophe
c2bbb608cd
COMMON: Make String to Path conversion explicit
...
This will make sure engines use Path where appropriate.
2023-12-24 13:19:25 +01:00
Le Philousophe
431af3e37d
COMMON: Delete getPath compatibility shim
...
It's not needed anymore
2023-12-24 13:19:25 +01:00
Le Philousophe
ed9ded9e83
GUI: Migrate GUI to Path class
2023-12-24 13:19:25 +01:00
Le Philousophe
d931c58b5b
BASE: Start considering game paths as Path class
...
As it's still stored as String, this is still safe for every legacy use
2023-12-24 13:19:25 +01:00
Le Philousophe
fc3f03d21d
COMMON: Make EVENT_DROP_FILE use a Path
2023-12-24 13:19:25 +01:00
Le Philousophe
e0fd69bda0
COMMON: Make INIFile use Path
2023-12-24 13:19:25 +01:00
Le Philousophe
93a8f7f4d6
COMMON: Move Archive API to Path
2023-12-24 13:19:25 +01:00
Le Philousophe
2f34975164
COMMON: Make shaders API use the Path class
2023-12-24 13:19:25 +01:00
Le Philousophe
802c91554f
COMMON: Make extrapath a Path object
2023-12-24 13:19:25 +01:00
Le Philousophe
bfc61439fb
COMMON: Make themepath a Path object
2023-12-24 13:19:25 +01:00
Le Philousophe
dc7fadef28
COMMON: Make iconspath a Path object
2023-12-24 13:19:25 +01:00
Le Philousophe
b97da06876
COMMON: Make taskbar use Path
2023-12-24 13:19:25 +01:00
Le Philousophe
01ebece807
COMMON: Make getDefaultConfigFileName return a Path instead of a String
2023-12-24 13:19:25 +01:00
Le Philousophe
d9a8131ba2
COMMON: Make getDefaultLogFileName return a Path instead of a String
2023-12-24 13:19:25 +01:00
Le Philousophe
56552fa282
COMMON: Various path related fixes in archives
2023-12-24 13:19:25 +01:00
Le Philousophe
28b63470f0
COMMON: Migrate DumpFile to Path
...
Also display warnings using proper directory separator when opening
FSNode.
2023-12-24 13:19:25 +01:00
Le Philousophe
8b2e5ef649
COMMON: Make getPath() return a Path
...
Also add a compatibility shim which acts like a String.
In addition, simplify path related code to avoid stringification when
it's not needed.
Use the native path separator to display paths inside filesystem.
2023-12-24 13:19:25 +01:00
Le Philousophe
1722511c32
COMMON: Allow to store and fetch paths in configuration
2023-12-24 13:19:25 +01:00
Le Philousophe
6f4a86db7e
COMMON: Add a native directory separator
...
This will be used when converting the Path back to string to be used by
native filesystem APIs
2023-12-24 13:19:25 +01:00
Le Philousophe
eeba7ca153
COMMON: Add more path functions
2023-12-24 13:19:25 +01:00
Le Philousophe
6f46727c77
COMMON: Check if string is puny encoded before trying to decode it
...
This avoids the following useless conversion String->U32String->String
while the content will not change.
2023-12-24 13:19:25 +01:00