12
12
#include < map>
13
13
#include < string>
14
14
15
+ #define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING // Experimental filesystem header
16
+ #include < experimental/filesystem>
17
+ namespace fs = std::experimental::filesystem;
18
+
15
19
int handInventoryIndex;
16
20
std::map<std::string, bool > keys;
17
21
std::map<std::string, std::string> universeOptions;
@@ -115,8 +119,21 @@ int main(int argc, char* argv[]) {
115
119
}
116
120
117
121
// Create folders and files
118
- game::runPyScript (" data/scripts/makeDirectories.py" );
119
- game::runPyScript (" data/scripts/createOptionsFile.py" );
122
+ fs::create_directory (" data" );
123
+ fs::create_directory (" screenshots" );
124
+ if (!game::fileExists (" data/options.txt" )) {
125
+ std::ofstream file (" data/options.txt" );
126
+ std::string newLine = " \n " ;
127
+ for (size_t i = 0 ; i < game::optionLines.size (); i++) {
128
+ if (i == game::optionLines.size () - 1 ) {
129
+ newLine = " " ;
130
+ }
131
+ file << game::optionLines[i] << newLine;
132
+ }
133
+ file.close ();
134
+ }
135
+ /* game::runPyScript("data/scripts/makeDirectories.py");
136
+ game::runPyScript("data/scripts/createOptionsFile.py");*/
120
137
121
138
// Read options
122
139
std::map<std::string, std::string> options;
@@ -142,7 +159,7 @@ int main(int argc, char* argv[]) {
142
159
// Open a new window framework and set the title
143
160
PandaFramework framework;
144
161
framework.open_framework (argc, argv);
145
- framework.set_window_title (" The Panda Project: Prealpha 0.1.2 " );
162
+ framework.set_window_title (" The Panda Project: Prealpha 0.1.3 " );
146
163
147
164
// Open the window
148
165
WindowFramework* window = framework.open_window ();
0 commit comments