- Update to 1.0

This commit is contained in:
Dmitry Marakasov 2018-03-16 11:07:13 +00:00
parent 809ef83426
commit 3902c77acc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464672
4 changed files with 23 additions and 246 deletions

View File

@ -2,20 +2,23 @@
# $FreeBSD$
PORTNAME= flare
PORTVERSION= 0.19
PORTREVISION= 3
PORTVERSION= 1.0
DISTVERSIONPREFIX= v
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
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
USE_GITHUB= yes
GH_ACCOUNT= clintbellanger
GH_PROJECT= ${PORTNAME}${PKGNAMESUFFIX}
USES= cmake compiler:env
USE_SDL= sdl mixer image ttf
USE_SDL= sdl2 mixer2 image2 ttf2
CMAKE_BUILD_TYPE= #empty
CMAKE_ARGS= -DBINDIR="bin" -DDATADIR="share/flare" -DMANDIR="man"
@ -23,19 +26,13 @@ CMAKE_ARGS= -DBINDIR="bin" -DDATADIR="share/flare" -DMANDIR="man"
PORTDOCS= *
PORTDATA= *
PLIST_FILES= bin/${PORTNAME} \
man/man1/flare.1.gz
.include <bsd.port.pre.mk>
post-patch:
.if ${COMPILER_TYPE} == "clang"
@${REINPLACE_CMD} -e 's|-fwhole-program||' ${WRKSRC}/CMakeLists.txt
.endif
OPTIONS_DEFINE= DOCS
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/flare
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.engine ${STAGEDIR}${DOCSDIR}/
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/flare
.include <bsd.port.post.mk>
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.engine.md ${STAGEDIR}${DOCSDIR}/
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (flare-engine.0.19.tar.gz) = 69811133b22c2c95ca7f35f0db6e63b693e646a433843c0f1c50a2d7f4d581e1
SIZE (flare-engine.0.19.tar.gz) = 545167
TIMESTAMP = 1521134478
SHA256 (clintbellanger-flare-engine-v1.0_GH0.tar.gz) = 4bbd4674513b643be6294188904665c53f0ef2912e803212c05e8fd22a44d74d
SIZE (clintbellanger-flare-engine-v1.0_GH0.tar.gz) = 4949063

View File

@ -1,225 +0,0 @@
commit 2a85555c8f0851de1bccc3f633a8072e1ea15551
Author: Justin Jacobs <jajdorkster@gmail.com>
Date: Mon Dec 9 20:06:56 2013 -0500
Display the default game warning on the title screen
Closes #896
diff --git src/GameStateTitle.cpp src/GameStateTitle.cpp
index 2cdd797..3ca06e8 100644
--- src/GameStateTitle.cpp
+++ src/GameStateTitle.cpp
@@ -24,6 +24,8 @@ FLARE. If not, see http://www.gnu.org/licenses/
#include "SharedResources.h"
#include "WidgetButton.h"
#include "WidgetLabel.h"
+#include "WidgetScrollBox.h"
+#include "UtilsMath.h"
GameStateTitle::GameStateTitle() : GameState() {
@@ -71,6 +73,21 @@ GameStateTitle::GameStateTitle() : GameState() {
tablist.add(button_cfg);
tablist.add(button_credits);
tablist.add(button_exit);
+
+ // Warning text box
+ warning_box = NULL;
+ if (GAME_FOLDER == "default") {
+ std::string warning_text = msg->get("Warning: A game wasn't specified, falling back to the 'default' game. Did you forget the --game flag? (e.g. --game=flare-game). See --help for more details.");
+ Point warning_size = font->calc_size(warning_text, VIEW_W/2);
+
+ int warning_box_h = warning_size.y;
+ clampCeil(warning_box_h, VIEW_H/2);
+ warning_box = new WidgetScrollBox(VIEW_W/2, warning_box_h);
+ warning_box->resize(warning_size.y);
+
+ font->setFont("font_normal");
+ font->renderShadowed(warning_text, 0, 0, JUSTIFY_LEFT, warning_box->contents, VIEW_W/2, FONT_WHITE);
+ }
}
void GameStateTitle::logic() {
@@ -83,6 +100,10 @@ void GameStateTitle::logic() {
exitRequested = true;
}
+ if (warning_box) {
+ warning_box->logic();
+ }
+
tablist.logic();
if (button_play->checkClick()) {
@@ -134,6 +155,11 @@ void GameStateTitle::render() {
// version number
label_version->render();
+
+ // warning text
+ if (warning_box) {
+ warning_box->render();
+ }
}
GameStateTitle::~GameStateTitle() {
@@ -142,5 +168,6 @@ GameStateTitle::~GameStateTitle() {
delete button_credits;
delete button_exit;
delete label_version;
+ delete warning_box;
SDL_FreeSurface(logo);
}
diff --git src/GameStateTitle.h src/GameStateTitle.h
index 7494dc5..ed2a093 100644
--- src/GameStateTitle.h
+++ src/GameStateTitle.h
@@ -24,6 +24,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
class WidgetButton;
class WidgetLabel;
+class WidgetScrollBox;
class GameStateTitle : public GameState {
private:
@@ -33,6 +34,7 @@ private:
WidgetButton *button_cfg;
WidgetButton *button_credits;
WidgetLabel *label_version;
+ WidgetScrollBox *warning_box;
TabList tablist;
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();

View File

@ -0,0 +1,4 @@
bin/flare
man/man6/flare.6.gz
share/applications/flare.desktop
share/icons/hicolor/scalable/apps/flare.svg