Anders Jenbo and staphen
6f319978e6
Migrate from libmpq to mpqfs ( #8482 )
...
Co-authored-by: staphen <[email protected] >
2026-03-30 00:14:11 +02:00
Gleb Mazovetskiy
88f706e0d1
SDL3: Add some backports / compat helpers
2025-10-10 00:49:44 +01:00
Gleb Mazovetskiy
8f6e9810d0
SDL3: Make text_render_integration_test build
...
Adds support for just enough SDL3 to make `text_render_integration_test`
work.
2025-10-05 20:17:47 +01:00
Anders Jenbo
01507d532c
Add basic DOS port ( #8155 )
2025-08-31 17:34:11 +02:00
Gleb Mazovetskiy
a4c891928d
Add POSIX fallbacks for ListFiles/Directories
2025-07-03 11:48:49 +01:00
071303357e
Dynamic mod detection
...
Co-authored-by: Anders Jenbo <[email protected] >
Co-authored-by: Stephen C. Wills <[email protected] >
2025-03-31 07:19:24 +02:00
Gleb Mazovetskiy
a838078341
macOS 10.4: Guard non-existing APIs
...
Based on @AJenbo's patch.
2024-11-15 08:37:55 +01:00
Gleb Mazovetskiy
35e93366f6
Replace uses of deprecated u8path
2024-06-20 14:19:31 +01:00
obligaron
45f8647892
Fix MSVC warnings in utils\*
2023-11-08 21:34:48 +00:00
Gleb Mazovetskiy
c7fefd74b6
LoggedFstream: Fix OpenFile error check
...
Fixes #6626
2023-09-20 13:49:17 +01:00
Gleb Mazovetskiy
a44d1dfbf3
ResizeFile: Fix SetFilePointer return type check
...
`SetFilePointerEx` returns 0 on failure but `SetFilePointer` returns
`INVALID_SET_FILE_POINTER`.
2023-09-20 00:43:22 +01:00
Gleb Mazovetskiy
a95bcc10f6
Windows 9x MinGW build ( #6619 )
2023-09-19 03:59:40 +00:00
Gleb Mazovetskiy
040c4fe82f
Generalize support for Windows without wchar APIs
...
Replaces `NXDK` ifdefs that relate to the lack of wchar APIs
with the more general `DEVILUTIONX_WINDOWS_NO_WCHAR` ifdefs.
This should make it much easier to port to Windows 98.
2023-09-17 07:26:29 +01:00
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
2023-05-10 13:50:12 +01:00
staphen
3e60df5111
Apply u8path() to paths passed into std::filesystem API calls
2023-04-22 05:53:47 +02:00
Gleb Mazovetskiy
f2cb9f0fa0
file_util: Implement RecursivelyCreateDir
...
With this, we no longer require `std::filesystem` support to create the
save file directory when it does not exist.
Note that by default the save file directory exists because it is
created by SDL, so this is mostly useful on platforms that override the
save directory or use `UNPACKED_SAVES`.
2023-03-11 17:47:29 +00:00
Gleb Mazovetskiy
1a1a282d9a
Use C FILE instead of C++ streams throughout
...
Reduces binary size by ~2 KiB and may improve compatibility with oddball
systems (e.g. PS2).
2023-02-15 18:15:07 +00:00
Gleb Mazovetskiy
6d274c9547
UNPACKED_SAVES: Saves without MPQs
...
Reduces rg99 binary size by ~70 KiB.
2023-01-18 23:40:30 +00:00
Gleb Mazovetskiy
dc3908e360
assets.cpp: Switch to C FILE for UNPACKED_MPQS
...
Eliminates some of the (minor) overhead of fstream.
2022-11-22 02:44:25 +01:00
Anders Jenbo
6f44b48f4e
Use SDL for creating file during RW test
2022-08-13 23:58:22 +02:00
Gleb Mazovetskiy
4063afb792
Xbox NXDK platform
2022-07-09 18:50:53 +01:00
Anders Jenbo
1409e604f5
Reduce string conversions
2022-03-20 11:04:15 +01:00
Gleb Mazovetskiy and Anders Jenbo
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <[email protected] >
2021-11-24 23:44:12 +01:00
qndel
8b0808bd4a
fix error spam
2021-10-25 01:02:17 +02:00
Vladimir Olteanu
b853559573
Make CreateFileStream return optional, rather than unique_ptr
2021-09-13 11:40:06 +02:00
Anders Jenbo
0475aed939
[android] Allow FileExists to work on assets
2021-08-01 12:35:24 +02:00
ephphatha
08ae390643
Add explicit casts for some implicit conversions
...
Some of these were triggering multiple warnings due to casts applied at times which forced potentially truncating operations.
2021-07-05 08:52:05 -07:00
Trihedraf
38cf99a423
Add IsWriteable to file_util.cpp
2021-05-15 14:34:43 +02:00
Gleb Mazovetskiy
6a27b37d62
Windows: Handle Unicode paths in language.cpp
2021-05-10 12:35:37 +02:00
Gleb Mazovetskiy
a3423cbc92
🧹 Move Storm code out of file_util
2021-05-10 12:35:37 +02:00
obligaron
58becefada
Define UNICODE/_UNICODE for StormLib and use SFileOpenArchive with wchar_t (TCHAR) on Windows
2021-05-10 08:34:12 +02:00
obligaron
2932da8950
CreateFileStream - Use ToWideChar on Windows
2021-05-10 08:34:12 +02:00
obligaron
60bfd5db34
Move SFileOpenArchive calls to new helper SFileOpenArchiveDiablo
2021-05-10 08:34:12 +02:00
obligaron
a64f94d580
Move creation of file stream to new helper CreateFileStream
2021-05-10 08:34:12 +02:00
obligaron
cfd72b68a0
Revert "remove windows specific code because stat works for this on windows"
...
This reverts commit 0987f8b479 .
2021-05-10 08:34:12 +02:00
Trihedraf
0987f8b479
remove windows specific code because stat works for this on windows
2021-05-09 15:16:13 +02:00
Gleb Mazovetskiy
f8a2552ac8
RemoveFile: Use DeleteFileW on Windows
2021-05-09 15:15:38 +02:00
Gleb Mazovetskiy
46742824ad
FileExists: Use PathFileExistsW on Windows
2021-05-09 15:15:38 +02:00
Gleb Mazovetskiy
adb5fa49da
🐞 Fix Windows UTF-8-to-16 conversion
...
Follow-up to #1905
2021-05-09 15:15:38 +02:00
Gleb Mazovetskiy
7ed08077f6
♻️ file_util: Cleanup Windows UTF-8-to-16 conversion
2021-05-09 05:41:08 +02:00
Jmgr
1b7e0d2cb3
Migrate existing log entries
2021-04-25 02:39:42 +02:00
Anders Jenbo
cc164985a3
🎨 Correct type checks in src sub-folder
2021-04-22 20:33:24 +02:00
Anders Jenbo
2969b80163
🎨 Run readability-identifier-naming on all src sub-folders
2021-04-22 03:53:35 +02:00
Anders Jenbo
b978d80119
🎨 llvm-include-order
2021-04-19 20:11:20 +02:00
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
2021-04-19 16:02:05 +02:00
Gleb Mazovetskiy
86afa95d2a
Move file_util.h implementations to file_util.cpp
...
There is no reason for these functions to be in the header (inlining
won't benefit them one bit).
I put them in the header originally only because of the weird state
SourceS was in back then.
2021-04-17 03:49:24 +02:00