Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tkzv/OpenXcom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: MeridianOXC/OpenXcom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing 569 changed files with 51,112 additions and 46,254 deletions.
16 changes: 7 additions & 9 deletions .astylerc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
style=allman
indent=tab
pad-oper
pad-header
unpad-paren
fill-empty-lines
add-brackets
align-pointer=name
mode=c
style=allman
indent=tab
pad-oper
pad-header
unpad-paren
align-pointer=name
mode=c
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
BasedOnStyle: LLVM,
Standard: c++03,
ColumnLimit: 0,
UseTab: ForContinuationAndIndentation,
IndentWidth: 4,
TabWidth: 4,
BreakBeforeBraces: Allman,
FixNamespaceComments: false,
PointerAlignment: Right,
# EmptyLineAfterAccessModifier: Never,
}
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ root = true
; Broken in Visual Studio
;charset = utf-8
trim_trailing_whitespace = true
vc_generate_documentation_comments = doxygen_slash_star

[*.{yml,rul}]
indent_style = space
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.h text
*.rc text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
*.vcxproj* text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.gif binary
14 changes: 14 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Before reporting a bug, please check what isn't a bug: https://openxcom.org/bug-tracker/
Include the following information, if applicable:
* IMPORTANT: Step-by-step to reproduce the bug. We need to be able to reproduce the bug to fix it! Savegames are appreciated.
* Complete description of the bug: what went wrong, when did it happen, what were you doing, what was the game doing, etc.
* Any relevant error messages, openxcom.log, screenshots, etc.
* If you were using mods, narrow down the broken mod(s) and report it to the mod author first.
You can attach files by dragging-and-dropping them here.
-->
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Guidelines for pull requests:
* Use a separate branch (instead of "master"). This will save you a lot of headaches: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
* Only one feature/fix per pull request (unless they're connected).
* Try to follow our coding conventions: https://www.ufopaedia.org/index.php/Coding_Style_(OpenXcom)
* Explain in detail what your pull request is changing and why we want it.
We're very conservative about adding new features to OpenXcom. The bigger the change, the more it's gonna cost us in complexity and maintenance. Gameplay-critical code is very sensitive to changes and prone to bugs. Once it's merged it's our responsibility. So it's not enough that "it works", it needs to justify its cost. Is it a highly-demanded must-have feature? Has it been throughly tested? Will we regret merging it? Etc.
GitHub isn't a good discussion board, only developers look at this, so it's better to post in the forums first to gauge interest before doing any major changes: https://openxcom.org/forum/
-->
115 changes: 115 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: CI
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }} (${{ matrix.compiler }})

strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
packages: libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libyaml-cpp-dev
compiler: gcc
cpp-compiler: g++

- name: Linux
os: ubuntu-latest
packages: libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libyaml-cpp-dev
compiler: clang
cpp-compiler: clang++

- name: Windows
os: windows-latest
compiler: cl
cpp-compiler: cl
cmake-args: -A Win32
build-args: "/clp:NoSummary"

- name: macOS
os: macOS-latest
packages: yaml-cpp sdl sdl_gfx ./scripts/Formula/sdl_image.rb ./scripts/Formula/sdl_mixer.rb
compiler: clang
cpp-compiler: clang++
app-bundle: openxcom.app # all other builds default to bin/

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install packages (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install ccache ${{ matrix.packages }}
- name: Install packages (Windows)
if: runner.os == 'Windows' && matrix.packages
run: |
choco install ${{ matrix.packages }}
- name: Install packages (macOS)
if: runner.os == 'macOS'
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: |
brew install ccache ${{ matrix.packages }}
- name: Setup Cache
if: runner.os == 'Linux' || runner.os == 'macOS'
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-${{ matrix.compiler }}

- name: Setup environment
shell: bash
run: |
echo "describe=$(git describe)" >> $GITHUB_ENV
if [ "${{ matrix.name }}" != "Windows" ]; then
echo "MAYBE_SUDO=sudo" >> $GITHUB_ENV
fi
echo "CMAKE_BUILD_PARALLEL_LEVEL=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 2`" >> $GITHUB_ENV
- name: Download dependencies (Windows)
if: runner.os == 'Windows'
run: |
Invoke-WebRequest -Uri "https://openxcom.org/download/dev/openxcom-deps-win-vc2017.zip" -OutFile "openxcom-deps-win-vc2017-newest.zip"
Expand-Archive -Path "openxcom-deps-win-vc2017-newest.zip"
Copy-Item -Recurse -Path "openxcom-deps-win-vc2017-newest\deps\*" -Destination "deps"
- name: Generate project files
run: |
cmake -B ${{ matrix.build-dir || 'build' }} ${{ matrix.build-src-dir || '.' }} -DCMAKE_BUILD_TYPE=Debug -DENABLE_WARNING=1 -DCHECK_CCACHE=1 ${{ matrix.cmake-args }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cpp-compiler }}

- name: Compile source code
run: |
cmake --build ${{ matrix.build-dir || 'build' }} -v --config ${{ matrix.build-config || 'Debug' }} -- ${{ matrix.build-args }}
# Note, this is bogus on MacOS, as it installs shaders et al twice.
# Windows installs under C:/Program Files (x86)/OpenXcom/bin (where the
# 'bin' is pretty redundant) and Linux installs under various dirs under
# /usr/local
- name: Make install
shell: bash
run: |
$MAYBE_SUDO cmake --build ${{ matrix.build-dir || 'build' }} -v --config ${{ matrix.build-config || 'Debug' }} --target install
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: openxcom_${{ matrix.name }}_${{ matrix.compiler }}-${{ env.describe }}
path: |
${{ matrix.build-dir || 'build' }}/${{ matrix.app-bundle || 'bin' }}/**/*
- name: ccache stats
if: runner.os == 'Linux' || runner.os == 'macOS'
run: ccache -s --max-size=390MB
Loading