Commit Graph

35 Commits

Author SHA1 Message Date
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
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
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
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
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
Thomas Roß
4072dcb3bd
Merge branch 'DescentDevelopers:main' into win-x64 2024-05-17 20:06:34 +02: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
Louis Gombert
dc138e4912 Remove DDAccess.h header, and associated DD_ACCESS_RING definition
This definition was used to control the accessibility of some class members, changing protected qualifiers to public. This introduced unnecessary coupling between components and headers.

All conditional access specifiers have been set to public, which should not be a problem given the low number of classes that actually used affected members. Another albeit more complex solution could have been to use friend classes.
2024-05-13 23:21:05 +02:00
Louis Gombert
196c155895 Remove Gamegauge and -timetest command-line argument
Gamegauge is an outdated 3D performance benchmark tool. The -timetest command was used to activate it. Read more about about it here: https://www.gamespot.com/articles/3d-gamegauge-explained/1100-2463688/
2024-05-12 18:32:46 +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
Edu García
3440667e93 remove unused code (mainly windows.h) 2024-05-07 23:45:33 +01:00
Azamat H. Hackimov
2aece028d0 Move debug functions to own module
This commit is part of efforts to isolate subsystems of project into own modules.
2024-04-30 00:58:34 +03:00
Oskar Strengbohm
4582b44eb3 misc: pstring: Refactor dependents. 2024-04-29 10:01:33 +02: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
Azamat H. Hackimov
1926a77f19 Introducing git revision in source code
Git revision is generating on build time (not on configure time). In case of uncommited changes this revision will be marked as "dirty". If cmake cannot retrieve revision from git history (i.e. from packaged source code), cmake will attempt to read "git-hash.txt" from `PROJECT_SOURCE_DIR` (it will be generated on build time; after implementing packaging workflow it can be reworked).
Reworked main screen and console output to display proper version.
Version project now is 1.5.0 as previous PATCH value (500) was intended to be D3_RELEASE_BUILD_NO, autogenerated on compile time. As we switched to GIT_HASH, D3_RELEASE_BUILD_NO now useless.
2024-04-28 22:05:26 +03: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
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
Edu Garcia
066b436fd9
Revert "Cfile module update" 2024-04-19 13:57:55 +01:00
Azamat H. Hackimov
9b45091633 Rename/move cfile related files
Rename to lowercase and move headers to own directory.
2024-04-19 00:17:15 +03:00
Thomas Otto
b909a4cf43 Convert min/max macros to std::min/max
Added explicit <float> or <int> template argument where needed.
Add -DNOMINMAX define for Windows.
2024-04-17 21:43:38 +02:00
Louis Gombert
4247f30c3d
Merge pull request #21 from th1000s/misc_linux
Linux build fixes: remove unused osMutex code and typedefs
2024-04-17 18:46:42 +00:00
InsanityBringer
a2ecc2f542 Change main database registry hive to HKEY_CURRENT_USER 2024-04-16 20:04:20 -05:00
Thomas Otto
b58d3585bd Remove unused osMutex code
It was never Acquire'd, only Created and Destroyed; and it was
a stub on Linux and macOS.
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
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
Edu Garcia
8e350a6c5d minimal changes for compilation (including linking) under Windows 2024-04-16 14:45:15 +01:00
Kevin Bentley
84e25b0b41 Add missing windows specific code and disabled the arch filters in gitignore. 2024-04-16 07:21:10 -06:00