Skip to content

Commit

Permalink
Merge pull request #12 from CleverRaven/master
Browse files Browse the repository at this point in the history
Catchup
  • Loading branch information
Maleclypse authored Jan 28, 2020
2 parents 6ed5b41 + bfee67a commit 930dddf
Show file tree
Hide file tree
Showing 910 changed files with 347,453 additions and 265,200 deletions.
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ cppcoreguidelines-slicing,\
llvm-namespace-comment,\
misc-*,\
modernize-*,\
-modernize-use-auto,\
-modernize-use-trailing-return-type,\
performance-*,\
readability-*,\
-bugprone-misplaced-widening-cast,\
Expand All @@ -31,7 +33,6 @@ readability-*,\
-modernize-avoid-c-arrays,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-auto,\
-modernize-use-default-member-init,\
-modernize-use-emplace,\
-modernize-use-transparent-functors,\
Expand Down
54 changes: 17 additions & 37 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribute

**Opening new issue?** Please read [ISSUES.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/ISSUES.md) first.
**Opening new issue?** Please read [ISSUES.md](../ISSUES.md) first.

Contributing to Cataclysm: Dark Days Ahead is easy — simply fork the repository here on GitHub, make your changes, and then send us a pull request.

Expand All @@ -18,7 +18,8 @@ There are a couple of guidelines we suggest sticking to:

## Code Style

Current policy is to only update code to the standard style when changing a substantial portion of it, but **please** do this in a separate commit. See [CODE_STYLE](../doc/CODE_STYLE.md) for details.
Code style is enforced across the codebase by `astyle`.
See [CODE_STYLE](../doc/CODE_STYLE.md) for details.

## Translations

Expand Down Expand Up @@ -232,7 +233,7 @@ You can also set the tracking information at the same time as creating the branc

There is a suite of tests built into the source tree at tests/
You should run the test suite after ANY change to the game source.
An ordinary invocation of ``make`` will build the test executable at tests/cata_test, and it can be invoked like any ordinary executable.
An ordinary invocation of ``make`` will build the test executable at tests/cata_test, and it can be invoked like any ordinary executable, or via `make check`.
With no arguments it will run the entire test suite.
With ``--help`` it will print a number of invocation options you can use to adjust its operation.

Expand All @@ -245,7 +246,7 @@ With ``--help`` it will print a number of invocation options you can use to adju
Ended test at Fri Nov 9 04:37:45 2018
The test took 41.772 seconds

I recommend habitually invoking make like ``make YOUR BUILD OPTIONS && tests/cata_test``.
I recommend habitually invoking make like ``make YOUR BUILD OPTIONS && make check``.

## In-game testing, test environment and the debug menu

Expand All @@ -254,39 +255,16 @@ Whether you are implementing a new feature or whether you are fixing a bug, it i
Bring up the keybindings menu (press `Escape` then `1`), scroll down almost to the bottom and press `+` to add a new key binding. Press the letter that corresponds to the *Debug menu* item, then press the key you want to use to bring up the debug menu. To test your changes, create a new world with a new character. Once you are in that world, press the key you just assigned for the debug menu and you should see something like this:

```
┌────────────────────────────────────────────┐
│ Debug Functions - Using these is CHEATING! │
├────────────────────────────────────────────┤
│ 1 Wish for an item │
│ 2 Teleport - Short Range │
│ 3 Teleport - Long Range │
│ 4 Reveal map │
│ 5 Spawn NPC │
│ 6 Spawn Monster │
│ 7 Check game state... │
│ 8 Kill NPCs │
│ 9 Mutate │
│ 0 Spawn a vehicle │
│ a Change all skills │
│ b Learn all melee styles │
│ c Unlock all recipes │
│ d Edit player/NPC │
│ e Spawn Artifact │
│ f Spawn Clairvoyance Artifact │
│ g Map editor │
│ h Change weather │
│ i Remove all monsters │
│ j Display hordes │
│ k Test Item Group │
│ l Damage Self │
│ m Show Sound Clustering │
│ n Lua Command │
│ o Display weather │
│ p Change time │
│ q Set automove route │
│ r Show mutation category levels │
│ s Cancel │
└────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────┐
│ Debug Functions - Using these will cheat not only the game, but yourself. │
├───────────────────────────────────────────────────────────────────────────┤
│ i Info │
│ Q Quit to main menu │
│ s Spawning… │
│ p Player… │
│ t Teleport… │
│ m Map… │
└───────────────────────────────────────────────────────────────────────────┘
```

With these commands, you should be able to recreate the proper conditions to test your changes. You can find some more information about the debug menu on [the official wiki](http://cddawiki.chezzo.com/cdda_wiki/index.php).
Expand All @@ -312,3 +290,5 @@ Now that `master` has been cleaned up, we can easily pull from `upstream/master`
$ git pull --ff-only upstream master
# gets changes from the "upstream" remote for the matching branch, in this case "master"
$ git checkout new_branch

For more frequently asked questions, see the [developer FAQ](../doc/DEVELOPER_FAQ.md).
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ jobs:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev", "astyle"]
sources: *apt_sources

- env: CLANG=clang++-8 SANITIZE=address EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items"
name: "Clang 8 Make build with address sanitization, but long-running tests disabled"
- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items"
name: "Clang 8 Make build with sanitizers enabled, but long-running tests disabled"
compiler: clang
addons: &clang8
apt:
Expand Down
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ ifeq ($(RUNTESTS), 1)
TESTS = tests
endif

# tiles object directories are because gcc gets confused # Appears that the default value of $LD is unsuitable on most systems
# tiles object directories are because gcc gets confused
# Appears that the default value of $LD is unsuitable on most systems

# when preprocessor defines change, but the source doesn't
ODIR = $(BUILD_PREFIX)obj
Expand Down Expand Up @@ -256,8 +257,9 @@ CXXFLAGS += -ffast-math
LDFLAGS += $(PROFILE)

ifneq ($(SANITIZE),)
CXXFLAGS += -fsanitize=$(SANITIZE)
LDFLAGS += -fsanitize=$(SANITIZE)
SANITIZE_FLAGS := -fsanitize=$(SANITIZE) -fno-sanitize-recover=all
CXXFLAGS += $(SANITIZE_FLAGS)
LDFLAGS += $(SANITIZE_FLAGS)
endif

# enable optimizations. slow to build
Expand All @@ -283,6 +285,7 @@ ifdef RELEASE
OPTLEVEL = -Os
endif
endif

ifdef LTO
ifdef CLANG
# LLVM's LTO will complain if the optimization level isn't between O0 and
Expand All @@ -293,7 +296,14 @@ ifdef RELEASE
CXXFLAGS += $(OPTLEVEL)

ifdef LTO
LDFLAGS += -fuse-ld=gold
ifeq ($(NATIVE), osx)
ifdef CLANG
LTOFLAGS += -flto=full
endif
else
LDFLAGS += -fuse-ld=gold # This breaks in OS X because gold can only produce ELF binaries, not Mach
endif

ifdef CLANG
LTOFLAGS += -flto
else
Expand All @@ -303,6 +313,8 @@ ifdef RELEASE
CXXFLAGS += $(LTOFLAGS)

# OTHERS += -mmmx -m3dnow -msse -msse2 -msse3 -mfpmath=sse -mtune=native
# OTHERS += -march=native # Uncomment this to build an optimized binary for your machine only

# Strip symbols, generates smaller executable.
OTHERS += $(RELEASE_FLAGS)
DEBUG =
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

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...


## Download

<a href="https://repology.org/project/cataclysm-dda/versions">
Expand All @@ -22,13 +21,13 @@ The source can either be downloaded as [an archive](https://github.com/CleverRav

### Arch Linux

Ncurses and tiles version avaliable in [Community repo](https://www.archlinux.org/packages/?q=cataclysm-dda)
Ncurses and tiles version available in [Community repo](https://www.archlinux.org/packages/?q=cataclysm-dda)

`sudo pacman -S cataclysm-dda`

### Fedora

Ncurses and tiles version avaliable in [official repos](https://src.fedoraproject.org/rpms/cataclysm-dda)
Ncurses and tiles version available in [official repos](https://src.fedoraproject.org/rpms/cataclysm-dda)

`sudo dnf install cataclysm-dda`

Expand Down Expand Up @@ -82,6 +81,14 @@ Press the `?` key, followed by the `1` key to see the full list of key commands.

**World** on the main menu will generate a fresh world for you. Select **Create World**.

#### I've found a bug / I would like to make a suggestion. What should I do?
#### I've found a bug. What should I do?

Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/) using [bug report template](https://github.com/CleverRaven/Cataclysm-DDA/issues/new?template=bug_report.md). If you're not able to, send an email to `[email protected]`.

#### I would like to make a suggestion. What should I do?

Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/) using [feature request template](https://github.com/CleverRaven/Cataclysm-DDA/issues/new?template=feature_request.md).

You can also submit your suggestions or vote for existing suggestions on [our FeatHub page](https://feathub.com/CleverRaven/Cataclysm-DDA). Most voted suggestions are:

Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/). If you're not able to, send an email to `kevin.granade@gmail.com`.
[![Feature Requests](https://feathub.com/CleverRaven/Cataclysm-DDA?format=svg)](https://feathub.com/CleverRaven/Cataclysm-DDA)
16 changes: 16 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,22 @@ android {
}
}

sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/res']
}
}
experimental {
resources {
srcDirs = ['src/experimental/res']
}
}
}

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions android/app/src/experimental/res/drawable/background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:drawable="@color/black"/>

<item>
<bitmap
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/splash"/>
</item>

</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions android/app/src/experimental/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="accent_material_dark">#990026</color>
<color name="primary_material_dark">#212121</color>
<color name="background_material_dark">#212121</color>
</resources>
5 changes: 5 additions & 0 deletions android/app/src/experimental/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="installing">Installing game data...</string>
<string name="upgrading">Upgrading game data...</string>
</resources>
10 changes: 10 additions & 0 deletions android/app/src/experimental/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<resources>

<style name="AppTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:colorAccent">@color/accent_material_dark</item>
<item name="android:colorPrimary">@color/primary_material_dark</item>
<item name="android:colorBackground">@color/background_material_dark</item>
</style>

</resources>
2 changes: 1 addition & 1 deletion android/app/src/main/res/drawable/background_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
android:src="@drawable/splash"/>
</item>

</layer-list>
</layer-list>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<item name="android:colorBackground">@color/background_material_dark</item>
</style>

</resources>
</resources>
3 changes: 2 additions & 1 deletion build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ then
{
if [ -n "$1" ]
then
echo "$1" | shuf | xargs -P "$num_jobs" -n 1 ./build-scripts/clang-tidy-wrapper.sh
echo "$1" | shuf | \
xargs -P "$num_jobs" -n 1 ./build-scripts/clang-tidy-wrapper.sh -quiet
else
echo "No files to analyze"
fi
Expand Down
1 change: 1 addition & 0 deletions build-scripts/mod_test_blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ more_locations
no_medieval_items
sees_player_hitbutton
sees_player_retro
generic_guns
10 changes: 5 additions & 5 deletions data/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Basecamps: Use normal recipes and fake resources.
Allow professions to have starting pets.
Make crafting failure non-absolute.
Player now burns calories when doing activities.
Model NPC needs as a behavior tree based on Maslow's heirarchy of needs.
Model NPC needs as a behavior tree based on Maslow's hierarchy of needs.
Boats push creatures in water out of the way.
CBMs for NPCs 2: Active CBMs with AI control.
Allows trains to move and turn on railroad tiles.
Expand Down Expand Up @@ -175,7 +175,7 @@ Running/crouching while swimming will result in faster/slower swim speed.
Adds refluffed and modified plasma gun.
Moves allergen handling vitamin absorption to JSON.
Alternative night vision intensity.
Adds the possiblitiy to find an evil moose in the kitten finding game.
Adds the possibility to find an evil moose in the kitten finding game.
Add "classic literature" and "collector's edition" books.
Adds Free Merchant currency.
Joint Servo CBM - movement enhancer CBM.
Expand Down Expand Up @@ -1065,7 +1065,7 @@ Adds new vehicle part : a wind turbine.
Adds Free Merchant currency.
Adds methanol and ether as a possible Molotov components.
Add "classic literature" and "collector's edition" books, move choice book spawns to library, and adjust library/mansion book spawns overall.
Adds the possiblitiy to find an evil moose in the kitten finding game.
Adds the possibility to find an evil moose in the kitten finding game.
Adds new furniture flag that restricts vision when in the furniture.

## Interface:
Expand Down Expand Up @@ -1143,7 +1143,7 @@ Vision and targeting changes, 3D-ification.
Display moves when disposing of items.
Escapable menu for sorting items in advanced inventory.
Prevent window minimize on fullscreen borderless when focus lost.
Rearange main rendering method to place curses cursor on @ at the end.
Rearrange main rendering method to place curses cursor on @ at the end.
Add a cache refresh before drawing pixel minimap.
Add option to select which video display is used.
Add option to limit lifetime of sidebar messages.
Expand Down Expand Up @@ -1295,7 +1295,7 @@ Have vehicles become dark inside when that makes sense.
Allow toggling display of forest trails on the overmap.
Added 'center' action for look around mode.
Vehicle: display engine power and electrical drain/production.
Bandage/Disinfactant display/compare/apply improvements.
Bandage/Disinfectant display/compare/apply improvements.
Allow hiding of recipe categories from crafting menu.
Player: don't create the reload prompt if there's only one option.
Better scrolling through requirements list in crafting GUI.
Expand Down
15 changes: 0 additions & 15 deletions data/core/tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@
"category": "tip",
"text": [ "Not much survives a car at 120mph. Can you?" ]
},
{
"type": "snippet",
"category": "tip",
"text": [ "Rotten food typically attracts bugs, and bugs got a lot bigger recently…" ]
},
{
"type": "snippet",
"category": "tip",
Expand Down Expand Up @@ -214,11 +209,6 @@
"category": "tip",
"text": [ "You're on fire? Stop and wait to put it out." ]
},
{
"type": "snippet",
"category": "tip",
"text": [ "Why it's called chicken walker? Because you'll chicken out every time you'll see it." ]
},
{
"type": "snippet",
"category": "tip",
Expand Down Expand Up @@ -289,11 +279,6 @@
"category": "tip",
"text": [ "Don't be afraid to make the game easier on yourself. Worlds can be made to spawn with more resources." ]
},
{
"type": "snippet",
"category": "tip",
"text": [ "Don't get caught with your pants down. There's no toilet paper anymore anyway." ]
},
{
"type": "snippet",
"category": "tip",
Expand Down
Loading

0 comments on commit 930dddf

Please sign in to comment.