git repos / saland

commit 622938d7

Poul Sander · 2018-10-20 17:20
622938d7ef74b91c9078bcd35827d7d5d512aabc patch · browse files
parent fc0d6f9a29bc1f3f2f66cb921527603e872452a4

Add version.h containing GAMENAME and VERSION_NUMBER defines

Changed files

M src/os.cpp before
A src/version.h
diff --git a/src/os.cpp b/src/os.cpp index 4f6cff3..413982c 100644 --- a/src/os.cpp +++ b/src/os.cpp
@@ -25,17 +25,11 @@ https://github.com/sago007/saland
#include <iostream>
#include <physfs.h>
#include "sago/platform_folders.h"
+#include "version.h"
static sago::PlatformFolders pf;
-/*
- *Files will be saved in:
- * HOME/.local/share/"+GAMENAME (unix)
- *or DOCUMENTS/My Games/GAMENAME (Windows)
- */
-#define GAMENAME "saland_game"
-
static std::string overrideSavePath = "";
/**
diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..0ac1dfa --- /dev/null +++ b/src/version.h
@@ -0,0 +1,34 @@
+/*
+===========================================================================
+ * Saland Adventures
+Copyright (C) 2014-2018 Poul Sander
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see http://www.gnu.org/licenses/
+
+Source information and contacts persons can be found at
+https://github.com/sago007/saland
+===========================================================================
+*/
+
+
+/*
+ *Files will be saved in:
+ * HOME/.local/share/"+GAMENAME (unix)
+ *or DOCUMENTS/My Games/GAMENAME (Windows)
+ */
+#define GAMENAME "saland_game"
+
+#ifndef VERSION_NUMBER
+#define VERSION_NUMBER "0.1.0-SNAPSHOT"
+#endif