Skip to content

Commit

Permalink
Merge pull request #16 from CleverRaven/master
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
Maleclypse authored Apr 14, 2020
2 parents ea82db7 + 48fe4ed commit 2c85d39
Show file tree
Hide file tree
Showing 1,202 changed files with 45,613 additions and 18,281 deletions.
29 changes: 9 additions & 20 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
version: '{branch}.{build}'
os: Windows
clone_folder: C:\Projects\Cataclysm-DDA
image: Visual Studio 2019
configuration: Release
platform: x64
shallow_clone: true
pull_requests:
do_not_increment_build_number: false
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PROJECT: /msvc-full-features/Cataclysm-vcpkg-static.sln
COMPILER: msvc2017
TOOLCHAIN: msvc15
PLATFORM: x64
CONFIGURATION: Release
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
fast_finish: false
cache:
- 'c:\tools\vcpkg\installed'
clone_folder: C:\Projects\Cataclysm-DDA
install:
# Install dependency packages
- cmd: vcpkg --triplet %PLATFORM%-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
- cmd: vcpkg --triplet x64-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
cache: c:\tools\vcpkg\installed\
build:
parallel: true
project: /msvc-full-features/Cataclysm-vcpkg-static.sln
parallel: true
verbosity: minimal
test_script:
- cmd: Cataclysm-test-vcpkg-static-Release-x64.exe --rng-seed time
3 changes: 1 addition & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ readability-*,\
-readability-named-parameter,\
-readability-redundant-control-flow,\
-readability-redundant-declaration,\
-readability-redundant-preprocessor,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test).*'
HeaderFilterRegex: '(src|test|tools).*'
FormatStyle: none
CheckOptions:
- key: readability-uppercase-literal-suffix.NewSuffixes
Expand Down
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Automatically normalise line endings for all files
# Automatically normalize line endings for all files
# detected as text (Convert CRLF => LF).
* text=auto

# Explicitly normalise files with these extensions in
# Explicitly normalize files with these extensions in
# case Git doesn't detect them as text for some reason.
*.c text
*.cbp text
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#individuals to contribute to the mod, with the maintainers notified for reviews.

/data/mods/Aftershock/ @Malecypse @John-Candlebury
/data/mods/DinoMod/ @damien @ethankaminski @LyleSY
/data/mods/DinoMod/ @ephemeralstoryteller @damien @LyleSY
/data/mods/Graphical_Overmap/ @Kilvoctu @Larwck
/data/mods/MMA/ @Hymore246
/data/mods/No_Fungi/ @I-am-Erk
Expand All @@ -18,6 +18,7 @@
/data/mods/ruralbiome/ @I-am-Erk
/data/mods/speedydex/ @KorGgenT
/data/mods/stats_through_kills/ @KorGgenT
/data/mods/Dark-Skies-Above/ @ephemeralstoryteller

magic*.cpp @KorGgenT
magic*.h @KorGgenT
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Clang-tidy (clang-8, tiles)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-16.04
env:
CMAKE: 1
CLANG: clang++-8
COMPILER: clang++-8
CATA_CLANG_TIDY: plugin
TILES: 1
SOUND: 1
steps:
- name: checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- name: install dependencies
run: |
#sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
sudo apt-get update
sudo apt-get install libncursesw5-dev clang-8 libclang-8-dev llvm-8-dev llvm-8-tools \
libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev ccache \
gettext
- name: prepare
run: bash ./build-scripts/requirements.sh
- name: run clang-tidy
run: bash ./build-scripts/build.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ cataclysm.a

# clang tooling
compile_commands.json
.clangd

# IDA database
Cataclysm.i64
Expand Down
4 changes: 4 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disable FIXME query, in DDA it is as likely to be a future feature as a bug.
queries:
- exclude: cpp/fixme-comment

17 changes: 3 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ cache: ccache

notifications:
email: false
irc: "irc.freenode.org#Cataclysm-DDA"
use_notice: true
skip_join: true

git:
depth: 5
Expand Down Expand Up @@ -44,7 +41,7 @@ branches:
# - CMAKE=1
# - SANITIZE=address
# - LOCALIZE=0
# - A clang-tidy run
# - A clang-tidy run (now switched to GitHub workflow)
# - Tests with important mods enabled (Magiclysm, RL_Classes)
# We try to minimize the number of builds subject to those constraints.

Expand All @@ -54,7 +51,7 @@ branches:

jobs:
include:
# Initial test stage, if this fails everything else is cancelled.
# Initial test stage, if this fails everything else is canceled.
- stage: Test
# Clang is consistently the fastest to build, so use it for the initial test.
env: CLANG=clang++-3.8 MODS=--mods=RL_Classes TEST_STAGE=1 CXXFLAGS="-Wno-error=unused-command-line-argument -D__extern_always_inline='extern __always_inline'"
Expand Down Expand Up @@ -114,20 +111,12 @@ jobs:
directories:
- $HOME/.ccache

- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1 BREWGETTEXT=1
name: "Xcode 10.1 Make build with Tiles and sound (macOS)"
os: osx
osx_image: xcode10.1
compiler: clang

- env: CLANG=clang++-8 TILES=1 SOUND=1 CXXFLAGS=-Wno-unused-command-line-argument CMAKE=1 CATA_CLANG_TIDY=plugin
name: "Clang-tidy CMake build with Tiles and Sound"
compiler: clang
addons: &clang8
apt:
packages: ["clang-8", "libclang-8-dev", "llvm-8-dev", "llvm-8-tools", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev", "libpulse-dev", "libpulse0=1:8.0-0ubuntu3.10", "libpulse-mainloop-glib0=1:8.0-0ubuntu3.10"]
sources: [*apt_sources, llvm-toolchain-xenial-8]

# Finally check the compiler variants
- stage: compilers
# GCC 5.4 is default on Xenial
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ ADD_DEFINITIONS(-DCMAKE)

if (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND)
string(REPLACE "-NOTFOUND" "" GIT_VERSION ${GIT_VERSION})
FILE(WRITE ${CMAKE_SOURCE_DIR}/src/version.h "\#define VERSION \"${GIT_VERSION}\"\n")
FILE(WRITE ${CMAKE_SOURCE_DIR}/src/version.h
"// NOLINT(cata-header-guard)\n\#define VERSION \"${GIT_VERSION}\"\n")
MESSAGE(STATUS "${PROJECT_NAME} build version is : ${GIT_VERSION}\n")
ADD_DEFINITIONS(-DGIT_VERSION)
ELSE (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND)
Expand Down Expand Up @@ -240,9 +241,10 @@ ELSE()
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES Windows)
SET(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls")
ENDIF()
SET(CATA_OTHER_FLAGS "${CATA_OTHER_FLAGS} -fsigned-char")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS} ${CATA_OTHER_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
ENDIF()

Expand Down
6 changes: 3 additions & 3 deletions CMakeModules/FindCurses.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if(NOT CURSES_USE_NCURSES)
get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)

# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload a cache wqith these variables set
# FORCE must not be used since this would break builds which preload a cache with these variables set
set(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}"
CACHE FILEPATH "The curses include path")
set(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}"
Expand All @@ -113,7 +113,7 @@ else()
# FORCE must not be used since this would break builds which preload
# however if the value of the variable has NOTFOUND in it, then
# it is OK to force, and we need to force in order to have it work.
# a cache wqith these variables set
# a cache with these variables set
# only put ncurses include and library into
# variables if they are found
if(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
Expand Down Expand Up @@ -155,7 +155,7 @@ find_library(CURSES_FORM_LIBRARY form )

# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload a cache
# qith these variables set
# with these variables set
set(FORM_LIBRARY "${CURSES_FORM_LIBRARY}"
CACHE FILEPATH "The curses form library")

Expand Down
4 changes: 2 additions & 2 deletions CMakeModules/FindSDL2_image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
#
#
# For backward compatiblity the following variables are also set:
# For backward compatibility the following variables are also set:
#
# ::
#
Expand Down Expand Up @@ -89,7 +89,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
REQUIRED_VARS SDL2_IMAGE_LIBRARIES SDL2_IMAGE_INCLUDE_DIRS
VERSION_VAR SDL2_IMAGE_VERSION_STRING)

# for backward compatiblity
# for backward compatibility
set(SDL2IMAGE_LIBRARY ${SDL2_IMAGE_LIBRARIES})
set(SDL2IMAGE_INCLUDE_DIR ${SDL2_IMAGE_INCLUDE_DIRS})
set(SDL2IMAGE_FOUND ${SDL2_IMAGE_FOUND})
Expand Down
4 changes: 2 additions & 2 deletions CMakeModules/FindSDL2_mixer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
#
#
# For backward compatiblity the following variables are also set:
# For backward compatibility the following variables are also set:
#
# ::
#
Expand Down Expand Up @@ -89,7 +89,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
REQUIRED_VARS SDL2_MIXER_LIBRARIES SDL2_MIXER_INCLUDE_DIRS
VERSION_VAR SDL2_MIXER_VERSION_STRING)

# for backward compatiblity
# for backward compatibility
set(SDL2MIXER_LIBRARY ${SDL2_MIXER_LIBRARIES})
set(SDL2MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS})
set(SDL2MIXER_FOUND ${SDL2_MIXER_FOUND})
Expand Down
4 changes: 2 additions & 2 deletions CMakeModules/FindSDL2_ttf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
#
#
# For backward compatiblity the following variables are also set:
# For backward compatibility the following variables are also set:
#
# ::
#
Expand Down Expand Up @@ -88,7 +88,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
REQUIRED_VARS SDL2_TTF_LIBRARIES SDL2_TTF_INCLUDE_DIRS
VERSION_VAR SDL2_TTF_VERSION_STRING)

# for backward compatiblity
# for backward compatibility
set(SDL2TTF_LIBRARY ${SDL2_TTF_LIBRARIES})
set(SDL2TTF_INCLUDE_DIR ${SDL2_TTF_INCLUDE_DIRS})
set(SDL2TTF_FOUND ${SDL2_TTF_FOUND})
Expand Down
24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ ifdef MSYSTEM
endif

# Determine JSON formatter binary name
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
ifeq ($(MSYS2), 1)
JSON_FORMATTER_BIN=tools/format/json_formatter.exe
else
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
endif
ifneq (,$(findstring mingw32,$(CROSS)))
JSON_FORMATTER_BIN=tools/format/json_formatter.exe
endif

# Enable backtrace by default
Expand Down Expand Up @@ -449,6 +451,11 @@ ifeq ($(NATIVE), osx)
LDFLAGS += -L$(LIBSDIR)/gettext/lib
CXXFLAGS += -I$(LIBSDIR)/gettext/include
endif
ifeq ($(BREWGETTEXT), 1)
# recent versions of brew will not allow you to link
LDFLAGS += -L/usr/local/opt/gettext/lib
CXXFLAGS += -I/usr/local/opt/gettext/include
endif
ifeq ($(MACPORTS), 1)
ifneq ($(TILES), 1)
CXXFLAGS += -I$(shell ncursesw6-config --includedir)
Expand Down Expand Up @@ -528,7 +535,6 @@ ifeq ($(shell git rev-parse --is-inside-work-tree),true)
endif

PKG_CONFIG = $(CROSS)pkg-config
SDL2_CONFIG = $(CROSS)sdl2-config

ifeq ($(SOUND), 1)
ifneq ($(TILES),1)
Expand Down Expand Up @@ -595,14 +601,14 @@ ifdef TILES
endif
endif
else # not osx
CXXFLAGS += $(shell $(SDL2_CONFIG) --cflags)
CXXFLAGS += $(shell $(PKG_CONFIG) sdl2 --cflags)
CXXFLAGS += $(shell $(PKG_CONFIG) SDL2_image --cflags)
CXXFLAGS += $(shell $(PKG_CONFIG) SDL2_ttf --cflags)

ifdef STATIC
LDFLAGS += $(shell $(SDL2_CONFIG) --static-libs)
LDFLAGS += $(shell $(PKG_CONFIG) sdl2 --static --libs)
else
LDFLAGS += $(shell $(SDL2_CONFIG) --libs)
LDFLAGS += $(shell $(PKG_CONFIG) sdl2 --libs)
endif

LDFLAGS += -lSDL2_ttf -lSDL2_image
Expand Down Expand Up @@ -663,8 +669,8 @@ else

# Link to ncurses if we're using a non-tiles, Linux build
ifeq ($(HAVE_PKGCONFIG),1)
CXXFLAGS += $(shell pkg-config --cflags $(NCURSES_PREFIX))
LDFLAGS += $(shell pkg-config --libs $(NCURSES_PREFIX))
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(NCURSES_PREFIX))
LDFLAGS += $(shell $(PKG_CONFIG) --libs $(NCURSES_PREFIX))
else
ifeq ($(HAVE_NCURSES5CONFIG),1)
CXXFLAGS += $(shell $(NCURSES_PREFIX)5-config --cflags)
Expand Down Expand Up @@ -846,7 +852,7 @@ version:
@( VERSION_STRING=$(VERSION) ; \
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty --match "[0-9A-Z]*.[0-9A-Z]*" ) && VERSION_STRING=$$GITVERSION ; \
[ -e "$(SRC_DIR)/version.h" ] && OLDVERSION=$$(grep VERSION $(SRC_DIR)/version.h|cut -d '"' -f2) ; \
if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then echo "#define VERSION \"$$VERSION_STRING\"" | tee $(SRC_DIR)/version.h ; fi \
if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then printf '// NOLINT(cata-header-guard)\n#define VERSION "%s"\n' "$$VERSION_STRING" | tee $(SRC_DIR)/version.h ; fi \
)

# Unconditionally create the object dir on every invocation.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Catalcysm: Dark Days Ahead
# Cataclysm: Dark Days Ahead

Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for food, equipment, or, if you are lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, who want what you have...

Expand All @@ -8,6 +8,7 @@ Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While

[![Build Status](https://travis-ci.org/CleverRaven/Cataclysm-DDA.svg?branch=master)](https://travis-ci.org/CleverRaven/Cataclysm-DDA)
[![Coverage Status](https://coveralls.io/repos/github/CleverRaven/Cataclysm-DDA/badge.svg?branch=master)](https://coveralls.io/github/CleverRaven/Cataclysm-DDA?branch=master)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/CleverRaven/Cataclysm-DDA.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/CleverRaven/Cataclysm-DDA/context:cpp)
[![Open Source Helpers](https://www.codetriage.com/cleverraven/cataclysm-dda/badges/users.svg)](https://www.codetriage.com/cleverraven/cataclysm-dda)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/CleverRaven/Cataclysm-DDA)](https://github.com/CleverRaven/Cataclysm-DDA/graphs/contributors)
[![Lines of Code](https://tokei.rs/b1/github/CleverRaven/Cataclysm-DDA?category=code)](https://github.com/XAMPPRocky/tokei)
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ deps=./deps.zip
# You can override this from the command line by passing "-Poverride_version=#"
override_version=

# This property controls path where overriden version number header should be generated
# This property controls path where overridden version number header should be generated
# You can override this from the command line by passing "-Pversion_header_path=#"
version_header_path=app/jni/src/version.h

Expand Down
Loading

0 comments on commit 2c85d39

Please sign in to comment.