Commit Graph

765 Commits

Author SHA1 Message Date
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
Louis Gombert
60cb3a042f
Merge pull request #374 from winterheart/sndlib
Unify and cleanup sound related code into single sndlib module
2024-05-22 19:31:29 +00:00
Azamat H. Hackimov
dd309d220c Update SDL Audio API usage to version 2 2024-05-22 22:03:46 +03:00
Azamat H. Hackimov
ed8d9f870d Make diverted class lnxsound virtual methods override 2024-05-22 22:03:46 +03:00
Azamat H. Hackimov
0e936d6cac General cleanup in sdlsound.cpp
Minor fixes and enhancements.
2024-05-22 22:03:46 +03: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
45ac1cc78a Cleanup headers in sndlib
Moving common macros into ssl_lib.h
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
cdec632f28
Merge pull request #318 from winterheart/install-targets
Introducing installation steps
2024-05-22 18:55:36 +00:00
Louis Gombert
782fd38dd8
Merge pull request #379 from Jayman2000/editorconfig
Create EditorConfig file
2024-05-22 18:50:01 +00:00
Louis Gombert
f5d5ea947b
Merge pull request #367 from winterheart/lnxcontroller
Reordering linux modules, cleanup code
2024-05-22 18:37:18 +00:00
Azamat H. Hackimov
08b906fcc3 Introducing installation steps
Added installation steps for all built targets. Added FORCE_PORTABLE_INSTALL cmake option that controls portable installation (only supported for now).
2024-05-22 21:35:52 +03:00
Azamat H. Hackimov
dc143a9e25
Merge pull request #385 from JeodC/win64-preset
Update CMakePresets.json - Add Win64 preset
2024-05-22 21:21:44 +03:00
Louis Gombert
e66c359947
Merge pull request #340 from MaddTheSane/visibility
Hide module symbols by default
2024-05-22 17:39:11 +00:00
JeodC
7576a353e4 Add win64 build preset 2024-05-22 10:21:59 -04:00
Azamat H. Hackimov
bf7c01fd07
Merge pull request #384 from JeodC/readme-adjust
Update README.md
2024-05-22 15:02:00 +03:00
JeodC
ec59c6f63e Update README.md 2024-05-22 07:57:34 -04:00
Azamat H. Hackimov
764b84d24f
Merge pull request #354 from pzychotic/win-x64
Windows x64 build
2024-05-22 14:28:07 +03:00
Thomas Roß
0c67b093c6 [Init] Merged d3-<Platform>.hog code together to allow for cf_OpenLibrary() call to be moved out of #ifdef. 2024-05-22 12:10:08 +02:00
Thomas Roß
73254af011 [Build] Fixed capitalization of DirectX paths. 2024-05-22 11:59:07 +02:00
Jason Yundt
df838f0617 Create EditorConfig file
Most files in this repo assume that tabs are 8 characters wide and use 2
spaces for indentation. Most people’s editors aren’t configured to do
that by default. This can lead to indentation mistakes [1].

The main motivation behind this change is to make indentation mistakes
less likely. Many editors [2] will automatically use whatever
indentation settings are in the EditorConfig file.


On an unrelated note, the EditorConfig that this commit adds includes a
tab_width property. This comment in cfile/cfile.h was the inspiration
for specifying the tab_width property:

// Opens a HOG file.  Future calls to cfopen(), etc. will look in this HOG.
// Parameters:  libname - the path & filename of the HOG file
// NOTE:	libname must be valid for the entire execution of the program.  Therefore, it should either
//			be a fully-specified path name, or the current directory must not change.
// Returns: 0 if error, else library handle that can be used to close the library
int cf_OpenLibrary(const char *libname);

When tab_width is set to 8, the first “libname” lines up with the second
“libname”, and the m in “must” lines up with the b in “be”. When
tab_width is set to its default value (4 in this case [3]), the first
“libname” doesn’t line up with anything, and the second “libname” lines
up with the b in “be”. It just looks more correct when tab_width is set
to 8.

[1]: <https://github.com/DescentDevelopers/Descent3/pull/372#issuecomment-2122445826>
[2]: <https://editorconfig.org/#pre-installed>
[3]: <https://spec.editorconfig.org/#supported-pairs>
2024-05-21 11:11:16 -04:00
Thomas Roß
56288c819e Merge branch 'main' into win-x64 2024-05-21 00:54:53 +02:00
Jeod
cffeb20a3e
Merge pull request #371 from JeodC/hwcursorfix
Only use standard mouse mode in debug
2024-05-20 15:20:19 -04:00
Jeod
23868a7c72
Merge pull request #297 from Jayman2000/revamp-usage-instructions
Revamp usage instructions
2024-05-20 15:18:49 -04:00
Jason Yundt
e246c01fb3 Revamp usage instructions
This commit revamps the usage instructions in order to accomplish two
goals:

1. Make the instructions easier to follow by turning them into a
   numbered list.
2. Make sure that macOS and Linux users install all of the built
   libraries for their platforms.
2024-05-20 13:32:10 -04:00
Jeod
fcc94aee42
Merge pull request #372 from JeodC/exedirfix
Get executable path for -useexedir
2024-05-20 12:11:05 -04:00
JeodC
e4e1963364 Get executable path for -useexedir 2024-05-20 11:40:14 -04:00
Jeod
3436d04ef6
Merge pull request #349 from Lgt2x/clang-warnings2
Fix some more clang warnings
2024-05-20 09:43:18 -04:00
Jason Yundt
e973dc1734 Automatically create netgames/ directory
Before this change, users would have to jump through hoops in order to
make sure that they’re using the .d3m files from this repo (as opposed
to the .d3m files that came with their version of Descent 3).
Specifically, users would have to remove or backup Descent 3’s original
netgames/ directory, create a new one, hunt down TCP_IP.d3c and copy it
to the new netgames/ directory.

This change makes it easier for users to use the latest version of
working by creating a netgames/ directory for them. All they have to do
is replace the old one with the new one.

Fixes #369.
2024-05-20 09:02:01 -04:00
Jeod
451381e783
Merge pull request #301 from Jayman2000/missing-licenses
Add missing licenses to CI artifacts and include licenses in all builds
2024-05-20 08:39:51 -04:00
JeodC
d07ecf1404 Only use standard mouse mode in debug
Resolves an issue where hardware cursor was still visible in release build despite window mode being disabled for release builds.
2024-05-19 15:14:11 -04:00
Jeod
3c74b79667
Merge pull request #370 from pzychotic/fix-server-crash
Fixed crash in dedicated server mode.
2024-05-19 13:26:43 -04:00
Thomas Roß
266ad92d15 [Server] Fixed crash in dedicated server mode. 2024-05-19 18:19:08 +02: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
Jeod
a8a80880b1
Merge pull request #368 from pzychotic/fix-winapp-init
Fixed missing initialization of m_MsgFn array in ctor
2024-05-19 09:17:13 -04: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
4b78b7068d Fix compilation on macOS 2024-05-19 13:12:30 +03:00
Azamat H. Hackimov
20d38d7367 Use C99 standard vsnprintf() function 2024-05-19 12:40:50 +03:00
Azamat H. Hackimov
b20964e97f Reorder dd_vid* modules into dd_video 2024-05-19 12:34:58 +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
Azamat H. Hackimov
cd1e33baa4 Move lnxcontroller to linux submodule 2024-05-19 02:31:50 +03:00
Thomas Roß
4072dcb3bd
Merge branch 'DescentDevelopers:main' into win-x64 2024-05-17 20:06:34 +02:00
Jeod
56e61275ce
Merge pull request #358 from winterheart/cfile-enhance
Cfile enhance
2024-05-17 13:51:31 -04:00
Jeod
7fcd78e009
Merge pull request #362 from pzychotic/cleanup
Deleted left over VS project file.
2024-05-17 13:44:44 -04:00
Jeod
2c4f44ad92
Merge pull request #361 from pzychotic/fix-line-endings
Converted line endings to Unix format to match .gitattributes file
2024-05-17 13:44:17 -04:00
Thomas Roß
1973aed32e [Misc] Deleted left over VS project file. 2024-05-17 18:40:32 +02:00
Thomas Roß
aecd737df0 [Misc] Converted line endings to Unix format to match .gitattributes file. 2024-05-17 18:36:41 +02:00