D3 used to support Aureal 3-Dimensional sound cards, providing 3D spatial audio. The hardware and drivers is outdated, so all support in code has been removed, including UI mixer setting.
Read more about A3D here: https://en.wikipedia.org/wiki/Aureal_Semiconductor#A3D
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.
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.
* 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.
This is all in unused/unnecessary/leftover code, but the code wouldn't
build without Xlib headers on the system, which was forcing the Mac builds
to install xquartz.
This also removes renderer/SoftwareOpenGL*, which was _not_ a
software-rendered OpenGL, but just an older version of the same code that's
in HardwareOpenGL.cpp--old enough to still talk to glX directly, which is
what caught my attention.
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.
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.
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
```
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
```
Other modules that depends on it, can reuse includes on linking.
There some files formally not belonging any packages (lib directory), as workaround there temporary include_directories(cfile) on root of project. After migrating all modules this can be removed.
Implementing byteswap functions by using "backported" from C++23 std::byteswap.
Adding unittests based on GoogleTests. To enable it add `-DBUILD_TESTING=ON` to cmake.
Re-enable console logging on linux and mac builds with the -DMONO
option.
Rename overloaded Debug_ConsolePrintf function to
Debug_ConsolePrintfAt to fix macro expansion.
Adds -DLOGGER alias for -DMONO.
Implements #157
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.
Linux-specific byteswap.h just includes BYTESWAP.H, so there no need platform-specific header.
Fixes "non-portable path to file" ([-Wnonportable-include-path]) warnings.