Skip to content

Commit

Permalink
Merge branch 'master' into battery_additions_and_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Inglonias authored May 17, 2019
2 parents 4fd4060 + e386936 commit a398013
Show file tree
Hide file tree
Showing 436 changed files with 27,492 additions and 81,035 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: 'clang-diagnostic-*,-clang-analyzer-deadcode.DeadStores,-clang-analyzer-security.FloatLoopCounter,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.NullDereference'
Checks: 'clang-diagnostic-*,-clang-analyzer-security.FloatLoopCounter,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.NullDereference'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
FormatStyle: none
Expand Down
47 changes: 37 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,56 @@ name: Bug report
about: Create a report to help us improve

---
<!-- Please follow the template below -->

# Describe the bug

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**

# Steps To Reproduce

Steps to reproduce the behavior:
1. Make a player with a gun, magazine, and some ammo.
2. Try to aim at a wall.
3. There's no way to increase aim level.

**Expected behavior**
A clear and concise description of what you expected to happen.

# Expected behavior

A clear and concise description of what you expected to happen.
Ideally also describe *why* you expect it to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Versions and configuration(please complete the following information):**
# Screenshots

**If applicable**, add screenshots to help explain your problem.

<!-- Do not take a screenshot of the crashing window. Please provide the crash logs in the "Additional context" -->

# Versions and configuration

<!-- Please complete the following information; you can now go to:
- "Main menu (ESC) > Debug Menu > Info > Generate game report" to generate this report.
- Please update your OS version with a more precise version. -->

- OS: [e.g. iOS 8 or Windows 10 or Ubuntu 18.04]
- Game Version: [from the main menu, e.g. 0.C-29938-g90f5268437]
- Graphics version: [Tiles or Terminal]
- Mods loaded: [e.g.dda, boats, hacktheplanet, StatsThroughSkills]

**Additional context**
Add any other context about the problem here.
E.g. A link to a savegame that allows the issue to be reproduced.

# Additional context

Add any other context about the problem here.

<!-- Crash: if your problem refers to a crash, please add the following files to the "Additional Context" paragraph:
- From the /config folder (you can zip them both together):
- crash.log file.
- debug.log file.
- Your save file (zipped)
- note #1: you can drag and drop files in this issue post!
- note #2: it is very important for us that you provide a save file in case of a crash. It really helps the developers
to reproduce the bug and fix it. If possible, try to provide a save file that occurs in the right conditions, just
before the crash happens. -->
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ logg.txt
*.ilk
*.opensdf
*.pdb
*.lib
*.sdf
*.suo
*.user
Expand Down Expand Up @@ -170,3 +171,8 @@ Xcode/

# gdb
.gdb_history

# Flatpak build artifacts
/.flatpak-builder/
/repo/
/build-dir/
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ jobs:
sources: *apt_sources

# GCC 8
- env: COMPILER=g++-8 CXXFLAGS='-Wno-implicit-fallthrough'
# Also, adding _GLIBCXX_DEBUG so that one build can test with that
- env: COMPILER=g++-8 CXXFLAGS='-Wno-implicit-fallthrough -D_GLIBCXX_DEBUG'
compiler: gcc
addons: &gcc8
apt:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ IF(MSVC)
add_definitions(-D_X86_)
endif()
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wall -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g -D_GLIBCXX_DEBUG")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wall -std=c++14")
SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
ENDIF()

# Force out-of-source build
Expand Down
34 changes: 34 additions & 0 deletions COMPILING-FLATPAK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Compiling Guide for Linux (Flatpak)

## Prerequisites

- Install `flatpak` and `flatpak-builder` from your distribution's package manager.
- Install `freedesktop-platform` & `freedesktop-sdk` using `flatpak install flathub org.freedesktop.Platform//18.08 org.freedesktop.Sdk//18.08`

## Build

Clone the source code and run `flatpak-builder --repo=repo --ccache --force-clean build-dir org.Cataclysm.DDA.json` or `flatpak-builder --repo=repo --ccache --force-clean build-dir org.Cataclysm.DDA.Tiles.json` to build the ncurses or tiles version of the application.

## Installation

Run `flatpak --user install test-repo org.Cataclysm.DDA` (or) `flatpak --user install test-repo org.Cataclysm.DDA.Tiles` to install the game.
Note: If you are installing the game for first time you will have to set up local repo. Run this `flatpak --user remote-add --no-gpg-verify test-repo repo`

## Starting the game

`flatpak run org.Cataclysm.DDA` (or) `flatpak run org.Cataclysm.DDA.Tiles`
**or**
Launch the Game from Applications -> Games -> Cataclysm: Dark Days Ahead (or) Cataclysm: Dark Days Ahead - Tiles.
**Note**: For the ncurses version, terminal will just show a blank screen on launch. Just press any button to start the game.

## Permissions

- **Ncurses version**
- Home Directory
- **Tiles Version**
- Home Directory
- Wayland
- Fallback-X11 - (incase Wayland doesn't work)
- IPC - (Required for X11)
- PulseAudio
- DRI
27 changes: 16 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ WARNINGS = -Wall -Wextra
# Uncomment below to disable warnings
#WARNINGS = -w
DEBUGSYMS = -g
ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Cygwin)
DEBUG =
else
DEBUG = -D_GLIBCXX_DEBUG
endif
#PROFILE = -pg
#OTHERS = -O3
#DEFINES = -DNDEBUG
Expand Down Expand Up @@ -150,6 +145,11 @@ ifndef RUNTESTS
RUNTESTS = 1
endif

# Auto-detect MSYS2
ifdef MSYSTEM
MSYS2 = 1
endif

# Enable backtrace by default
ifndef BACKTRACE
# ...except not on native Windows builds, because the relevant headers are
Expand Down Expand Up @@ -307,9 +307,9 @@ ifndef RELEASE
endif

ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Cygwin)
OTHERS += -std=gnu++11
OTHERS += -std=gnu++14
else
OTHERS += -std=c++11
OTHERS += -std=c++14
endif

CXXFLAGS += $(WARNINGS) $(DEBUG) $(DEBUGSYMS) $(PROFILE) $(OTHERS) -MMD -MP
Expand Down Expand Up @@ -997,23 +997,28 @@ else
@echo Cannot run an astyle check, your system either does not have astyle, or it is too old.
endif

JSON_FILES = $(shell find data -name *.json | sed "s|^\./||")
JSON_FILES = $(shell find data -name "*.json" | sed "s|^\./||")
JSON_WHITELIST = $(filter-out $(shell cat json_blacklist), $(JSON_FILES))
ifeq ($(MSYS2), 1)
JSON_FORMATTER_BIN=tools/format/json_formatter.exe
else
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
endif

style-json: $(JSON_WHITELIST)

$(JSON_WHITELIST): json_blacklist json_formatter
ifndef CROSS
@tools/format/json_formatter.cgi $@
@$(JSON_FORMATTER_BIN) $@
else
@echo Cannot run json formatter in cross compiles.
endif

style-all-json: json_formatter
find data -name "*.json" -print0 | xargs -0 -L 1 tools/format/json_formatter.cgi
find data -name "*.json" -print0 | xargs -0 -L 1 $(JSON_FORMATTER_BIN)

json_formatter: tools/format/format.cpp src/json.cpp
$(CXX) $(CXXFLAGS) -Itools/format -Isrc tools/format/format.cpp src/json.cpp -o tools/format/json_formatter.cgi
$(CXX) $(CXXFLAGS) -Itools/format -Isrc tools/format/format.cpp src/json.cpp -o $(JSON_FORMATTER_BIN)

tests: version $(BUILD_PREFIX)cataclysm.a
$(MAKE) -C tests
Expand Down
1 change: 1 addition & 0 deletions SIGNOFF
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Patrik Stridvall <[email protected]>
Ryan Schneider (RadHazard) <[email protected]>
Paul Bransford (draeath) <[email protected]>
Mark Langsdorf (mlangsdorf) <[email protected]> / <[email protected]>
Ratul Saha (sahaRatul) <[email protected]> / <[email protected]>
Davis Bray (Kaltag1925) <[email protected]>
14 changes: 11 additions & 3 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,18 @@ then
fi
else
make -j "$num_jobs" RELEASE=1 CCACHE=1 BACKTRACE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0
run_tests ./tests/cata_test &
if [ -n "$MODS" ]

run_tests ./tests/cata_test
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
run_tests ./tests/cata_test $MODS &
run_tests ./tests/cata_test
else
run_tests ./tests/cata_test &
if [ -n "$MODS" ]
then
run_tests ./tests/cata_test $MODS &
wait -n
fi
wait -n
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/lint-json.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find . -name *json -type f -exec python -m json.tool {} >/dev/null \;
find . -name "*json" -type f -exec python -m json.tool {} >/dev/null \;
Loading

0 comments on commit a398013

Please sign in to comment.