commit b00fe713
Many small fixes and improvements to codestyle.
Changed files
| M | COPYING before |
| M | README.md before |
| M | extra/standalone/build_standalone.sh before |
| M | extra/standalone/compile_requirements.sh before |
| M | packdata.sh before |
| M | src/saland/model/placeables.hpp before |
diff --git a/COPYING b/COPYING
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
index 896ad17..2362f63 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,10 @@ WASD = Move
Click = Use magic
-# Building
+## Building
The only supported build method is using the CMake<br/>
To build do:
-```
+```bash
./packdata.sh
cmake .
# or
@@ -28,7 +28,7 @@ cmake .
make
```
The result should be in the build-folder. To run
-```
+```bash
./saland
```
@@ -37,11 +37,11 @@ The result should be in the build-folder. To run
As getting a C++ project with many dependencies to compile can be a daunting task then I have provided a couple of Docker images that can perform a build. Both for Windows and Linux.
On a fresh checkout you can use:
-```
+```bash
docker build . -f extra/docker/Dockerfile -t saland_test
```
and
-```
+```bash
docker build . -f extra/docker/Dockerfile.WindowsBuild -t saland_test
```
diff --git a/extra/standalone/build_standalone.sh b/extra/standalone/build_standalone.sh
index 4a9a413..3d21d98 100755
--- a/extra/standalone/build_standalone.sh
+++ b/extra/standalone/build_standalone.sh
@@ -9,19 +9,19 @@ fi
ARCHIVENAME=$1
rm -rf staging
-mkdir -p staging/$ARCHIVENAME/x86_64
-mkdir -p staging/$ARCHIVENAME/docs
-cp saland_standalone_launcher staging/$ARCHIVENAME/saland
-cp README.txt staging/$ARCHIVENAME/README
-chmod +x staging/$ARCHIVENAME/saland
+mkdir -p "staging/$ARCHIVENAME/x86_64"
+mkdir -p "staging/$ARCHIVENAME/docs"
+cp saland_standalone_launcher "staging/$ARCHIVENAME/saland"
+cp README.txt "staging/$ARCHIVENAME/README"
+chmod +x "staging/$ARCHIVENAME/saland"
cd ../..
docker build -f extra/docker/Dockerfile.Ubuntu18.04build_Standalone . -t saland_test
-echo Copying to: $(pwd)/extra/standalone/staging/$ARCHIVENAME
+echo Copying to: "$(pwd)/extra/standalone/staging/$ARCHIVENAME"
-docker run -it --rm -v $(pwd)/extra/standalone/staging/$ARCHIVENAME/:/output saland_test /bin/bash -c "cp /staging/saland-game/saland /output/x86_64/ && \
+docker run -it --rm -v "$(pwd)/extra/standalone/staging/$ARCHIVENAME/:/output" saland_test /bin/bash -c "cp /staging/saland-game/saland /output/x86_64/ && \
cp /usr/local/lib/libSDL2-2.0.so.0 /output/x86_64/ && \
cp /usr/local/lib/libphysfs.so.1 /output/x86_64/ && \
cp /usr/local/lib/libSDL2_mixer-2.0.so.0 /output/x86_64/ && \
@@ -30,7 +30,7 @@ cp /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /output/x86_64/ && \
cp /usr/lib/x86_64-linux-gnu/libpng16.so /output/x86_64/ && \
cp /usr/local/lib/libSDL2_image-2.0.so.0 /output/x86_64/"
-docker run -it --rm -v $(pwd)/extra/standalone/staging/$ARCHIVENAME/:/output saland_test /bin/bash -c "\
+docker run -it --rm -v "$(pwd)/extra/standalone/staging/$ARCHIVENAME/:/output" saland_test /bin/bash -c "\
cp -r /staging/saland-game/packages /output/ && \
cp /staging/saland-game/COPYING /output/ && \
cp /staging/saland-game/README.md /output/docs/README_ORG.md && \
diff --git a/extra/standalone/compile_requirements.sh b/extra/standalone/compile_requirements.sh
index bc99d70..8693b51 100755
--- a/extra/standalone/compile_requirements.sh
+++ b/extra/standalone/compile_requirements.sh
@@ -1,10 +1,6 @@
#! /bin/bash
set -euo pipefail
-#https://github.com/erincatto/box2d/archive/v2.4.1.tar.gz
-mkdir -p /staging/deps && cd /staging/deps && curl https://files.poulsander.com/~poul19/public_files/box2d-2.4.1.tar.gz | tar -zx && cd box2d-2.4.1 && ls -lrt
-cd /staging/deps/box2d-2.4.1 && cmake . && make && make install
-
mkdir -p /staging/deps && cd /staging/deps && curl https://libsdl.org/release/SDL2-2.0.12.tar.gz | tar -zx && cd SDL2-2.0.12 && ls -lrt
cd /staging/deps/SDL2-2.0.12 && ./configure --enable-shared --enable-static && make && make install
@@ -39,4 +35,4 @@ pushd boost_1_65_1
popd
-mkdir -p /staging/saland-game
\ No newline at end of file
+mkdir -p /staging/saland-game
diff --git a/packdata.sh b/packdata.sh
index c3fad63..3839272 100755
--- a/packdata.sh
+++ b/packdata.sh
@@ -2,5 +2,5 @@
set -e
mkdir -p packages
pushd data
-zip -9X ../packages/saland-0001.data $(find * | sort)
+zip -9oX ../packages/saland-0001.data "$(find * | sort)"
popd
diff --git a/src/saland/model/placeables.hpp b/src/saland/model/placeables.hpp
index 7e37ec9..627014a 100644
--- a/src/saland/model/placeables.hpp
+++ b/src/saland/model/placeables.hpp
@@ -62,7 +62,6 @@ class MiscItem : public Placeable {
public:
std::string sprite;
std::string sprite2;
- std::string id = "unknown";
std::string name = "Unknamed item";
double base_value = 1.0;
bool pickup = false;