i'm not surprised this didn't work

master
ieee 802.11ac 2 years ago
parent b55c086c2f
commit 1822abcbc7

@ -1,7 +1,7 @@
#pragma once
#ifndef ITEM_H
#define ITEM_H
#include <iostream>
#include <cstdint>
class Item {
private:
uint32_t count;

@ -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;

Loading…
Cancel
Save