Commit Graph

77 Commits

Author SHA1 Message Date
Jeod
6f3cdd78f2
Merge pull request #321 from Arcnor/deadcode-removal5
more software renderer code removal
2024-05-09 18:15:05 -04:00
Edu García
7ccc38e64f restore renderer_type numbering to avoid issues when loading config 2024-05-09 22:58:51 +01:00
Edu Garcia
1f94e623b2
Merge pull request #315 from Arcnor/renderer-refactor
Renderer refactor
2024-05-09 13:15:22 +01:00
Edu García
fbd6350917 more software renderer code removal 2024-05-09 12:11:49 +01: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
7c362288ad [gl] extracted some common GPU rendering code (empty impls) 2024-05-08 17:47:21 +01:00
Edu García
a1900bc85b remove unused code (more Software renderer code) 2024-05-08 16:23:12 +01: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
Edu Garcia
553f851714 remove unused code 2024-05-06 22:06:26 +01:00
Edu Garcia
a26ced7d4c remove unused serial code 2024-05-06 19:01:48 +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
Jeod
52e66c3275
Merge pull request #233 from jcoby/64bit-fixes 2024-05-04 12:01:06 -04:00
Louis Gombert
d36af47214 Remove unused header dyna_svga.h 2024-05-03 19:43:41 -04:00
Louis Gombert
321145c28f Remove usage of DECLARE_POINTERS in dyna_curses.h 2024-05-03 19:43:41 -04:00
Louis Gombert
053aef798e Remove unused header dyna_pthread.h
This header is a duplicate of dyna_pthread.h in lnxmvelib/, and is never included anywhere
2024-05-03 19:43:41 -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
Azamat H. Hackimov
5aca8b7e5a Reorganizing fix library 2024-05-03 16:22:35 -04:00
Ryan C. Gordon
b5d68319d5
Use SDL_assert on Linux/Mac. 2024-05-02 08:29:23 -04:00
Louis Gombert
10832ff91d
Merge pull request #237 from winterheart/remove-ipx
Remove IPX/SPX protocol support from netcode
2024-05-01 11:31:45 +00:00
Azamat H. Hackimov
b063f40b1a
Merge pull request #207 from Nakhr11n/pstring-refactor
Refactor CleanupStr in misc/pstring.cpp
2024-05-01 00:45:03 +03:00
bperris
27eadbf66b
Merge branch 'main' into new-log-system 2024-04-30 14:38:11 -04:00
Louis Gombert
3bdbdc196f
Merge pull request #204 from winterheart/split-debug-module-v2
Move debug functions to own module
2024-04-30 18:35:00 +00:00
Bryan Perris
b0e5754e96 Introduce spdlog logging system
* The game version is now printed via the log system rather than from within the loki_initialize function.
remove this line
2024-04-30 14:27:38 -04: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
Ryan C. Gordon
f8a4cb3cc0
More X11 removal.
This is all unused stuff, just doing a more-complete purge.
2024-04-30 13:04:15 -04:00
Ryan C. Gordon
6a18afab7c
Remove references to X11 and glX.
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.
2024-04-30 12:08:03 -04: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
Jacob Coby
5775abf198 Back out lib/directplay.h 2024-04-29 17:04:48 -04:00
Jacob Coby
497ac00a61 Back out networking.h 2024-04-29 16:43:35 -04:00
Oskar Strengbohm
ee12e3a5dd misc: pstring: Improve CleanupStr. 2024-04-29 22:11:57 +02:00
Azamat H. Hackimov
b0cef3ff0e
Merge pull request #197 from Nakhr11n/pstring
Refactor and remove unnecessary in misc/pstring.cpp and dependents.
2024-04-29 22:23:48 +03:00
Jacob Coby
fbb2fcb769 Revert pstypes.h 2024-04-29 14:56:58 -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
Oskar Strengbohm
f9fdfc22e8 misc: pstring: Remove unneccesary or unused functions. 2024-04-29 09:55:45 +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
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
Oskar Strengbohm
b54d22614d misc: Remove endian.cpp and lib/psendian.h
They were not used, and a better alternative is now lib/byteswap.h
2024-04-24 17:27:21 +02:00
Edu Garcia
a4f6405cea
Merge pull request #165 from winterheart/64bit-tests
Implementing C++ byteswap functions
2024-04-23 22:49:18 +01:00
Azamat H. Hackimov
4826c37a69 Add BUILD_INTERFACE to cfile module
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.
2024-04-24 00:41:02 +03:00
Azamat H. Hackimov
c275d359c7 Reapply "Cfile module update"
This reverts commit 066b436fd9.
2024-04-24 00:40:39 +03:00
Azamat H. Hackimov
c3e0102a4f Implementing C++ byteswap functions
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.
2024-04-23 21:18:07 +03:00
Jacob Coby
96ce6d2c73 Logging updates:
* Adds CMake Option
 * Adds LOGGER to the README
 * Removes MONO define in favor of LOGGER
2024-04-23 13:53:00 -04:00
Jacob Coby
9753f8367f Enable console logging if MONO or LOGGER is defined
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
2024-04-23 09:07:20 -04:00
GravisZro
9a80863c7f Ensure STDCALL/STDCALLPTR is only invoked on x86
Prevent the code from trying to use stdcall for anything except (32-bit) x86 builds
because it's the only platform it's applicable for.
2024-04-21 22:24:50 -04:00
Daniel Gibson
94ce70bb89 AudioDecoder: Get rid of custom malloc/free functions
were never set anyway, and (the real) libacm doesn't support custom
allocators.
2024-04-21 18:25:52 +02:00