Commit Graph

22 Commits

Author SHA1 Message Date
GravisZro
a00639be24 Replace "signed char" with "int8_t" 2024-05-23 22:59:50 -04:00
GravisZro
a3a3797067 Replace "uint" with "uint32_t" 2024-05-23 22:57:25 -04:00
GravisZro
2147cfa68b Replace "unsigned int" with "uint32_t" 2024-05-23 22:51:16 -04:00
Azamat H. Hackimov
45ac1cc78a Cleanup headers in sndlib
Moving common macros into ssl_lib.h
2024-05-22 22:03:46 +03:00
Thomas Roß
56288c819e Merge branch 'main' into win-x64 2024-05-21 00:54:53 +02:00
Thomas Roß
0c09eed1b7 [Win,x64] Replaced inline assembly for int3 with debug_break() to fix compile errors in x64 builds. 2024-05-15 19:55:45 +02:00
Louis Gombert
c1db7c70de Fix double extern qualifier warning in idmfc.h
Functions declared in idmfc.h were prefixed by both macros `EXTERN` and `DLLEXPORT`. `EXTERN` expands to `extern "C"` for C++ code, and `DLLEXPORT` expands to `extern "C"` for C++ or `extern` for C code, making up two `extern` qualifiers for C++ code. We now only use DLLEXPORT macro.
2024-05-14 23:51:08 +02: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
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
0e55dee0de x86-64 supports the int $3 opcode to trigger a breakpoint.
This architecture obviously didn't exist in 1999.  :)
2024-05-02 14:56:11 -04: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
C.W. Betts
61e9a42a73 Add virtual default destructors on a few abstract classes. 2024-04-29 15:28:30 +00: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
1bc5648a9a
Remove MacOS (Classic) code and all references (3/3)
At this point, all remaining references to `MACINTOSH` are either part
of multi-value conditionals that `unifdef` was unable to determine the
final value for, or a `#define`, or a comment. I manually go through the
files with a Ctrl+Shift+F search (ignoring legacy/, to preserve useful
historic knowledge) and clean up each usage.

As part of that search, I discovered `lib/mac/` which I deleted wholly.

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:44:40 -07: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
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
Thomas Otto
bd0122e5af Use PInfo* instead of void*
This avoids a lot of casts back to this (and ever only this) type.
2024-04-20 16:33:22 +02:00
Azamat H. Hackimov
38128ea134 Additional clang-format 2024-04-17 00:25:04 +03:00
Kevin Bentley
61be1317b2 More clanging 2024-04-16 14:46:12 -06:00
Kevin Bentley
7399b5a2f2 Fix CRLF line endings. 2024-04-16 14:21:35 -06: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