Commit Graph

27 Commits

Author SHA1 Message Date
C.W. Betts
d3a486ee24 Remove commented-out code. 2024-05-10 12:53:06 -06:00
C.W. Betts
3bb0caafc4 Quiet/fix a couple of static analyzer warnings as reported by Xcode. 2024-05-09 21:02:44 -06:00
Edu Garcia
f793797088
Merge pull request #325 from Arcnor/png-screenshot
Save screenshots as PNG
2024-05-09 23:22:30 +01:00
Edu García
80c207d41c save screenshots as PNG 2024-05-09 22:46:17 +01:00
Edu García
5d8affda0e small bitmap code cleanup 2024-05-09 22:43:04 +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
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
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
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
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
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
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
Edu Garcia
066b436fd9
Revert "Cfile module update" 2024-04-19 13:57:55 +01:00
Louis Gombert
21fb443cb3
Merge pull request #74 from GravisZro/fix/warnings
Fix build warnings (NULL instead of '\0')
2024-04-19 11:21:14 +00: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
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
Azamat H. Hackimov
9e6ebbc8fb Remove dublicate byteswap.h
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.
2024-04-18 03:20:36 +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
Azamat H. Hackimov
38128ea134 Additional clang-format 2024-04-17 00:25:04 +03: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