aboutsummaryrefslogtreecommitdiff
path: root/games/flare-engine
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2013-12-09 23:48:14 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2013-12-09 23:48:14 +0000
commit13e736adc45dccbb36c4c877b0e0cff572fee229 (patch)
treec4f8b4848fd7217645acf055fe583f6bcb0c0d45 /games/flare-engine
parent651cf6d56ec185f4544f5146b9762b5c13ccf560 (diff)
Notes
Diffstat (limited to 'games/flare-engine')
-rw-r--r--games/flare-engine/Makefile32
-rw-r--r--games/flare-engine/distinfo2
-rw-r--r--games/flare-engine/files/patch-no-game-specified131
-rw-r--r--games/flare-engine/pkg-descr12
4 files changed, 177 insertions, 0 deletions
diff --git a/games/flare-engine/Makefile b/games/flare-engine/Makefile
new file mode 100644
index 000000000000..b1df617fbf10
--- /dev/null
+++ b/games/flare-engine/Makefile
@@ -0,0 +1,32 @@
+# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= flare
+PORTVERSION= 0.19
+CATEGORIES= games
+MASTER_SITES= SF/${PORTNAME}-game/Linux/
+DISTNAME= ${PORTNAME}-engine.${PORTVERSION}
+PKGNAMESUFFIX= -engine
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Free Libre Action Roleplaying Engine
+
+LICENSE= GPLv3
+
+USES= cmake
+USE_SDL= sdl mixer image ttf
+CMAKE_BUILD_TYPE= #empty
+
+CMAKE_ARGS= -DBINDIR="bin" -DDATADIR="share/flare" -DMANDIR="man"
+
+PORTDOCS= *
+PORTDATA= *
+
+PLIST_FILES= bin/${PORTNAME} \
+ man/man1/flare.1.gz
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.engine ${STAGEDIR}${DOCSDIR}/
+
+.include <bsd.port.mk>
diff --git a/games/flare-engine/distinfo b/games/flare-engine/distinfo
new file mode 100644
index 000000000000..58721ceae818
--- /dev/null
+++ b/games/flare-engine/distinfo
@@ -0,0 +1,2 @@
+SHA256 (flare-engine.0.19.tar.gz) = 69811133b22c2c95ca7f35f0db6e63b693e646a433843c0f1c50a2d7f4d581e1
+SIZE (flare-engine.0.19.tar.gz) = 545167
diff --git a/games/flare-engine/files/patch-no-game-specified b/games/flare-engine/files/patch-no-game-specified
new file mode 100644
index 000000000000..93a900035fb0
--- /dev/null
+++ b/games/flare-engine/files/patch-no-game-specified
@@ -0,0 +1,131 @@
+commit 2f99397b27a407d8f5a34a023a6e54b378d0e32d
+Author: Justin Jacobs <jajdorkster@gmail.com>
+Date: Sat Dec 7 04:52:17 2013 -0500
+
+ Add --help and --version command line flags
+
+ Closes #899
+
+diff --git src/GameStateTitle.cpp src/GameStateTitle.cpp
+index 4dcaaca..2cdd797 100644
+--- src/GameStateTitle.cpp
++++ src/GameStateTitle.cpp
+@@ -64,7 +64,7 @@ GameStateTitle::GameStateTitle() : GameState() {
+
+ // set up labels
+ label_version = new WidgetLabel();
+- label_version->set(VIEW_W, 0, JUSTIFY_RIGHT, VALIGN_TOP, msg->get("Flare Alpha v0.19"), font->getColor("menu_normal"));
++ label_version->set(VIEW_W, 0, JUSTIFY_RIGHT, VALIGN_TOP, RELEASE_VERSION, font->getColor("menu_normal"));
+
+ // Setup tab order
+ tablist.add(button_play);
+diff --git src/Settings.h src/Settings.h
+index 3682960..cee4808 100644
+--- src/Settings.h
++++ src/Settings.h
+@@ -27,6 +27,8 @@ FLARE. If not, see http://www.gnu.org/licenses/
+
+ #include "CommonIncludes.h"
+
++const std::string RELEASE_VERSION = "Flare Alpha v0.19";
++
+ class Element{
+ public:
+ std::string name;
+diff --git src/main.cpp src/main.cpp
+index 43d70d0..beabf3e 100644
+--- src/main.cpp
++++ src/main.cpp
+@@ -120,8 +120,10 @@ static void init() {
+ for(int i = 0; i < SDL_NumJoysticks(); i++) {
+ printf(" Joy %d) %s\n", i, SDL_JoystickName(i));
+ }
+- if ((ENABLE_JOYSTICK) && (SDL_NumJoysticks() > 0)) joy = SDL_JoystickOpen(JOYSTICK_DEVICE);
+- printf("Using joystick #%d.\n", JOYSTICK_DEVICE);
++ if ((ENABLE_JOYSTICK) && (SDL_NumJoysticks() > 0)) {
++ joy = SDL_JoystickOpen(JOYSTICK_DEVICE);
++ printf("Using joystick #%d.\n", JOYSTICK_DEVICE);
++ }
+
+ // Set sound effects volume from settings file
+ if (AUDIO)
+@@ -213,6 +215,7 @@ string parseArgValue(const string &arg) {
+
+ int main(int argc, char *argv[]) {
+ bool debug_event = false;
++ bool done = false;
+
+ for (int i = 1 ; i < argc; i++) {
+ string arg = string(argv[i]);
+@@ -227,12 +230,28 @@ int main(int argc, char *argv[]) {
+ if (!CUSTOM_PATH_DATA.empty() && CUSTOM_PATH_DATA.at(CUSTOM_PATH_DATA.length()-1) != '/')
+ CUSTOM_PATH_DATA += "/";
+ }
++ else if (parseArg(arg) == "version") {
++ printf("%s\n", RELEASE_VERSION.c_str());
++ done = true;
++ }
++ else if (parseArg(arg) == "help") {
++ printf("\
++--help Prints this message.\n\n\
++--version Prints the release version.\n\n\
++--game Specifies which 'game' to use when launching. A game\n\
++ determines which parent folder to look for mods in, as well\n\
++ as where user settings and save data are stored.\n\n\
++--data-path Specifies an exact path to look for mod data.\n\n\
++--debug-event Prints verbose hardware input information.\n");
++ done = true;
++ }
+ }
+
+- srand((unsigned int)time(NULL));
+-
+- init();
+- mainLoop(debug_event);
++ if (!done) {
++ srand((unsigned int)time(NULL));
++ init();
++ mainLoop(debug_event);
++ }
+ cleanup();
+
+ return 0;
+
+commit 23547426abb3e1f55228feda6782607d33348f99
+Author: Justin Jacobs <jajdorkster@gmail.com>
+Date: Sat Dec 7 05:05:00 2013 -0500
+
+ Display a warning when the --game flag is omitted
+
+diff --git src/main.cpp src/main.cpp
+index beabf3e..200bdd0 100644
+--- src/main.cpp
++++ src/main.cpp
+@@ -216,6 +216,7 @@ string parseArgValue(const string &arg) {
+ int main(int argc, char *argv[]) {
+ bool debug_event = false;
+ bool done = false;
++ bool game_warning = true;
+
+ for (int i = 1 ; i < argc; i++) {
+ string arg = string(argv[i]);
+@@ -224,6 +225,7 @@ int main(int argc, char *argv[]) {
+ }
+ else if (parseArg(arg) == "game") {
+ GAME_FOLDER = parseArgValue(arg);
++ game_warning = false;
+ }
+ else if (parseArg(arg) == "data-path") {
+ CUSTOM_PATH_DATA = parseArgValue(arg);
+@@ -247,6 +249,11 @@ int main(int argc, char *argv[]) {
+ }
+ }
+
++ // if a game isn't specified, display a warning
++ if (game_warning) {
++ printf("Warning: A game wasn't specified, falling back to the 'default' game.\nDid you forget the --game flag? (e.g. --game=flare-game).\nSee --help for more details.\n\n");
++ }
++
+ if (!done) {
+ srand((unsigned int)time(NULL));
+ init();
diff --git a/games/flare-engine/pkg-descr b/games/flare-engine/pkg-descr
new file mode 100644
index 000000000000..3b5bf1ab39be
--- /dev/null
+++ b/games/flare-engine/pkg-descr
@@ -0,0 +1,12 @@
+Flare (Free Libre Action Roleplaying Engine) is a simple game engine
+built to handle a very specific kind of game: single-player 2D
+action RPGs. Flare is not a reimplementation of an existing game
+or engine. It is a tribute to and exploration of the action RPG
+genre.
+
+Rather than building a very abstract, robust game engine, the goal
+of this project is to build several real games and harvest an engine
+from the common, reusable code. The first game, in progress, is a
+fantasy dungeon crawl.
+
+WWW: http://flarerpg.org