Louis Gombert
7ca92bd1bd
Merge pull request #614 from winterheart/ddebug-update
...
ddebug submodule update
2024-10-05 17:21:19 +02:00
Jason Yundt
f5d2a43863
Add -aditionaldir option
...
Before this change, Descent 3 would look for all of its game data files
in a single directory. This change allows users to spread out Descent
3’s game data over multiple directories.
Building Descent 3 produces multiple files that can be freely
redistributed (Descent3, d3-linux.hog, online/Direct TCP~IP.d3c, etc.).
Running Descent 3 requires those files and several additional files that
cannot be freely redistributed. Before this change, the files that were
redistributable had to be in the same directory as the files that were
not redistributable. This change makes it so that they can be in
separate directories.
The main motivation behind this change is to allow people to package
Descent 3 for Linux in a reasonable manner. For the most part, binary
packages for Descent 3 will contain all of the freely redistributable
components. Package managers will copy those components into system
directories that are owned by root and that users probably shouldn’t
edit manually. Users will then create a new directory and copy the game
data from their copy of Descent 3 into that new directory. Users will
then be able to run:
Descent3 -setdir <path-to-proprietary-files> -additionaldir <path-to-open-source-files>
The -additionaldir option can also be used to support more complicated
scenarios. For example, if the user is using Debian’s
game-data-packager [1], then they would do something like this:
Descent3 -setdir <path-to-writable-directory> -additionaldir <path-to-gdp-directory> -additionaldir <path-to-open-source-files>
The -additionaldir option can also be used to load a mod that replaces
.hog files:
Descent3 -setdir <path-to-base-game-data> -additionaldir <path-to-mod-files>
[1]: <https://github.com/DescentDevelopers/Descent3/issues/373#issuecomment-2120330650 >
2024-09-29 14:07:53 -04: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
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
b33cc21dce
Merge pull request #587 from winterheart/module-fixes
...
Update module, add logger module
2024-09-18 22:18:13 +02:00
Azamat H. Hackimov
dc0cd880e4
Add logger module
...
Implementing separated logger module.
2024-09-18 22:50:08 +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
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
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
Azamat H. Hackimov
511743d4b3
Implementing new ddio_GetTmpFileName()
...
New function uses std::filesystem::path and generates result faster than ddio_GetTempFileName() (benchmarked on Linux).
2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
8940a5ae38
Remove unused ddio_CleanPath()
2024-09-18 21:23:14 +03:00
Azamat H. Hackimov
cab252f66c
Remove unused ddio_GetParentPath()
2024-09-18 21:22:22 +03:00
Jan Engelhardt
a23c6a42a3
mem_malloc type triviality checks (7/8)
...
```
git grep -l mem_malloc | xargs perl -i -lpe 's{\((char) \*\)mem_malloc\((\S+)\)}{mem_rmalloc<$1>($2)}'
```
2024-09-16 22:12:14 +02:00
Jan Engelhardt
bb38a4a565
mem_malloc type triviality checks (3/8)
...
```
git grep -l mem_malloc | xargs perl -i -lpe 's{\((\w+) \*\*\)mem_malloc\(sizeof\(\1 \*\) \* (\S+)\)}{mem_rmalloc<$1>($2)}'
```
2024-09-16 22:12:13 +02:00
Jan Engelhardt
c7da9daee2
mem_malloc type triviality checks (2/8)
...
Automated replacement with
```
git grep -l mem_malloc |
xargs perl -i -lpe 's{\((\w+) \*\)mem_malloc\(sizeof\(\1\) \* (\S+)\)}{mem_rmalloc<$1>($2)}'
```
2024-09-16 22:12:12 +02:00
Azamat H. Hackimov
a16420789d
Convert ddio to use new logging facility
2024-09-10 03:00:25 +03:00
Jan Engelhardt
5f0bdf8184
Fix spello "it's"
2024-09-03 13:26:51 +02:00
Jan Engelhardt
a3a31c77a2
Fix spello "seperate.."
2024-09-03 13:26:51 +02:00
Jan Engelhardt
cf748b719e
Resolve out-of-bounds access restoring game for level 4
...
srcpath "hudburn.ogf"
srcpath "hudburn.ogf"
srcpath "shieldinv.ogf"
srcpath "shieldinv.ogf"
srcpath "level4"
==61849==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f8665855daf at pc 0x000001019268 bp 0x7ffeaad45fc0 sp 0x7ffeaad45fb8
READ of size 1 at 0x7f8665855daf thread T0
f0 0x1019267 in ddio_SplitPath(char const*, char*, char*, char*) $GIT/ddio/lnxfile.cpp:134
f1 Osiris_FindLoadedModule(char*) $GIT/Descent3/OsirisLoadandBind.cpp:775
f2 Osiris_RestoreSystemState(CFILE*) $GIT/Descent3/OsirisLoadandBind.cpp:2774
f3 LoadGameState(char const*) $GIT/Descent3/loadstate.cpp:387
f4 LoadCurrentSaveGame() $GIT/Descent3/gamesave.cpp:709
f5 GameSequencer() $GIT/Descent3/gamesequence.cpp:1239
f6 PlayGame() $GIT/Descent3/game.cpp:834
f7 MainLoop() $GIT/Descent3/descent.cpp:550
f8 Descent3() $GIT/Descent3/descent.cpp:508
f9 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151
Address 0x7f8665855daf is located in stack of thread T0 at offset 431 in frame
f0 Osiris_RestoreSystemState(CFILE*) $GIT/Descent3/OsirisLoadandBind.cpp:2685
This frame has 3 object(s):
[32, 72) 'ei' (line 2791)
[112, 368) 'tag' (line 2690)
[432, 692) 'read_module_name' (line 2761) <== Memory access at offset 431 underflows this variable
2024-08-30 02:37:42 +02:00
Louis Gombert
672a82ec6f
Merge pull request #544 from winterheart/reactivate-editor
...
Reactivate editor
2024-08-26 22:17:12 +02:00
Azamat H. Hackimov
39e971504e
DDIO: implement mouse grab state functions
...
Hide global variable ddio_mouseGrabbed.
2024-08-21 12:29:28 +03:00
Azamat H. Hackimov
79db9aa3e2
Move platform-specific defines and macros to own file crossplat.h
2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
54f9d75e62
Reduce linux_fix.h usage in project
2024-08-20 23:08:10 +03:00
Azamat H. Hackimov
16a6866885
DDIO: new crossplatform SleepMS() function
...
Use C++ chrono and thread for crossplatform sleep function.
2024-08-20 23:08:10 +03:00
Thomas Roß
7b71873a69
[Cleanup] Removed function declarations that are not implemented.
2024-08-20 20:03:02 +02:00
Thomas Roß
3162d4a4af
[DDIO] Deleted unused ddio_win.h.
2024-08-20 20:03:02 +02:00
thfrwn
35bcbe8bf0
build on OpenBSD via Linux pathways
2024-08-20 10:03:24 -04:00
Azamat H. Hackimov
36080f1f08
DDIO: Delete unused ddio_GetRootFromPath()
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
38ac2b19fc
Additional notes for documentation of ddio_GetSysRoots()
...
On UNIX-like systems there only one element list.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
306db747cc
Change signature of ddio_DoForeachFile()
...
There no return value usage across the project, change return type of function to void.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
842ef19bfd
Implement root mount points (drives) in DoPathFileDialog()
...
List root mount points / drives in separate listbox.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
7c4a4d2566
DDIO: remove DLLddio_FindFileStart functions as unused
...
Cleanup code in core and netcon.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
0805e97061
DDIO: New ddio_DoForeachFile() function
...
Cross-platform ddio_DoForeachFile() replaces platform-specific ddio_FindFileStart(), ddio_FindNextFile() and ddio_FindFileClose() functions.
2024-08-15 11:47:43 +03:00
Azamat H. Hackimov
ec065b2a07
DDIO: remove unused ddio_GetFullPath()
2024-08-15 11:47:43 +03:00
Louis Gombert
60c5dbf1fe
CMake: add all headers to target sources
...
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00
Louis Gombert
1328a8c846
Remove non-functional OpenGL logging methods
2024-07-28 17:52:01 +02:00
Azamat H. Hackimov
8fd119bd3d
MVE: Make timer code crossplatform
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
de49da0e9a
DDIO: Remove unused platform-dependent functions
...
Remove ddio_CreateDir(), ddio_RemoveDir(), ddio_SaveWorkingDir(), ddio_RestoreWorkingDir(), ddio_DirExists(). Replace them in code with std::fs alternatives.
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
81555afd15
CFILE: convert cf_Diff() to use std::fs::path
...
Convert cf_Diff() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c47210be75
CFILE: convert cf_CopyFile() cf_CopyFileTime() to use std::fs::path
...
Convert cf_CopyFile() cf_CopyFileTime() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Louis Gombert
74c7b2cb0c
Fix bad rebase for sdlmain.cpp
2024-06-29 18:28:23 +02:00
Louis Gombert
99a39d645d
Remove unused DirectX-related files
2024-06-29 18:21:38 +02:00
Louis Gombert
91c18fefc5
Windows SDL2 compilation
2024-06-29 18:21:37 +02:00