-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix all cppcheck and -Wall compiler warnings (#19)
* fix all compiler warnings, pt 1 * fix all compiler warnings, pt 2 * fix all compiler warnings, pt 3 * fix all cppcheck warnings * fix all compiler warnings, pt 4 * add Travis CI * git update-index --chmod=+x ./.travis.sh * switch Travis CI template to C++ * fix ignoring return value of read() * fix ignoring return value of read(), pt 2 * fix ignoring return value of fread(), pt 1 * fix output between x and y bytes into a destination of size z * remove license-mame.txt, we are not using code under this license anymore * organize all available statetype variables in a states[] array (#17) * organize all available statetype variables in a states[] array This replaces the current relying on a specific order in which global variables are stored in the executable for e.g. saving and restoring of savegames and thus does not require the -fno-toplevel-reorder compiler flag anymore. Fixes #15. * add the files containing the states[] array * simplify pointer arithmetics in SaveTheGame()/LoadTheGame() * display a message and quit the game when an invalid savegame is loaded There is currently no other way to "unload" the savegame. * back to main menu on failure instead of quitting * add copyright headers to newly added files * prevent crashes for subsequent games when loading invalid savegame * add some minimalistic comments * fix all compiler warnings, pt 1 * fix all compiler warnings, pt 2 * fix all compiler warnings, pt 3 * fix all cppcheck warnings * fix all compiler warnings, pt 4 * add Travis CI * git update-index --chmod=+x ./.travis.sh * switch Travis CI template to C++ * fix ignoring return value of read() * fix ignoring return value of read(), pt 2 * fix ignoring return value of fread(), pt 1 * fix output between x and y bytes into a destination of size z * unbreak rebase breakage * fix some more "ignoring return value of read()/write()/fread()" warnings * fix "ignoring return value of read()" in wl_menu.cpp * fix some misc errors * fix SOD compilation * fix "the current #pragma pack aligment value is modified" warning with clang++ * let Travis CI build 6 separate binaries * include wl_def.h in dosbox/dbopl.cpp instead of setting "#pragma pack()" there
- Loading branch information
1 parent
f7e2b2c
commit 78cc9d6
Showing
24 changed files
with
411 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
if [ "$ANALYZE" = "true" ] ; then | ||
cppcheck -DO_BINARY=0 -DDEBUGKEYS -DARTSEXTERN -DDEMOSEXTERN -DPLAYDEMOLIKEORIGINAL \ | ||
-UUSE_FEATUREFLAGS -UUSE_SHADING -UUSE_DIR3DSPR -UUSE_FLOORCEILINGTEX -UUSE_HIRES \ | ||
-UUSE_PARALLAX -UUSE_CLOUDSKY -UUSE_STARSKY -UUSE_RAIN -UUSE_SNOW -UFIXRAINSNOWLEAKS \ | ||
-UGP2X -UGP2X_940 -U_arch_dreamcast -USPANISH -UNOTYET \ | ||
--error-exitcode=1 --force -Idosbox . 2> stderr.txt | ||
RET=$? | ||
if [ -s stderr.txt ] | ||
then | ||
cat stderr.txt | ||
fi | ||
exit $RET | ||
else | ||
set -e | ||
|
||
export Q="" | ||
export CFLAGS="-Werror" | ||
|
||
echo "Wolf3d Full v1.4 GT/ID/Activision" | ||
make BINARY=wolf4sdl-wl6 | ||
make clean | ||
|
||
echo "Wolf3d Full v1.4 Apogee (with ReadThis)" | ||
sed -e "s|^\(//\)\?\(#define GOODTIMES\)|//\2|" -i version.h | ||
make BINARY=wolf4sdl-wl6a | ||
make clean | ||
|
||
echo "Wolf3d Full v1.1 Apogee (with ReadThis)" | ||
sed -e "s|^\(//\)\?\(#define APOGEE_1_1\)|\2|" -i version.h | ||
make BINARY=wolf4sdl-wl6a1 | ||
make clean | ||
|
||
echo "Wolf3d Shareware v1.4" | ||
sed -e "s|^\(//\)\?\(#define APOGEE_1_1\)|//\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define UPLOAD\)|\2|" -i version.h | ||
make BINARY=wolf4sdl-wl1 | ||
make clean | ||
|
||
echo "Spear of Destiny Full and Mission Disks (and GOODTIMES for no FormGen quiz)" | ||
sed -e "s|^\(//\)\?\(#define UPLOAD\)|//\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define SPEAR\)|\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define GOODTIMES\)|\2|" -i version.h | ||
make BINARY=wolf4sdl-sod | ||
make clean | ||
|
||
echo "Spear of Destiny Demo" | ||
sed -e "s|^\(//\)\?\(#define GOODTIMES\)|//\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define SPEARDEMO\)|\2|" -i version.h | ||
make BINARY=wolf4sdl-sdm | ||
make clean | ||
|
||
sed -e "s|^\(//\)\?\(#define SPEAR\)|//\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define SPEARDEMO\)|//\2|" -i version.h | ||
sed -e "s|^\(//\)\?\(#define GOODTIMES\)|\2|" -i version.h | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
language: cpp | ||
|
||
cache: ccache | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
sudo: required | ||
dist: bionic | ||
|
||
matrix: | ||
include: | ||
- compiler: gcc | ||
env: ANALYZE=true | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- cppcheck | ||
- libsdl2-dev | ||
- libsdl2-mixer-dev | ||
|
||
script: ./.travis.sh | ||
|
||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.