Added stub point for configuration files to happen
authorMartin Read <martin@blackswordsonics.com>
Sat, 8 Feb 2014 17:44:30 +0000 (17:44 +0000)
committerMartin Read <martin@blackswordsonics.com>
Sat, 8 Feb 2014 17:44:30 +0000 (17:44 +0000)
Makefile
debian/control
main.cc

index 312f918..0b29160 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ MINVERS:=0
 COMMON_CXXFLAGS:=-c -Wall -Wwrite-strings -Wno-unused-but-set-variable -Wredundant-decls -Wunreachable-code -Wformat -Werror=format-security -fstack-protector --param=ssp-buffer-size=4 -DMAJVERS=$(MAJVERS) -DMINVERS=$(MINVERS) -std=gnu++11 -D_FORTIFY_SOURCE=2
 PRODUCTION_CXXFLAGS:=$(COMMON_CXXFLAGS)
 DEVELOPMENT_CXXFLAGS:=$(COMMON_CXXFLAGS) -g -Werror
-LIBS=-lm -lpanelw -lncursesw
+LIBS=-lpanelw -lncursesw -lxdg-basedir -lm
 ARCHIVEDIR:=victrix-abyssi-$(MAJVERS).$(MINVERS)
 ARCHIVENAME:=victrix-abyssi_$(MAJVERS).$(MINVERS)
 
index 1857e4c..5009591 100644 (file)
@@ -3,7 +3,7 @@ Maintainer: Martin Read <martin@blackswordsonics.com>
 Section: games
 Priority: optional
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 9), libncursesw5-dev
+Build-Depends: debhelper (>= 9), libncursesw5-dev, libxdg-basedir-dev
 
 Package: victrix-abyssi
 Architecture: any
diff --git a/main.cc b/main.cc
index fa4af2a..efbd596 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -37,6 +37,7 @@
 #include <time.h>
 #include <limits.h>
 #include <deque>
+#include <basedir.h>
 
 /* Coord/Offset constants */
 Coord const Nowhere = { INT_MIN, INT_MIN };
@@ -481,10 +482,18 @@ void main_loop(void)
     }
 }
 
+xdgHandle victrix_xdg_handle;
+
 int main(void)
 {
     struct stat s;
     int i;
+    xdgHandle * foo = xdgInitHandle(&victrix_xdg_handle);
+    if (!foo)
+    {
+        //// welp. Should probably throw a wobbly.
+    }
+    // TODO actually have a config file!
     display_init();
     rng_init();
     /* Do we have a saved game? */