1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-07 21:06:00 +00:00

allow setting the resource dir; autoconf should move *.dat file to resource dir

This commit is contained in:
Zeno Rogue
2020-05-16 01:30:33 +02:00
parent 61e249a3af
commit bf83959b4a
4 changed files with 13 additions and 3 deletions

View File

@@ -8,6 +8,14 @@
#include "hyper.h"
namespace hr {
#ifdef RESOURCEDESTDIR
EX string rsrcdir = RESOURCEDESTDIR;
#endif
#ifndef RESOURCEDESTDIR
EX string rsrcdir = "";
#endif
#if CAP_COMMANDLINE
EX const char *scorefile = "hyperrogue.log";
@@ -142,6 +150,7 @@ int arg::readCommon() {
// first phase options
if(argis("-s")) { PHASE(1); shift(); scorefile = argcs(); }
else if(argis("-rsrc")) { PHASE(1); shift(); rsrcdir = args(); }
else if(argis("-nogui")) { PHASE(1); noGUI = true; }
#ifndef EMSCRIPTEN
else if(argis("-font")) { PHASE(1); shift(); fontpath = args(); }