Commit Graph

1423 Commits

Author SHA1 Message Date
Azamat H. Hackimov
245f9c6425 Remove unused cf_LibraryFindFirst() and related to it functions 2024-09-26 01:49:55 +03:00
Azamat H. Hackimov
6f81ca4f9f Replace cf_LibraryFindFirst cf_DoForeachFileInLibrary()
Simplify code, fix some minor issues.
2024-09-26 01:49:55 +03:00
Azamat H. Hackimov
5a5020273e Implementing cf_DoForeachFileInLibrary()
This function is intended to replace cf_LibraryFindFirst()/cf_LibraryFindNext() functions, like ddio_DoForeachFile().
2024-09-26 01:49:55 +03:00
Azamat H. Hackimov
9c430b861b Remove unused cf_ChangeFileAttributes() 2024-09-26 01:49:55 +03:00
Azamat H. Hackimov
68f8771845 Fix compilation of editor 2024-09-25 23:47:03 +03:00
Azamat H. Hackimov
3a7c86a2d2
Merge pull request #606 from bmwiedemann/mtime
Stop storing mtime in hog files
2024-09-25 23:05:19 +03:00
Azamat H. Hackimov
9756e5917d
Merge pull request #608 from pzychotic/fix-604
Fixed access of map::iterator to recently deleted element
2024-09-25 23:01:50 +03:00
Thomas Roß
05c1fab155 [Osiris] Removed unnecessary cast, basename is already a std::fs::path 2024-09-25 21:17:06 +02:00
Thomas Roß
9c866b088d [Osiris] Fixed access of map::iterator to recently deleted element 2024-09-25 21:15:06 +02:00
Bernhard M. Wiedemann
8e31928756 Stop storing mtime in hog files
This allows for reproducible builds.

I could not even find where the timestamp value is used.
Maybe it is write-only-data.
2024-09-25 08:13:19 +02:00
Azamat H. Hackimov
3b83d493e2 Sync DMFC debug functionality with core codebase 2024-09-24 23:03:02 +03:00
Azamat H. Hackimov
f7b7f18e0d Replace debugbreak with SDL_assert()
Reworked ASSERT() and Int3() macros to use SDL_assert(). SDL_assert() allows to debug break from user decision.

Major reorganizing platform-dependent code to make it platform-independent.
2024-09-24 23:03:02 +03:00
Azamat H. Hackimov
cc9e054509 Avoid using ASSERT in interface headers 2024-09-24 23:03:02 +03:00
Azamat H. Hackimov
a59503f881 Move pserror.h to ddebug module 2024-09-24 23:00:53 +03:00
Azamat H. Hackimov
c3b1225c6e Remove mprintf_at() usage
This function is stubbed and does nothing.
2024-09-24 23:00:53 +03:00
Azamat H. Hackimov
21576c86a5 Unify Debug_Init() for all platforms 2024-09-24 23:00:53 +03:00
Azamat H. Hackimov
585a3804c4 Remove unused serial check code 2024-09-24 23:00:53 +03:00
Christian Baumann
4c50d187a6 Merge branch 'main' into ui-network-settings 2024-09-24 19:40:58 +02:00
Azamat H. Hackimov
c5630268c2
Merge pull request #599 from Lgt2x/pilot-cancel
Disallow exiting pilot selection without selecting a pilot
2024-09-24 10:38:15 +03:00
Azamat H. Hackimov
0ccf2c9aa7
Merge pull request #602 from Lgt2x/hex-registry
Registry: read hexadecimal values correctly
2024-09-24 10:25:37 +03:00
Louis Gombert
98d899c71d Disallow exiting pilot selection without selecting a pilot
Message box did not display correctly when cancelling (ESC) the pilot selection menu, allowing entering the game without a valid pilot. Cancel handling now uses safer std::filesystem logic.
2024-09-24 08:15:59 +02:00
Louis Gombert
d307a0db6e Registry: read hexadecimal values correctly
Hex string values from the registry containing an alpha character were parsed incorrectly. Use more standard hex parsing instead of hand-made incorrect function
2024-09-24 08:09:31 +02:00
Louis Gombert
0e228aa9db
Merge pull request #591 from winterheart/ddio-update
Update DDIO and related to it's code OSIRIS
2024-09-23 22:37:14 +02:00
Louis Gombert
515b8b5744
Merge pull request #601 from winterheart/dd_video_cleanup
Remove dd_video module
2024-09-23 21:03:59 +02:00
Azamat H. Hackimov
eb0f6a2865 Remove dd_video module
Functions from module are stubbed and unused.
2024-09-23 00:37:25 +03:00
Christian Baumann
4137feed4e pps slider 2024-09-21 20:29:36 +02:00
Azamat H. Hackimov
39e128cb0f
Merge pull request #582 from jengelh/master
ASAN/UBSAN fixes
2024-09-21 21:25:46 +03:00
Louis Gombert
398699e045
Merge pull request #598 from pzychotic/fix-594
[Init] Fixed Default_pilot initialization
2024-09-20 23:53:55 +02:00
Thomas Roß
78906c3373 [Init] Fixed Default_pilot initialization
When we have no config file yet, e.g. on first start of the game, or the entry for "Default_pilot" is missing in the config, the variable Default_pilot will be filled with random memory. This might later crash when we try to interpret this string as std::filesystem::path in PilotSelect() in pilot.cpp.
2024-09-20 19:39:37 +02:00
Christian Baumann
5f26094f80 Merge branch 'main' into ui-network-settings 2024-09-19 19:17:09 +02:00
Louis Gombert
770e9e8f22
Merge pull request #593 from jengelh/cxx17
build: work around compile failure under g++-9
2024-09-18 23:48:03 +02:00
Louis Gombert
b33cc21dce
Merge pull request #587 from winterheart/module-fixes
Update module, add logger module
2024-09-18 22:18:13 +02:00
Jan Engelhardt
85f640d0bb build: work around compile failure under g++-9
Under gcc-9 (e.g. used by Ubuntu 20.04), compilation fails with:

```
/usr/include/c++/9/variant: In instantiation of ‘constexpr const size_t std::variant_size_v<user_var>’:
/usr/include/c++/9/variant:1023:10:   required from ‘struct std::__detail::__variant::__gen_vtable<true, void, user_var::operator++(int)::<lambda(auto:22&&)>&&, user_var&>’
/usr/include/c++/9/variant:1656:23:   required from ‘constexpr decltype(auto) std::__do_visit(_Visitor&&, _Variants&& ...) [with bool __use_index = false; bool __same_return_types = true; _Visitor = user_var::operator++(int)::<lambda(auto:22&&)>; _Variants = {user_var&}]’
/usr/include/c++/9/variant:1672:29:   required from ‘constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...) [with _Visitor = user_var::operator++(int)::<lambda(auto:22&&)>; _Variants = {user_var&}; std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> = void]’
scripts/DallasFuncs.h:21:75:   required from here
/usr/include/c++/9/variant:94:29: error: incomplete type ‘std::variant_size<user_var>’ used in nested name specifier
   94 |     inline constexpr size_t variant_size_v = variant_size<_Variant>::value;
```

Judging from the date of P2162, calling std::visit with std::variant
derivatives is only specified for C++20 and onwards. But Descent3
only asks for C++17.

Since ``class user_var`` does not have any members that need would
need to be accessed via std::visit, we can "add a hint" and
explicitly specify the base type.
2024-09-18 22:15:41 +02:00
Azamat H. Hackimov
85cceef2af module: use cf_FindRealFileNameCaseInsensitive() instead duplicated
In mod_GetRealModuleName() there was error - arguments of mod_FindRealFileNameCaseInsensitive() is misplaced.
2024-09-18 22:50:08 +03:00
Azamat H. Hackimov
dc0cd880e4 Add logger module
Implementing separated logger module.
2024-09-18 22:50:08 +03:00
Azamat H. Hackimov
3b49fb45c8
Merge pull request #589 from Lgt2x/sdlcontroller
Merge WinController and lnxcontroller
2024-09-18 21:58:02 +03:00
Louis Gombert
c20ea914d6 sdlcontroller: mark functions override 2024-09-18 22:32:56 +02:00
Louis Gombert
8f63c0ded6 Remove unimplemented '-rjoy' option
The '-rjoy' option would be used to connect to a remote controller, but was not implemented in the SDL or DX version
2024-09-18 22:32:56 +02:00
Louis Gombert
6c533364f6 Remove outdated '-slowkey', '-alternatejoy' & '-directinput' options
Removes key_emulation and joy_emulation toggles from ddio_init_info structures, that were not used in the SDL implementation.
All input is now handled using SDL for all platforms, alternatejoy/directinput options were only relevant for Windows-specific DirectInput. 'slowkey' was an unimplemented feature.
2024-09-18 22:32:56 +02:00
Louis Gombert
d7063e7ff7 Remove leftover wincontroller.h 2024-09-18 22:32:56 +02:00
Louis Gombert
259b54e5a3 Don't import sdlcontroller in controller.h
Respect encapsulation of subclass
2024-09-18 22:32:09 +02:00
Louis Gombert
387ef339f4 Rename lnxcontroller to sdlcontroller 2024-09-18 22:32:09 +02:00
Louis Gombert
ef113543ab Merge WinController and lnxcontroller files
move controller IO processing to the DDIO module
2024-09-18 22:32:09 +02:00
Louis Gombert
b8b50d9b08 sdljoy: minor fixes
Use nullptr instead of 0, parenthesize sizeof, remove extra forward declaration
2024-09-18 22:32:09 +02:00
Azamat H. Hackimov
09ab370821 Convert OSIRIS_Extracted_scripts to std::map usage
Simplify object management.
2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
2d29dd4f7c Convert tExtractedScriptInfo to std::fs::path 2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
548b1f63d7 Convert OSIRIS_Extracted_script_dir to std::fs::path 2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
28fccea676 Convert Osiris functions to use std::fs::path 2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
627ab62f1f Remove unused ddio_GetTempFileName() 2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
3e402d78d5 Replace ddio_GetTempFileName() with ddio_GetTmpFileName()
Convert global variable Descent3_temp_directory to std::fs::path.
2024-09-18 21:23:18 +03:00