|
|
|
@ -15,10 +15,9 @@ const char* defaultPath = "$HOME/.config/factorioclone";
|
|
|
|
|
const char* defaultPath = getenv("APPDATA");
|
|
|
|
|
#endif
|
|
|
|
|
const char* filename = "main";
|
|
|
|
|
|
|
|
|
|
int c;
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
int c;
|
|
|
|
|
bool debug = false, help = false;
|
|
|
|
|
char* fileToParse = "";
|
|
|
|
|
struct winsize w;
|
|
|
|
@ -37,6 +36,20 @@ int main(int argc, char **argv)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (int i; i < argc; i++) {
|
|
|
|
|
char* arg = argv[i];
|
|
|
|
|
int filename_length = 0;
|
|
|
|
|
for (int char_count; char_count < 500; char_count++) { // how to not check file types; note to self, make this work with magic numbers and not file extensions
|
|
|
|
|
if (arg[char_count] == '\0') { filename_length = char_count; break;}
|
|
|
|
|
}
|
|
|
|
|
for (int j; j < filename_length-5; j++) { // why am i allowed near a computer
|
|
|
|
|
arg += j;
|
|
|
|
|
}
|
|
|
|
|
if (!strcmp(arg, ".json")) {
|
|
|
|
|
std::cout << "oh god it worked" << std::endl;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
std::cout << "debug: " << debug << " help: " << help << std::endl;
|
|
|
|
|
if (help) {
|
|
|
|
|
std::cout << "this is a factorio clone. we don't have a working name for it yet, but dragon lord suggested \"beurocra-tech\"" << std::endl;
|
|
|
|
|