Commit Graph

233 Commits

Author SHA1 Message Date
Azamat H. Hackimov
220108f650 Isolate libacm module
Update libacm module, minor cleanups.
2024-07-28 16:50:43 +03:00
Azamat H. Hackimov
c773fbbe70 Isolate unzip module
Update unzip module, minor cleanups.
2024-07-28 16:50:43 +03:00
Azamat H. Hackimov
7ba009b811 Isolate rtperformance module
Update rtperformance module, minor cleanups.
2024-07-28 16:50:42 +03:00
Azamat H. Hackimov
b9da6b59ff Isolate physics module
Update physics module, minor cleanups, remove unused code.
2024-07-28 16:50:42 +03:00
Azamat H. Hackimov
9e3563de4d Isolate model submodule
Isolate model from rest of the project, minor cleanups.
2024-07-28 16:50:42 +03:00
Azamat H. Hackimov
7b31572d05 Isolate grtext submodule
Isolate grtext from rest of the project, minor cleanups.
2024-07-28 16:50:42 +03:00
Azamat H. Hackimov
87882c9976 Isolate ui submodule
Isolate ui from rest of the project, minor cleanups.
2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
e9ac3b3ceb Merge d3movie module into Descent3
Simplify project layout, minor cleanup.
2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
73d4853505 Merge d3music module into Descent3
Simplify project layout, minor cleanup.
2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
e93a8bfc0e Remove czip module as unused 2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
f1737d2a19 Isolate AudioEncode submodule
Isolate AudioEncode from rest of the project, minor cleanups
2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
506521695a Isolate 2dlib submodule
Isolate 2dlib from rest of the project, minor cleanups
2024-07-27 22:21:29 +03:00
Chris Sarbora
3da53e567f
Programmatically replace all __LINUX__ with POSIX
Steps:
```sh
srcs=$(mktemp)
find . -name "*.cpp" -or -name "*.c" -or -name "*.h" -or -name "*.hpp" -or -name "*.cc" -or -name "*.hh" > $srcs
xargs sed -i 's/ifndef __LINUX__/if !defined(POSIX)/' < $srcs
xargs sed -i 's/ifdef __LINUX__/if defined(POSIX)/' < $srcs
xargs sed -i 's/defined(__LINUX__)/defined(POSIX)/' < $srcs
```
2024-07-12 18:11:54 -05:00
Azamat H. Hackimov
5a4e1533a6 Fix playback case-insensitive intros 2024-07-09 09:47:11 +03:00
Azamat H. Hackimov
4f0e0f87a5 Cleanup MVE library
Remove old implementation, cleanup unused code.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
b94458f561 MVE: Switch to D2X implementation (first run)
Adapting movie and mve interfaces each other.
Converted open() to fopen() et al. calls.
movie expected image as RGB565 from old mve, but now it's RGB555, so there no need additional conversion. Fixed hicolor related conversion of width in movie's callbacks. Headers cleanup in both subsystems.

Sound and frame callbacks are still unavailable.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
41ec941b50 Convert bm_SaveFileBitmap() and SaveVClip() to std::fs::path 2024-07-05 01:50:57 +03:00
Azamat H. Hackimov
3af18dadc3 MANAGE: convert some global path variables to std::fs::path
Simplifies code related to UpdatePrimitive().
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c33d99a5db MANAGE: convert UpdatePrimitive() to use std::fs::path 2024-07-01 12:50:49 +03:00
Louis Gombert
18c9950b97 SDL2 editor: compile win32 and dd_grwin32 with directX 2024-06-29 18:21:37 +02:00
Louis Gombert
91c18fefc5 Windows SDL2 compilation 2024-06-29 18:21:37 +02:00
Azamat H. Hackimov
59487976f6 Isolate misc module
Isolate misc module for better dependency handling.
2024-06-27 01:26:35 +03:00
Chris Sarbora
6953a76ad5
Define OutrageMessageBox regardless of DEBUG 2024-06-24 22:27:55 -05:00
Louis Gombert
35615b1f4e
Merge pull request #464 from tophyr/type-defs
Add <cstdint> for type definitions
2024-06-24 19:07:59 +00:00
Louis Gombert
53759c5dbb
Merge pull request #454 from pzychotic/fix-ship-select-screen
Fix ship select screen
2024-06-24 19:06:11 +00:00
Chris Sarbora
ab819b8018
Add <cstdint> for type definitions 2024-06-24 02:05:22 -05:00
Azamat H. Hackimov
743f782815
Merge pull request #453 from Lgt2x/remove-intellivibe
Remove intellivibe interface
2024-06-23 18:06:25 +03:00
Thomas Roß
62784c40c4 [Renderer] Added g3_GetAspectRatio() and made g3_SetAspectRatio() available through 3d.h to prevent use of extern. 2024-06-22 17:59:27 +02:00
Louis Gombert
fa2061dc76 Remove intellivibe interface
Intellivibe is an interface for VRF's Tactile Feedback System hardware, now discontinued.
2024-06-22 03:20:26 +02:00
Azamat H. Hackimov
db8aa64d2f Make mem module isolated from project
Properly define MEM_USE_RTL definition only for mem library. Link other dependant modules with mem.
2024-06-20 00:43:51 +03:00
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
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
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
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
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
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
Louis Gombert
b8949f292d more windows editor 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
Chris Sarbora
45fe157563
Eliminate warnings in winapp.cpp
Uninitialized data
Bad parameters
Deprecated methods
2024-06-07 01:18:04 -05:00
Louis Gombert
15dce81bd1
Merge pull request #396 from GravisZro/cleanup
More clean up
2024-06-04 07:25:15 +00:00
Louis Gombert
66923d5bc7
Merge pull request #407 from winterheart/remove-ncurses
Remove ncurses usage dependency
2024-06-02 20:11:39 +00:00
GravisZro
691dc6487d Remove one unused macro definition and fix another 2024-06-01 22:21:51 -04:00
GravisZro
1c7e3053f2 Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
GravisZro
b889fee6c2 Remove Taoist typedefs 2024-06-01 22:17:44 -04:00
Louis Gombert
6d3a4c3e7f
Merge pull request #408 from GravisZro/remove/unusedpredefs
Code cleanup: Add one macro, remove five others
2024-06-01 20:51:41 +00:00
GravisZro
bfe52bc983 Add one macro, remove five others
- Add macro PRIMARY_HOG to define the hardcoded hog filename to load.
- Replace instances of "LINUX" with "__LINUX__"
- Remove these macros entirely because they are (now) unused
  - LINUX
  - _REENRANT
  - __32BIT__
- Removed from CMakeFile.txt because they are in linux_fix.h
  - _MAX_PATH=260
  - _MAX_FNAME=256
2024-05-31 12:05:12 -04:00
Azamat H. Hackimov
95caa7b6c3 Remove ncurses enabled console
This type of console is enabled only with `-svgalib` and `-dedicated` options. Since there no svgalib direct support (which is pretty old and too specific to Linux tech), it's better completely remove this code for simplicity and reducing external dependencies.
Removed `-svgalib` option as unused now.
2024-05-31 13:12:28 +03:00
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
Louis Gombert
baab65b6b3
Merge pull request #388 from GravisZro/fix/mprintf
Make mprintf and mprintf_at a proper variadic macro
2024-05-27 06:40:36 +00:00
GravisZro
9cf9781369 Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
GravisZro
4ac9b9c22f Replace ioctl with fcntl, fix ioctlsocket calls (64-bit fix)
`ioctl` and `ioctlsocket` take two different types of arguments but worked in the past due to
long being 32-bit. However, ioctl functionality is non-standard and should not be used in
code written after **1997** in order to make sockets non-blocking. This functionality was
standardized as part of fcntl.

* Using the new function `make_nonblocking` to make socket nonblocking
2024-05-24 18:24:40 -04:00
Azamat H. Hackimov
6bc3c71a83 Reordering ddio_common module
Merge ddio_lnx and ddio_win into ddio_common module.
2024-05-24 22:17:44 +03:00
GravisZro
dc91b22635 Fix rebase breakage 2024-05-24 09:13:36 -04:00
GravisZro
d0be4f81bb Move _stat macro to linux_fix.h
This is a fix for linux, so move it to correct location.
2024-05-24 08:53:03 -04:00
GravisZro
ec73d3fe1f Remove excess stricmp definitions 2024-05-24 08:53:02 -04:00
GravisZro
13ed05cf6c Remove unused macros 2024-05-24 08:50:59 -04:00
GravisZro
f46a0b642c Move controller macros to Controller.h
Also copy one to winjoy.cpp
2024-05-24 08:50:59 -04:00
GravisZro
582970d9ef Replace SWAP with std::swap 2024-05-24 08:50:59 -04:00
GravisZro
88d1dfa948 Replace SET_MIN with std::min 2024-05-24 08:50:56 -04:00
GravisZro
5e5e0c99c3 Replace "short" with "int16_t" and fix missing headers 2024-05-23 23:49:31 -04:00
GravisZro
aebe1bbbb6 Replace "ushort" with "uint16_t" and fix missing includes 2024-05-23 23:16:40 -04:00
GravisZro
fe855cf85e Fix missing header includes/restore third-party files 2024-05-23 23:14:40 -04:00
GravisZro
26b7776f43 Replace "ubyte" with "uint8_t" 2024-05-23 23:07:26 -04:00
GravisZro
9d3e361a35 Replace "sbyte" with "int8_t" 2024-05-23 23:05:05 -04:00
GravisZro
cc67b9230a Replace "signed short" with "int16_t" 2024-05-23 23:04:15 -04:00
GravisZro
3dcd21b717 Replace "unsigned short" with "uint16_t" 2024-05-23 23:03:29 -04:00
GravisZro
cf0c51c8dd Replace "sint8" with "int8_t" 2024-05-23 23:02:27 -04:00
GravisZro
961d7060c2 Replace "uint8" with "uint8_t" 2024-05-23 23:01:58 -04:00
GravisZro
38f82ab9fd Replace "sint32" with "int32_t" 2024-05-23 23:01:16 -04:00
GravisZro
4bde77bc28 Replace "uint32" with "uint32_t" 2024-05-23 23:00:36 -04:00
GravisZro
a00639be24 Replace "signed char" with "int8_t" 2024-05-23 22:59:50 -04:00
GravisZro
1618040db5 Replace "unsigned char" with "uint8_t" 2024-05-23 22:58:46 -04:00
GravisZro
a3a3797067 Replace "uint" with "uint32_t" 2024-05-23 22:57:25 -04:00
GravisZro
0556786c12 Replace "signed int" with "int32_t" 2024-05-23 22:55:41 -04:00
GravisZro
2147cfa68b Replace "unsigned int" with "uint32_t" 2024-05-23 22:51:16 -04:00
GravisZro
fb74b66bdf Fix RAND_MAX overflow errors
In `psrand.h` it attempts to undefine RAND_MAX and then redefine it.
This may work on some compilers but G++/Clang. To resolve this error
RAND_MAX was renamed to D3_RAND_MAX but **only** in files that
included `psrand.h`. The code behavior should restored to that of the
official release.
2024-05-23 20:51:25 -04:00
Louis Gombert
a1a8056afc
Merge pull request #355 from GravisZro/fix/64bit
64-bit fixes
2024-05-23 07:21:36 +00:00
GravisZro
9ebd567178 Utilize Windows types
For whatever reason they decided to switch a bunch of Windows types to their
underlying types which causes problems when replacing possibly problematic
32-bit long types. This restores the use of the Windows defined types.
2024-05-22 18:30:56 -04:00
GravisZro
dec9de7456 64-bit fixes
Switch all the (u)long types to (u)int32_t where appropriate.
2024-05-22 18:14:45 -04:00
Azamat H. Hackimov
283e003b73 Reorganize ddsndgeometry code
Split linux geometry class implementation into own file, rename directx geometry.cpp to ds3dgeometry.cpp
2024-05-22 22:03:46 +03:00
Azamat H. Hackimov
3bd07d1f7e Reordering dependant on sndlib modules
Properly include and reuse produced static lib in other components.
2024-05-22 22:03:46 +03:00
Azamat H. Hackimov
974c703906 Reordering dd_sndlib and dd_lnxsound into sndlib
Consolidate all sound related code into one module.
2024-05-22 22:03:43 +03:00
Louis Gombert
f5d5ea947b
Merge pull request #367 from winterheart/lnxcontroller
Reordering linux modules, cleanup code
2024-05-22 18:37:18 +00:00
Louis Gombert
e66c359947
Merge pull request #340 from MaddTheSane/visibility
Hide module symbols by default
2024-05-22 17:39:11 +00:00
Thomas Roß
56288c819e Merge branch 'main' into win-x64 2024-05-21 00:54:53 +02:00
JeodC
e4e1963364 Get executable path for -useexedir 2024-05-20 11:40:14 -04:00
Thomas Roß
7033fd5d96 Merge branch 'main' into win-x64
# Conflicts:
#	lib/win/win32app.h
#	win32/winapp.cpp
2024-05-19 16:25:33 +02:00
Thomas Roß
5e580b3f6c [WinApp] Fixed missing initialization of m_MsgFn array in ctor.
Rewrote the C-style array to std::array while at it.
2024-05-19 13:23:15 +02:00
Azamat H. Hackimov
20d38d7367 Use C99 standard vsnprintf() function 2024-05-19 12:40:50 +03:00
Azamat H. Hackimov
3fa32ff386 Reorder headers related to linux module 2024-05-19 12:21:43 +03:00
Azamat H. Hackimov
bde23461ea Replace non-portable itoa with sprintf
Minor fixes and header cleanup.
2024-05-19 02:34:09 +03:00
Thomas Roß
4072dcb3bd
Merge branch 'DescentDevelopers:main' into win-x64 2024-05-17 20:06:34 +02:00
Azamat H. Hackimov
0f694a4fc5
Merge pull request #345 from Lgt2x/remove-aureal
Remove Aureal support
2024-05-16 15:34:35 +03:00
Jeod
01db899f56
Merge pull request #342 from Lgt2x/remove-ddaccess
Remove DDAccess.h header, and associated DD_ACCESS_RING definition
2024-05-15 17:42:05 -04:00
Thomas Roß
6ecafd9e68 [Win,x64] Fixed WinApi types and function calls.
Lots of these truncated 64bit pointer or handle types to 32bit.
2024-05-15 19:52:01 +02:00
Thomas Roß
2e4d25e4ee [DirectX] Updated DirectX SDK to August 2007 version.
This is one of the last versions still containing DirectDraw + DirectSound and also has x64 support.
2024-05-15 19:39:01 +02:00
Louis Gombert
959da14ff5 Remove spdlog dependency, keep the logging module 2024-05-14 14:12:03 +02:00
Louis Gombert
13711c3036 Remove Aureal support
D3 used to support Aureal 3-Dimensional sound cards, providing 3D spatial audio. The hardware and drivers is outdated, so all support in code has been removed, including UI mixer setting.

Read more about A3D here: https://en.wikipedia.org/wiki/Aureal_Semiconductor#A3D
2024-05-14 00:56:34 +02:00