Commit Graph

633 Commits

Author SHA1 Message Date
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
bperris
9c039e6d2c
Merge pull request #387 from GravisZro/fix/randmax
Fix RAND_MAX overflow warnings
2024-05-23 21:04:21 -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
Louis Gombert
c28fc06758
Merge pull request #357 from GravisZro/refactor/wincode
Utilize Windows types
2024-05-23 05:59:31 +00:00
GravisZro
c18b6d0b39 Win64 fixes for legacy code 2024-05-22 18:30:56 -04: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
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