diff --git a/Makefile b/Makefile index 4b609e7..378a380 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -CXXFLAGS = -std=c++14 -LDFLAGS = -lSDL2 -lSDL2_image +DEPS = jsoncpp sdl2 SDL2_image +CXXFLAGS = -std=c++14 $(shell pkg-config --cflags $(DEPS)) +LDFLAGS = $(shell pkg-config --libs $(DEPS)) OBJS = $(patsubst %.cpp,%.o,$(wildcard *.cpp)) APP_NAME = deathgame diff --git a/README.md b/README.md index a37b5cb..4cb0496 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ * SDL2 * SDL2_image +* jsoncpp ## Building @@ -12,4 +13,4 @@ $ make ## Running The current working directory must contain a file called "config.json". -For an example see "deathgame/config.json" in the source tree. +For an example see "example/config.json" in the source tree. diff --git a/deathgame/bees/README.start.png.txt b/example/bees/README.start.png.txt similarity index 100% rename from deathgame/bees/README.start.png.txt rename to example/bees/README.start.png.txt diff --git a/deathgame/bees/start.dasm b/example/bees/start.dasm similarity index 100% rename from deathgame/bees/start.dasm rename to example/bees/start.dasm diff --git a/deathgame/bees/start.png b/example/bees/start.png similarity index 100% rename from deathgame/bees/start.png rename to example/bees/start.png diff --git a/deathgame/chickens/README.chick.png.txt b/example/chickens/README.chick.png.txt similarity index 100% rename from deathgame/chickens/README.chick.png.txt rename to example/chickens/README.chick.png.txt diff --git a/deathgame/chickens/chick.dasm b/example/chickens/chick.dasm similarity index 100% rename from deathgame/chickens/chick.dasm rename to example/chickens/chick.dasm diff --git a/deathgame/chickens/chick.png b/example/chickens/chick.png similarity index 100% rename from deathgame/chickens/chick.png rename to example/chickens/chick.png diff --git a/deathgame/config.json b/example/config.json similarity index 100% rename from deathgame/config.json rename to example/config.json diff --git a/ui.cpp b/ui.cpp index 93c2beb..613d6b6 100644 --- a/ui.cpp +++ b/ui.cpp @@ -1,8 +1,8 @@ #include "ui.hpp" #include #include -#include -#include +#include +#include using std::shared_ptr; using std::vector; diff --git a/ui.hpp b/ui.hpp index 69f4ae9..4d2dfc3 100644 --- a/ui.hpp +++ b/ui.hpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include "util.hpp"