Skip to content

Commit 4c94542

Browse files
authored
Merge pull request #1 from scp-fs2open/master
Updating
2 parents 44c9fc2 + 5445552 commit 4c94542

187 files changed

Lines changed: 9743 additions & 4309 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ misc-*,\
1111
-misc-macro-parentheses,\
1212
-misc-misplaced-widening-cast,\
1313
-misc-static-assert,\
14+
-misc-unused-parameters,\
1415
-modernize-make-unique,\
1516
"
1617
WarningsAsErrors: ''

.github/workflows/pr-workflow.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
strategy:
88
matrix:
99
configuration: [Debug, Release]
10-
compiler: [gcc-5, gcc-8, clang-4.0]
11-
name: Check Linux compilation
10+
compiler: [gcc-5, gcc-9, clang-4.0]
11+
name: Linux
1212
runs-on: ubuntu-16.04
1313
steps:
1414
- name: Prepare Environment
@@ -19,7 +19,7 @@ jobs:
1919
sudo add-apt-repository ppa:beineri/opt-qt571-xenial
2020
sudo add-apt-repository ppa:msulikowski/valgrind # For fixing a bug with valgrind 3.11 which does not recognize the rdrand instruction
2121
sudo apt-get -yq update
22-
sudo apt-get -yq install cmake ninja-build libopenal-dev libreadline6-dev libpng12-dev libjpeg62-dev liblua5.1-0-dev libjansson-dev libsdl2-dev libfreetype6-dev valgrind qt57base g++-5 g++-8 clang-4.0 clang-tidy-4.0 libc++-dev libc++abi-dev
22+
sudo apt-get -yq install cmake ninja-build libopenal-dev libreadline6-dev libpng12-dev libjpeg62-dev liblua5.1-0-dev libjansson-dev libsdl2-dev libfreetype6-dev valgrind qt57base g++-5 g++-9 clang-4.0 clang-tidy-4.0 libc++-dev libc++abi-dev
2323
# Fix a header bug present in ubuntu...
2424
sudo ln -s /usr/include/libcxxabi/__cxxabi_config.h /usr/include/c++/v1/__cxxabi_config.h
2525
- uses: actions/checkout@v1
@@ -35,9 +35,9 @@ jobs:
3535
export CC=gcc-5
3636
export CXX=g++-5
3737
fi
38-
if [ "$COMPILER" = "gcc-8" ]; then
39-
export CC=gcc-8
40-
export CXX=g++-8
38+
if [ "$COMPILER" = "gcc-9" ]; then
39+
export CC=gcc-9
40+
export CXX=g++-9
4141
fi
4242
if [ "$COMPILER" = "clang-4.0" ]; then
4343
export CC=clang-4.0
@@ -85,7 +85,7 @@ jobs:
8585
- configuration: Release
8686
compiler: MinGW
8787
arch: x64
88-
name: Check Windows compilation
88+
name: Windows
8989
runs-on: windows-2019
9090
steps:
9191
- name: Prepare Environment
@@ -120,9 +120,18 @@ jobs:
120120
run: |
121121
if [ "$COMPILER" = "MinGW" ]; then
122122
cmake --build . --config "$CONFIGURATION"
123-
./bin/unittests --gtest_shuffle
124123
else
125124
cmake --build . --config "$CONFIGURATION" -- /verbosity:minimal
125+
fi
126+
- name: Run Tests
127+
working-directory: ./build
128+
env:
129+
CONFIGURATION: ${{ matrix.configuration }}
130+
COMPILER: ${{ matrix.compiler }}
131+
shell: bash
132+
run: |
133+
if [ "$COMPILER" = "MinGW" ]; then
134+
./bin/unittests --gtest_shuffle
135+
else
126136
"./bin/$CONFIGURATION/unittests" --gtest_shuffle
127137
fi
128-

.travis.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: bash
22
sudo: required
3-
dist: trusty
3+
dist: xenial
44
cache:
55
directories:
66
- $HOME/cmake-3.8
@@ -18,7 +18,6 @@ addons:
1818
- libjansson-dev
1919
- libsdl2-dev
2020
- libfreetype6-dev
21-
- valgrind
2221
- qt57base
2322
coverity_scan:
2423
project:
@@ -73,33 +72,34 @@ matrix:
7372
apt:
7473
sources:
7574
- ubuntu-toolchain-r-test
76-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
75+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
7776
packages:
7877
- *global_deps
7978
- g++-5
8079
- os: linux
81-
env: CONFIGURATION="Debug" CC=gcc-8 CXX=g++-8
80+
env: CONFIGURATION="Debug" CC=gcc-9 CXX=g++-9
8281
addons:
8382
apt:
8483
sources:
8584
- ubuntu-toolchain-r-test
86-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
85+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
8786
packages:
88-
- g++-8
87+
- g++-9
8988
- *global_deps
9089
- os: linux
9190
env: CONFIGURATION="Debug" CC=clang-4.0 CXX=clang++-4.0 CMAKE_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
9291
addons:
9392
apt:
9493
sources:
9594
- ubuntu-toolchain-r-test
96-
- llvm-toolchain-trusty-4.0
97-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
95+
- llvm-toolchain-xenial-8
96+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
9897
packages:
9998
- *global_deps
10099
- clang-4.0
101-
- clang-tidy-4.0
100+
- clang-tidy-8
102101
- libc++-dev
102+
- libc++abi-dev
103103
script:
104104
- ./ci/travis/script.sh
105105
- ./ci/travis/clang_tidy.sh
@@ -117,32 +117,33 @@ matrix:
117117
apt:
118118
sources:
119119
- ubuntu-toolchain-r-test
120-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
120+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
121121
packages:
122122
- *global_deps
123123
- g++-5
124124
- os: linux
125-
env: CONFIGURATION="Release" CC=gcc-8 CXX=g++-8
125+
env: CONFIGURATION="Release" CC=gcc-9 CXX=g++-9
126126
addons:
127127
apt:
128128
sources:
129129
- ubuntu-toolchain-r-test
130-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
130+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
131131
packages:
132-
- g++-8
132+
- g++-9
133133
- *global_deps
134134
- os: linux
135135
env: CONFIGURATION="Release" CC=clang-4.0 CXX=clang++-4.0
136136
addons:
137137
apt:
138138
sources:
139139
- ubuntu-toolchain-r-test
140-
- llvm-toolchain-trusty-4.0
141-
- sourceline: 'ppa:beineri/opt-qt571-trusty'
140+
- llvm-toolchain-xenial-4
141+
- sourceline: 'ppa:beineri/opt-qt571-xenial'
142142
packages:
143143
- *global_deps
144144
- clang-4.0
145145
- libc++-dev
146+
- libc++abi-dev
146147
- os: osx
147148
env: CONFIGURATION="Release"
148149

ci/travis/before_install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
set -ex
44

55
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
6-
# Nothing to do here
7-
:
6+
export DEBIAN_FRONTEND=noninteractive
7+
8+
sudo add-apt-repository -y "ppa:msulikowski/valgrind" # For fixing a bug with valgrind 3.11 which does not recognize the rdrand instruction
9+
sudo apt-get -yq update
10+
sudo apt-get -yq install valgrind
811
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
912
# Nothing to do here
1013
:

ci/travis/clang_tidy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "Running clang-tidy on changed files"
1313
git diff -U0 --no-color $TRAVIS_COMMIT_RANGE | \
1414
$TRAVIS_BUILD_DIR/ci/travis/clang-tidy-diff.py -path "$TRAVIS_BUILD_DIR/build" -p1 \
1515
-regex 'code/.*$|freespace2/.*$|qtfred/.*$|test/src/.*$|build/.*$|tools/.*' \
16-
-clang-tidy-binary /usr/bin/clang-tidy-4.0 2>/dev/null | \
16+
-clang-tidy-binary /usr/bin/clang-tidy-8 2>/dev/null | \
1717
tee clang-tidy-output.txt
1818

1919
if [[ -n $(grep "warning: " clang-tidy-output.txt) ]] || [[ -n $(grep "error: " clang-tidy-output.txt) ]]; then

ci/travis/install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
set -ex
44

@@ -11,7 +11,7 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
1111
wget -O /tmp/cmake.tar.gz --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz
1212
tar -xzf /tmp/cmake.tar.gz -C $HOME/cmake-3.8/ --strip-components=1
1313
fi
14-
export PATH=$HOME/cmake-3.8/bin:$PATH
14+
export PATH=$HOME/cmake-3.8/bin:$PATH
1515

1616
cd $HOME
1717

@@ -22,6 +22,11 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
2222
wget -O linuxdeployqt -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" # (64-bit)
2323
chmod a+x ./linuxdeployqt
2424
fi
25+
26+
if [[ "$CC" =~ ^clang.*$ ]]; then
27+
# Fix a header bug present in ubuntu...
28+
sudo ln -s /usr/include/libcxxabi/__cxxabi_config.h /usr/include/c++/v1/__cxxabi_config.h
29+
fi
2530
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
2631
gem install xcpretty
2732

ci/travis/valgrind.supp

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,39 @@
126126
fun:_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
127127
fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
128128
}
129-
129+
{
130+
<insert_a_suppression_name_here>
131+
Memcheck:Leak
132+
match-leak-kinds: definite
133+
fun:malloc
134+
fun:_dl_signal_error
135+
fun:_dl_open
136+
fun:dlopen_doit
137+
fun:_dl_catch_error
138+
fun:_dlerror_run
139+
fun:dlopen@@GLIBC_2.2.5
140+
obj:*
141+
obj:*
142+
fun:call_init.part.0
143+
fun:call_init
144+
fun:_dl_init
145+
fun:dl_open_worker
146+
}
147+
{
148+
<insert_a_suppression_name_here>
149+
Memcheck:Leak
150+
match-leak-kinds: definite
151+
fun:malloc
152+
fun:_dl_signal_error
153+
fun:_dl_open
154+
fun:dlopen_doit
155+
fun:_dl_catch_error
156+
fun:_dlerror_run
157+
fun:dlopen@@GLIBC_2.2.5
158+
obj:*
159+
obj:*
160+
fun:call_init.part.0
161+
fun:call_init
162+
fun:_dl_init
163+
fun:dl_open_worker
164+
}

cmake/platform-win32.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SET(WIN32_LIBS
88
odbccp32
99
vfw32
1010
winmm
11-
wsock32
11+
ws2_32
1212
psapi
1313
)
1414

code/ai/ai_profiles.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,6 @@ void parse_ai_profiles_tbl(const char *filename)
517517
mprintf(("TABLES: Unable to parse '%s'! Error message = %s.\n", (filename) ? filename : "<default ai_profiles.tbl>", e.what()));
518518
return;
519519
}
520-
521-
// add tbl/tbm to multiplayer validation list
522-
extern void fs2netd_add_table_validation(const char *tblname);
523-
fs2netd_add_table_validation(filename);
524520
}
525521

526522
void ai_profiles_init()

code/ai/aicode.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "physics/physics.h"
5959
#include "playerman/player.h"
6060
#include "render/3d.h"
61+
#include "scripting/api/objs/waypoint.h"
6162
#include "scripting/api/objs/wing.h"
6263
#include "scripting/scripting.h"
6364
#include "ship/afterburner.h"
@@ -4594,8 +4595,9 @@ void ai_waypoints()
45944595
// adds scripting hook for 'On Waypoints Done' --wookieejedi
45954596
Script_system.SetHookObject("Ship", &Objects[Ships[Pl_objp->instance].objnum]);
45964597
Script_system.SetHookVar("Wing", 'o', scripting::api::l_Wing.Set(Ships[Pl_objp->instance].wingnum));
4598+
Script_system.SetHookVar("Waypointlist", 'o', scripting::api::l_WaypointList.Set(scripting::api::waypointlist_h(aip->wp_list)));
45974599
Script_system.RunCondition(CHA_ONWAYPOINTSDONE);
4598-
Script_system.RemHookVars(2, "Ship", "Wing");
4600+
Script_system.RemHookVars(3, "Ship", "Wing", "Waypointlist");
45994601
}
46004602
}
46014603
}

0 commit comments

Comments
 (0)