Commit Graph

744 Commits

Author SHA1 Message Date
Louis Gombert
1e44581171
Merge pull request #443 from winterheart/ddio-filesystem
Migrating some of ddio functions to use std::filesystem::path
2024-06-18 18:54:59 +00:00
Azamat H. Hackimov
908f490396 Remove unused ddio_RenameFile() 2024-06-17 22:30:42 +03:00
Azamat H. Hackimov
b53e4a51a0 Refactoring ddio_*LockFile() functions
Cleanup, use C++ iostreams.
2024-06-17 22:30:42 +03:00
Azamat H. Hackimov
7db03a4ebf Make lockfile functions cross-platform
Unify all ddio_*LockFile() functions using std::filesystem.
2024-06-17 21:32:01 +03:00
Louis Gombert
a059b14677
Merge pull request #441 from pzychotic/dmfc-no-dllexport
Remove preprocessor definition DMFC_DLL and related code
2024-06-17 17:19:54 +00:00
Azamat H. Hackimov
f5e936e939 Move IOOpts.h into main tree
Added bin_read function for reading capabilities. Force checking types to arithmetic (int and float)
2024-06-17 01:55:02 +03:00
Louis Gombert
aa0b5ce4f1
Merge pull request #436 from winterheart/memory-functions
Changes to memory management functions
2024-06-16 18:14:42 +00:00
Azamat H. Hackimov
87472f47fe
Merge pull request #440 from pzychotic/fix-build-deps
Fixed custom target dependency for d3_version.h
2024-06-16 19:31:37 +03:00
Thomas Roß
113e7eaaaa [DMFC] Removed preprocessor definition DMFC_DLL and related code, because we build DMFC as static lib and don't need any of that dllexport/import stuff anymore. 2024-06-16 16:56:20 +02:00
Thomas Roß
0b682772bf [Build] Fixed custom target dependency for d3_version.h checking the wrong path to that file.
cmake/CheckGit.cmake uses configure_file() to create d3_version.h in ${TARGET_DIR}/lib aka ${PROJECT_BINARY_DIR}/lib. But add_custom_command() and add_custom_target() calls in the root CMakeLists.txt use ${PROJECT_BINARY_DIR}/Descent3 as path to that file, expecting it in a different place. While the build still works, since the compiler looks in the right include paths for it, the dependencies between these rules/targets are technically broken. At least msbuild will generate warnings about missing build outputs.

Also removed the wrong ALL parameter from add_custom_command(), it's only a valid parameter for add_custom_target().
2024-06-16 15:32:23 +02:00
Louis Gombert
ad42279af2
Merge pull request #430 from pzychotic/vcpkg-static
Use static versions of dependencies linked through vcpkg
2024-06-15 20:36:47 +00:00
Azamat H. Hackimov
c41c3a7cb1 Replace Global* memory functions
Replace Global* memory functions with mem_* equivalents from mem.h, remove compatibility functions on Linux / macOS platforms.
2024-06-15 22:07:45 +03:00
Azamat H. Hackimov
c8fa74550a Use RTL memory functions by default
Use Real-time library memory functions by default which improves overall performance. Minor cleanups.
Introduce new CMake option to enable/disable RTL memory functions (enabled by default).
2024-06-15 22:07:45 +03:00
Azamat H. Hackimov
20e80b6c6d
Merge pull request #438 from Lgt2x/format-editor
Clang-format editor and legacy code
2024-06-15 21:20:41 +03:00
Louis Gombert
5372e01323 Run clang-format on legacy code 2024-06-15 20:13:59 +02:00
Louis Gombert
86cce1e445 Run clang-format on editor code 2024-06-15 20:12:48 +02:00
Thomas Roß
400d758383 [Build] Use static versions of dependencies linked through vcpkg. 2024-06-15 18:35:41 +02:00
Louis Gombert
05d70f6322
Merge pull request #435 from winterheart/third-party
Create THIRD_PARTY.md for external code handling
2024-06-15 15:44:37 +00:00
Louis Gombert
6255917b84
Merge pull request #434 from MaddTheSane/DedicatedServerPrintf_fp
Fix DedicatedServerPrintf_fp definition
2024-06-15 14:20:39 +00:00
Louis Gombert
71068c8ea2
Merge pull request #437 from icculus/ryan-fullscreen-desktop
opengl: use SDL_WINDOW_FULLSCREEN_DESKTOP and an FBO.
2024-06-15 14:17:10 +00:00
Ryan C. Gordon
393a39b709
opengl: use SDL_WINDOW_FULLSCREEN_DESKTOP and an FBO.
This now renders to an OpenGL Framebuffer Object at the game's resolution,
and blits it to the window at whatever resolution it is currently using,
scaling and letterboxing if necessary.

Which is to say: display resolutions are now imaginary, and we never change
the physical display mode now. A smaller resolution is simply drawing less
pixels and scaling them up with the GPU for display. This solves a few
problems: no more resizing background windows or desktop icons shuffling
around, no more being stuck in a weird resolution when debugging or if the
game crashes, no more waiting on monitors to click over to a new mode, and
no more weird rendering when the display didn't exactly support the requested
mode.

This also means the game doesn't have to drop down to 640x480 for the config
menu screen when it was otherwise using some other resolution.

Some caveats:

- This _requires_ OpenGL Framebuffer Object support; there is currently no
fallback if it's missing and the game will refuse to start. But any desktop
hardware of the last ~20 years should support it. For weird embedded things
or whatnot, it will be possible to add a fallback.

- This currently requires SDL. The OpenGL pieces should work on Windows, but
someone would need to adjust the existing win32 code to create a fullscreen
window and not change the physical display mode. It should still compile on
windows and work as before (untested by me, though).

- This is only OpenGL; it does not touch the Direct3D renderer, which should
continue to work as before (again, untested by me).
2024-06-14 03:56:49 -04:00
Edu Garcia
a2d3a9cc75
Merge pull request #422 from Lgt2x/windows-ninja
Windows CMake preset: use ninja generator
2024-06-14 07:32:44 +01:00
Edu Garcia
9e93fc3bad
Merge pull request #397 from Lgt2x/d3-editor
Build internal level editor (WIP, doesn't actually run)
2024-06-14 07:28:03 +01:00
Louis Gombert
4ace76c366
Merge pull request #431 from notimaginative/fix_network_issue
Fix server crash during client connection
2024-06-12 20:55:45 +00:00
Azamat H. Hackimov
eb3466abc0 Create THIRD_PARTY.md for external code handling
Added all external code and license notices. Install THIRD_PARTY.md on installation step.
2024-06-12 23:40:27 +03:00
Louis Gombert
b4afcc2ec8
Merge pull request #432 from notimaginative/fix_chat_lobby_connect
fix PXO chat lobby connection failure on Linux/Mac
2024-06-12 10:13:34 +00:00
C.W. Betts
81d6473e19 Fix DedicatedServerPrintf_fp to actually match the definition of PrintDedicatedMessage. 2024-06-12 03:41:11 -06:00
Taylor Richards
ed0ff23cee
remove unnecessary return value test 2024-06-11 14:58:45 -04:00
Taylor Richards
03b729e318
fix PXO chat lobby connection failure on Linux/Mac 2024-06-10 21:55:35 -04:00
Taylor Richards
332f9c553e
fix server crash during client connection
The serverconn variable identifies the reliable socket used by the server.
However this variable is not yet initialized at the very start of the first
client connection which causes the server to crash. This fixes a bad safety
check for this issue and a further instance of the bug.
2024-06-10 21:51:51 -04:00
Louis Gombert
c00b8ea3c3 Editor review fixes 2024-06-10 23:35:11 +02:00
Louis Gombert
3f54c1a2cd
Merge pull request #428 from tophyr/eliminate-warnings
Eliminate warnings
2024-06-09 18:31:32 +00:00
Louis Gombert
3036f44017 x64 compilation fixes 2024-06-09 20:12:47 +02:00
Louis Gombert
bcca92722d Release build fixes 2024-06-07 23:50:38 +02:00
Chris Sarbora
ef33834a2a
Add comments explaining warning suppression 2024-06-07 16:24:07 -05:00
Louis Gombert
1821da99e7 Fix editor structures definitions 2024-06-07 21:41:40 +02:00
Louis Gombert
b8949f292d more windows editor fixes 2024-06-07 21:41:40 +02:00
Louis Gombert
87f19acc2f Internal editor: minimal compilation fixes 2024-06-07 21:41:40 +02:00
Louis Gombert
0fa8705291 Move internal level editor into main tree 2024-06-07 21:41:40 +02:00
Louis Gombert
a90b4ef728
Merge pull request #427 from tophyr/asan-fixes
Fix indexing error when looking up Win32_AppObjects
2024-06-07 17:57:54 +00:00
Louis Gombert
82c04f8fb9 Windows CMake preset: use ninja generator 2024-06-07 19:20:07 +02:00
Chris Sarbora
45fe157563
Eliminate warnings in winapp.cpp
Uninitialized data
Bad parameters
Deprecated methods
2024-06-07 01:18:04 -05:00
Chris Sarbora
eb0ba9fe4a
Fix indexing error when looking up Win32_AppObjects 2024-06-07 00:39:39 -05:00
Louis Gombert
fd61549080
Merge pull request #420 from MaddTheSane/pxofixes
PXO fixes
2024-06-05 20:15:14 +00:00
C.W. Betts
09b91fb6df Fix 64-to-32 integer truncating.
This is a bit more of a problem with byte-swapping than just reading/writing.
2024-06-04 15:08:36 -06:00
C.W. Betts
7f2091db1b Quiet most const char* warnings. 2024-06-04 15:05:31 -06:00
C.W. Betts
8a678822a3 Add snprintfs to the PXO module. 2024-06-04 15:03:29 -06:00
Louis Gombert
15dce81bd1
Merge pull request #396 from GravisZro/cleanup
More clean up
2024-06-04 07:25:15 +00:00
Louis Gombert
69d19efb3e
Merge pull request #419 from winterheart/pxo-online
Reactivating network mtclient (Parallax Online / PXO)
2024-06-04 07:05:04 +00:00
Azamat H. Hackimov
a295b047f0 Fix compilation on Windows 2024-06-03 22:45:51 +03:00