Commit Graph

45 Commits

Author SHA1 Message Date
GravisZro
aebe1bbbb6 Replace "ushort" with "uint16_t" and fix missing includes 2024-05-23 23:16:40 -04:00
GravisZro
26b7776f43 Replace "ubyte" with "uint8_t" 2024-05-23 23:07:26 -04:00
GravisZro
3dcd21b717 Replace "unsigned short" with "uint16_t" 2024-05-23 23:03:29 -04:00
GravisZro
1618040db5 Replace "unsigned char" with "uint8_t" 2024-05-23 22:58:46 -04:00
GravisZro
2147cfa68b Replace "unsigned int" with "uint32_t" 2024-05-23 22:51:16 -04: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
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
3fa32ff386 Reorder headers related to linux module 2024-05-19 12:21:43 +03:00
C.W. Betts
446ead20d6 Make plug-ins and modules only export select symbols. 2024-05-13 01:22:40 -06:00
JeodC
a4ab78192c Join license header with historical commentrs
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.

Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Jeod
bfb3fc1980
Merge pull request #302 from winterheart/hog-tcp-ip 2024-05-08 14:21:13 -04:00
Louis Gombert
fe6bf7bf32
Merge pull request #303 from Arcnor/deadcode-removal2
remove unused code (mainly windows.h)
2024-05-08 14:49:53 +02:00
Edu García
3440667e93 remove unused code (mainly windows.h) 2024-05-07 23:45:33 +01:00
C.W. Betts
c6da74b069
Mark functions and variables as static (#185)
* Begin by marking functions and variables as static when needed.

* More work.

* More work.

* More pokes.

* More work.

* More work.

* Initial work on the netgames.

* Revert changes to the license header on source files.

* clutter.cpp poke.

* One final poke.

* Move some declarations to headers:

Move paged_in_count and paged_in_num to gamesequence.h
Move DoneLightInstance and StartLightInstance to polymodel.h

* Look over the AI script/plug-ins.

* Going over the changes one last time.

* Fix rebase errors.

* More migration from bare statics to static inlines.
2024-05-07 23:35:28 +02:00
Azamat H. Hackimov
280dd43636 Fix search paths on Hog generation
Replaced CMAKE_BINARY_DIR with target's directory expression generator.
2024-05-07 21:18:40 +03:00
Azamat H. Hackimov
c3b39ca344 Fix generating TCP/IP HOG file
Game expects a HOG file instead of direct library.
2024-05-07 20:01:58 +03:00
Jeod
aaa0d21b87
Merge pull request #296 from JeodC/d3cfix
TCP~IP.d3c building on windows
2024-05-06 20:03:05 -04:00
JeodC
d8be484eb6 TCP~IP.d3c building on windows
Adds winsock to cmakelists target libraries. Removes an include for unused header file. Converts an unsigned int to u_long for windows.
2024-05-06 18:13:49 -04:00
Edu Garcia
553f851714 remove unused code 2024-05-06 22:06:26 +01:00
Louis Gombert
0e69bf465f
Merge pull request #241 from icculus/ryan-sdl2-port
Initial SDL2 port
2024-05-06 08:57:20 +00:00
C.W. Betts
c534c1be1d Also make net games and internet plug-ins also be MODULES. 2024-05-04 12:05:15 -06:00
Jacob Coby
b64f17fb17 Merge branch '64bit-fixes' of github.com:jcoby/Descent3 into jcoby-64bit-fixes 2024-05-03 16:46:11 -04:00
Ryan C. Gordon
001a533399
Initial migration from SDL 1.2 to SDL2. 2024-05-02 08:29:21 -04:00
C.W. Betts
1a759638ed Fix a couple of out-of-bounds warnings found by Clang. 2024-05-01 16:40:30 -06:00
Azamat H. Hackimov
ca83125abc Remove IPX/SPX protocol support from netcode
IPX/SPX stack is deprecated and has no support on modern systems.
2024-04-30 18:24:45 +00:00
Jacob Coby
a6a6869a7e 64 Bit-Safe Updates
Imported Icculus' 64-bit changes.

Changes `[un]signed long` data types to `[un]signed int`.
2024-04-29 14:10:09 -04:00
Ryan C. Gordon
6c8977caf0
Heavy patching for compiler warnings.
The vast majority of this is fixing up `char *` that should be `const char *`
but a handful of other fixes, like potential buffer overflows that GCC
noticed, etc, were applied as well.

This removes `-Wno-write-strings` from CMakeLists.txt, as it is no longer
necessary, as there is no longer a flood of compiler warning spam when
building.

This does not fix all compiler warnings; there are still a handful, and they
are legitimate, but they can be dealt with in a future commit.
2024-04-29 00:18:56 -04:00
Chris Sarbora
e6ba1906c9
Remove MacOS (Classic) code and all references (1/3)
The MACINTOSH define refers to MacOS Classic (not OS X) which we do not
plan to support. Rather than carry the cruft forever, let's delete it.

NOTE: legacy/ is unused but we're keeping it around, so MACINTOSH uses
there are left alone.

Process used for this commit:
```
git rm -r mac
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" \) \
  -exec unifdef -UMACINTOSH -o {} {} \;
git restore legacy
git add .
```

Test Plan:
On Mac, build both Debug and Release
```
cmake --build --preset mac --config Debug
cmake --build --preset mac --config Release
```
2024-04-27 07:38:14 -07:00
Thomas Otto
00389c50ea Some more CMake white space formatting
- tabs to spaces
 - use Unix line endings everywhere
 - newline at end of file
 - remove trailing white space
 - no space between keywords and opening parenthesis
 - use 2 spaces to indent
2024-04-21 11:46:32 +02:00
GravisZro
534ddfef24 More simple warning fixes
This should be the remaining NULL/'\0' conflation fixes. This also fixes
a handful of type declarations. No significant changes.
2024-04-20 16:22:29 -04:00
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
Louis Gombert
c2b71b8147 Standardize CMake formatting
lowercase function names, blocks indent
2024-04-20 14:45:49 +02:00
Louis Gombert
ad6c3ee5a9
Merge pull request #86 from Lgt2x/d3-install
Remove D3_GAMEDIR hard-coded CMake variable
2024-04-20 11:13:51 +00:00
Louis Gombert
4b53454c0f Remove D3_GAMEDIR hard-coded CMake variable 2024-04-20 13:02:40 +02:00
C.W. Betts
7d7f5bf896 Quiet Clang Static Analyzer warnings.
Most of the warnings were caused by uninitialized values. Some were in plug-ins that didn't have a break in a switch, causing the memory to be deleted twice.
2024-04-19 17:42:17 -06:00
C.W. Betts
57078ae4b5 Change most sprintf to snprintf.
This also includes vsprintf to vsnprintf.
2024-04-19 12:31:28 -06:00
GravisZro
b5632bbc3e Fix simple warnings
Most of these warnings are due to the use of NULL instead of 0 or NULL instead of '\0'.
Some are macro redefinitions. None of them are pointer storage related. Those will be
in another PR.
2024-04-18 15:13:35 -04:00
Thomas Otto
6a9b345acc Remove linux/ipx.h include
This header was removed with linux 5.15
2024-04-17 01:20:51 +02:00
Azamat H. Hackimov
38128ea134 Additional clang-format 2024-04-17 00:25:04 +03:00
Kevin Bentley
7399b5a2f2 Fix CRLF line endings. 2024-04-16 14:21:35 -06:00
Dan Raviv
031ab438c4 Avoid assuming 32-bit in another pointer-to-int conversion 2024-04-16 13:02:45 -07:00
Dan Raviv
c6ffeb8ad4 Tweak var name to fix CMake errors on macOS
The tilde confuses CMake, maybe(?) due to CMP0053, though I would expect the OLD behavior to just keep working
2024-04-16 13:00:23 -07:00
Kevin Bentley
c6640cc631 clang-format on everything. 2024-04-16 12:56:40 -06:00
Kevin Bentley
df209742fc Initial import 2024-04-15 21:43:29 -06:00